diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2025-08-05 01:55:20 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2025-08-05 01:55:20 +0000 |
| commit | 6b7f8fbcc584f4dc46081b5c690aeca7def88019 (patch) | |
| tree | 04afeddfb8baf26694be057716719937c4b8a404 | |
| parent | 5073886181cb95bfe899a26404c57d2944f2a4d4 (diff) | |
| download | rust-6b7f8fbcc584f4dc46081b5c690aeca7def88019.tar.gz rust-6b7f8fbcc584f4dc46081b5c690aeca7def88019.zip | |
Promote crash test.
| -rw-r--r-- | tests/crashes/124352.rs | 4 | ||||
| -rw-r--r-- | tests/ui/attributes/malformed-never-type-options.rs | 8 | ||||
| -rw-r--r-- | tests/ui/attributes/malformed-never-type-options.stderr | 19 |
3 files changed, 27 insertions, 4 deletions
diff --git a/tests/crashes/124352.rs b/tests/crashes/124352.rs deleted file mode 100644 index e9eb4419e6a..00000000000 --- a/tests/crashes/124352.rs +++ /dev/null @@ -1,4 +0,0 @@ -//@ known-bug: #124352 -#![rustc_never_type_options(: Unsize<U> = "hi")] - -fn main() {} diff --git a/tests/ui/attributes/malformed-never-type-options.rs b/tests/ui/attributes/malformed-never-type-options.rs new file mode 100644 index 00000000000..0c384be0e22 --- /dev/null +++ b/tests/ui/attributes/malformed-never-type-options.rs @@ -0,0 +1,8 @@ +//! Regression test for #124352 +//! The `rustc_*` attribute is malformed, but ICEing without a `feature(rustc_attrs)` is still bad. + +#![rustc_never_type_options(: Unsize<U> = "hi")] +//~^ ERROR expected unsuffixed literal, found `:` +//~| ERROR use of an internal attribute + +fn main() {} diff --git a/tests/ui/attributes/malformed-never-type-options.stderr b/tests/ui/attributes/malformed-never-type-options.stderr new file mode 100644 index 00000000000..0d2ff4881f2 --- /dev/null +++ b/tests/ui/attributes/malformed-never-type-options.stderr @@ -0,0 +1,19 @@ +error: expected unsuffixed literal, found `:` + --> $DIR/malformed-never-type-options.rs:4:29 + | +LL | #![rustc_never_type_options(: Unsize<U> = "hi")] + | ^ + +error[E0658]: use of an internal attribute + --> $DIR/malformed-never-type-options.rs:4:1 + | +LL | #![rustc_never_type_options(: Unsize<U> = "hi")] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable + = note: the `#[rustc_never_type_options]` attribute is an internal implementation detail that will never be stable + = note: `rustc_never_type_options` is used to experiment with never type fallback and work on never type stabilization + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0658`. |
