Rollup merge of #72338 - doctorn:trait-object-ice, r=ecstatic-morse
Fix ICE in -Zsave-analysis Puts a short-circuit in to avoid an ICE in `-Zsave-analysis`. r? @ecstatic-morse Resolves #72267
This commit is contained in:
commit
817880842c
3 changed files with 27 additions and 1 deletions
7
src/test/ui/save-analysis/issue-72267.rs
Normal file
7
src/test/ui/save-analysis/issue-72267.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
// compile-flags: -Z save-analysis
|
||||
|
||||
fn main() {
|
||||
let _: Box<(dyn ?Sized)>;
|
||||
//~^ ERROR `?Trait` is not permitted in trait object types
|
||||
//~| ERROR at least one trait is required for an object type
|
||||
}
|
||||
15
src/test/ui/save-analysis/issue-72267.stderr
Normal file
15
src/test/ui/save-analysis/issue-72267.stderr
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
error: `?Trait` is not permitted in trait object types
|
||||
--> $DIR/issue-72267.rs:4:21
|
||||
|
|
||||
LL | let _: Box<(dyn ?Sized)>;
|
||||
| ^^^^^^
|
||||
|
||||
error[E0224]: at least one trait is required for an object type
|
||||
--> $DIR/issue-72267.rs:4:17
|
||||
|
|
||||
LL | let _: Box<(dyn ?Sized)>;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0224`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue