Skip to content

Commit 10dcd73

Browse files
committed
Avoid span_delayed_bug on one path in FnCtxt::pointer_kind.
1 parent 1fb5e6c commit 10dcd73

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

compiler/rustc_hir_typeck/src/cast.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
137137
| ty::Coroutine(..)
138138
| ty::Adt(..)
139139
| ty::Never
140-
| ty::Dynamic(_, _, ty::DynStar)
141-
| ty::Error(_) => {
140+
| ty::Dynamic(_, _, ty::DynStar) => {
142141
let guar = self
143142
.dcx()
144143
.span_delayed_bug(span, format!("`{t:?}` should be sized but is not?"));
145144
return Err(guar);
146145
}
146+
ty::Error(guar) => return Err(guar),
147147
})
148148
}
149149
}

compiler/rustc_resolve/src/ident.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use rustc_ast::{self as ast, NodeId};
2-
use rustc_errors::ErrorGuaranteed;
32
use rustc_hir::def::{DefKind, Namespace, NonMacroAttrKind, PartialRes, PerNS};
43
use rustc_middle::bug;
54
use rustc_middle::ty;

0 commit comments

Comments
 (0)