Skip to content

Commit 6b7f8fb

Browse files
committed
Promote crash test.
1 parent 5073886 commit 6b7f8fb

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

tests/crashes/124352.rs

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//! Regression test for #124352
2+
//! The `rustc_*` attribute is malformed, but ICEing without a `feature(rustc_attrs)` is still bad.
3+
4+
#![rustc_never_type_options(: Unsize<U> = "hi")]
5+
//~^ ERROR expected unsuffixed literal, found `:`
6+
//~| ERROR use of an internal attribute
7+
8+
fn main() {}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
error: expected unsuffixed literal, found `:`
2+
--> $DIR/malformed-never-type-options.rs:4:29
3+
|
4+
LL | #![rustc_never_type_options(: Unsize<U> = "hi")]
5+
| ^
6+
7+
error[E0658]: use of an internal attribute
8+
--> $DIR/malformed-never-type-options.rs:4:1
9+
|
10+
LL | #![rustc_never_type_options(: Unsize<U> = "hi")]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12+
|
13+
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
14+
= note: the `#[rustc_never_type_options]` attribute is an internal implementation detail that will never be stable
15+
= note: `rustc_never_type_options` is used to experiment with never type fallback and work on never type stabilization
16+
17+
error: aborting due to 2 previous errors
18+
19+
For more information about this error, try `rustc --explain E0658`.

0 commit comments

Comments
 (0)