We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccfcd95 commit 2c7b8d4Copy full SHA for 2c7b8d4
compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs
@@ -1879,6 +1879,17 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
1879
self.set_tainted_by_errors(e);
1880
Ty::new_error(self.tcx(), e)
1881
}
1882
+ Res::Def(..) => {
1883
+ assert_eq!(
1884
+ path.segments.get(0).map(|seg| seg.ident.name),
1885
+ Some(kw::SelfUpper),
1886
+ "only expected incorrect resolution for `Self`"
1887
+ );
1888
+ Ty::new_error(
1889
+ self.tcx(),
1890
+ self.tcx().dcx().span_delayed_bug(span, "incorrect resolution for `Self`"),
1891
+ )
1892
+ }
1893
_ => span_bug!(span, "unexpected resolution: {:?}", path.res),
1894
1895
0 commit comments