You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can probably be minimized further, but I don't understand the code well enough...
structFoo{}fnfoo(){let x:Box<Foo> = todo!();let y:&Foo = todo!();
|| match x {ref x => x,
_ => y,}}
internal error: entered unreachable code: Overloaded deref on type Foo is not a projection
stack backtrace:
0: rust_begin_unwind
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:665:5
1: core::panicking::panic_fmt
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:74:14
2: hir_ty::mir::ProjectionElem<V,T>::projected_ty
at /Users/davidrichey/Desktop/test/rust-analyzer/crates/hir-ty/src/mir.rs:162:21
3: hir_ty::infer::closure::<impl hir_ty::infer::InferenceContext>::restrict_precision_for_unsafe
at /Users/davidrichey/Desktop/test/rust-analyzer/crates/hir-ty/src/infer/closure.rs:1050:22
4: hir_ty::infer::closure::<impl hir_ty::infer::InferenceContext>::analyze_closure
at /Users/davidrichey/Desktop/test/rust-analyzer/crates/hir-ty/src/infer/closure.rs:1299:9
5: hir_ty::infer::closure::<impl hir_ty::infer::InferenceContext>::infer_closures
at /Users/davidrichey/Desktop/test/rust-analyzer/crates/hir-ty/src/infer/closure.rs:1339:24
6: hir_ty::infer::infer_query
at /Users/davidrichey/Desktop/test/rust-analyzer/crates/hir-ty/src/infer.rs:143:5
That's a never! check that fails, so not really a panic. It only panics in builds where instructed to do so (usually a manual build, not a github release)
This can probably be minimized further, but I don't understand the code well enough...
rust-analyzer/crates/hir-ty/src/mir.rs
Lines 156 to 168 in 6e4c29f
The text was updated successfully, but these errors were encountered: