Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected synthetic: SyntheticSyntax #16620

Closed
griffi-gh opened this issue Feb 20, 2024 · 4 comments
Closed

unexpected synthetic: SyntheticSyntax #16620

griffi-gh opened this issue Feb 20, 2024 · 4 comments
Labels
C-bug Category: bug

Comments

@griffi-gh
Copy link

Panic context:
> fetch_native_diagnostics

thread 'Worker' panicked at crates\hir\src\diagnostics.rs:521:63:
unexpected synthetic: SyntheticSyntax
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:645
   1: core::panicking::panic_fmt
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src\panicking.rs:72
   2: core::result::unwrap_failed
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src\result.rs:1649
   3: hir::diagnostics::AnyDiagnostic::inference_diagnostic
   4: hir::DefWithBody::diagnostics
   5: hir::ModuleDef::diagnostics
   6: hir::Module::diagnostics
   7: ide_diagnostics::diagnostics
   8: salsa::Cancelled::catch
   9: ide::Analysis::diagnostics
  10: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
  11: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
  12: rust_analyzer::diagnostics::fetch_native_diagnostics
  13: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Panic context:
> fetch_native_diagnostics

thread 'Worker' panicked at crates\hir\src\diagnostics.rs:521:63:
unexpected synthetic: SyntheticSyntax
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:645
   1: core::panicking::panic_fmt
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src\panicking.rs:72
   2: core::result::unwrap_failed
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src\result.rs:1649
   3: hir::diagnostics::AnyDiagnostic::inference_diagnostic
   4: hir::DefWithBody::diagnostics
   5: hir::ModuleDef::diagnostics
   6: hir::Module::diagnostics
   7: ide_diagnostics::diagnostics
   8: salsa::Cancelled::catch
   9: ide::Analysis::diagnostics
  10: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
  11: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
  12: rust_analyzer::diagnostics::fetch_native_diagnostics
  13: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Panic context:
> fetch_native_diagnostics

thread 'Worker' panicked at crates\hir\src\diagnostics.rs:521:63:
unexpected synthetic: SyntheticSyntax
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:645
   1: core::panicking::panic_fmt
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src\panicking.rs:72
   2: core::result::unwrap_failed
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src\result.rs:1649
   3: hir::diagnostics::AnyDiagnostic::inference_diagnostic
   4: hir::DefWithBody::diagnostics
   5: hir::ModuleDef::diagnostics
   6: hir::Module::diagnostics
   7: ide_diagnostics::diagnostics
   8: salsa::Cancelled::catch
   9: ide::Analysis::diagnostics
  10: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
  11: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
  12: rust_analyzer::diagnostics::fetch_native_diagnostics
  13: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Panic context:
> fetch_native_diagnostics

thread 'Worker' panicked at crates\hir\src\diagnostics.rs:521:63:
unexpected synthetic: SyntheticSyntax
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:645
   1: core::panicking::panic_fmt
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src\panicking.rs:72
   2: core::result::unwrap_failed
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src\result.rs:1649
   3: hir::diagnostics::AnyDiagnostic::inference_diagnostic
   4: hir::DefWithBody::diagnostics
   5: hir::ModuleDef::diagnostics
   6: hir::Module::diagnostics
   7: ide_diagnostics::diagnostics
   8: salsa::Cancelled::catch
   9: ide::Analysis::diagnostics
  10: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
  11: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
  12: rust_analyzer::diagnostics::fetch_native_diagnostics
  13: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

rust-analyzer version: rust-analyzer version: 0.4.1852-standalone (9f04957 2024-02-20)

rustc version: rustc 1.78.0-nightly (3246e7951 2024-02-19)

relevant settings: -

@griffi-gh griffi-gh added the C-bug Category: bug label Feb 20, 2024
@Veykril
Copy link
Member

Veykril commented Feb 21, 2024

Needs a snippet to reproduce

@poliorcetics
Copy link
Contributor

I got it on https://github.com/starship/starship, just opening the project

My RA-config is:

assist.importGranularity = "module"
cargo.extraEnv.CARGO_TARGET_DIR = "/Users/alexis/.local/cache/rust-analyzer-target-dir"
check.command = "clippy"
completion.fullFunctionSignatures.enable = true
diagnostics.disabled = ["inactive-code", "inactive_code", "unresolved-proc-macro", "unresolved_proc_macro"]
hover.actions.references.enable = true
inlayHints.closingBraceHints.minLines = 10
inlayHints.closureReturnTypeHints.enable = "with_block"
inlayHints.discriminantHints.enable = "fieldless"
inlayHints.expressionAdjustmentHints.enable = "never"
inlayHints.expressionAdjustmentHints.hideOutsideUnsafe = false
inlayHints.expressionAdjustmentHints.mode = "prefer_prefix"
inlayHints.lifetimeElisionHints.enable = "skip_trivial"
inlayHints.typeHints.hideClosureInitialization = false
lens.references.adt.enable = true
lens.references.enumVariant.enable = true
lens.references.method.enable = true
lens.references.trait.enable = true
lruCapacity = 256
workspace.symbol.search.kind = "all_symbols"
workspace.symbol.search.limit = 128
workspace.symbol.search.scope = "workspace"

@poliorcetics
Copy link
Contributor

I'm on macOS, with commit 543d7e9

@Veykril
Copy link
Member

Veykril commented Feb 28, 2024

Fixed in #16684

@Veykril Veykril closed this as completed Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants