Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
ICE to delayed bug
  • Loading branch information
lcnr committed Feb 13, 2026
commit b3d9fbc17271a03bdd3ccbf95bb296b3505d4120
4 changes: 3 additions & 1 deletion compiler/rustc_ty_utils/src/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,9 @@ fn layout_of_uncached<'tcx>(
let err = if ty.has_param() || !cx.typing_env.param_env.caller_bounds().is_empty() {
LayoutError::TooGeneric(ty)
} else {
unreachable!("invalid rigid alias in layout_of after normalization: {ty:?}");
LayoutError::ReferencesError(cx.tcx().dcx().delayed_bug(format!(
"unexpected rigid alias in layout_of after normalization: {ty:?}"
)))
};
return Err(error(cx, err));
}
Expand Down
12 changes: 12 additions & 0 deletions tests/ui/layout/rigid-alias-due-to-broken-impl.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
error[E0046]: not all trait items implemented, missing: `Assoc`
--> $DIR/rigid-alias-due-to-broken-impl.rs:14:1
|
LL | type Assoc;
| ---------- `Assoc` from trait
...
LL | impl Foo for str {}
| ^^^^^^^^^^^^^^^^ missing `Assoc` in implementation

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0046`.
Loading