Skip to content

Commit 28e625f

Browse files
authored
Rollup merge of #126833 - RalfJung:extern-type-field-ice, r=compiler-errors
don't ICE when encountering an extern type field during validation "extern type" is a pain that keeps on giving... Fixes rust-lang/rust#126814 r? ```@oli-obk```
2 parents 4a51364 + 6b3267f commit 28e625f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/diagnostics.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,9 @@ pub fn report_error<'tcx>(
311311
ResourceExhaustion(_) => "resource exhaustion",
312312
Unsupported(
313313
// We list only the ones that can actually happen.
314-
UnsupportedOpInfo::Unsupported(_) | UnsupportedOpInfo::UnsizedLocal,
314+
UnsupportedOpInfo::Unsupported(_)
315+
| UnsupportedOpInfo::UnsizedLocal
316+
| UnsupportedOpInfo::ExternTypeField,
315317
) => "unsupported operation",
316318
InvalidProgram(
317319
// We list only the ones that can actually happen.

tests/fail/extern-type-field-offset.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: unsupported operation: `extern type` does not have a known offset
1+
error: unsupported operation: `extern type` field does not have a known offset
22
--> $DIR/extern-type-field-offset.rs:LL:CC
33
|
44
LL | let _field = &x.a;
5-
| ^^^^ `extern type` does not have a known offset
5+
| ^^^^ `extern type` field does not have a known offset
66
|
77
= help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
88
= note: BACKTRACE:

0 commit comments

Comments
 (0)