rust/tests/ui/invalid/invalid_rustc_layout_scalar_valid_range.stderr
Jonathan Brouwer f98ea3d144
Port #[rustc_layout_scalar_valid_range_start/end] to the new attribute parsing infrastructure
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-06-27 09:08:21 +02:00

52 lines
2.3 KiB
Plaintext

error[E0539]: malformed `rustc_layout_scalar_valid_range_start` attribute input
--> $DIR/invalid_rustc_layout_scalar_valid_range.rs:3:1
|
LL | #[rustc_layout_scalar_valid_range_start(u32::MAX)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--------^^
| | |
| | expected an integer literal here
| help: must be of the form: `#[rustc_layout_scalar_valid_range_start(start)]`
error[E0805]: malformed `rustc_layout_scalar_valid_range_end` attribute input
--> $DIR/invalid_rustc_layout_scalar_valid_range.rs:6:1
|
LL | #[rustc_layout_scalar_valid_range_end(1, 2)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------^
| | |
| | expected a single argument here
| help: must be of the form: `#[rustc_layout_scalar_valid_range_end(end)]`
error[E0539]: malformed `rustc_layout_scalar_valid_range_end` attribute input
--> $DIR/invalid_rustc_layout_scalar_valid_range.rs:9:1
|
LL | #[rustc_layout_scalar_valid_range_end(a = "a")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------^^
| | |
| | expected an integer literal here
| help: must be of the form: `#[rustc_layout_scalar_valid_range_end(end)]`
error[E0539]: malformed `rustc_layout_scalar_valid_range_start` attribute input
--> $DIR/invalid_rustc_layout_scalar_valid_range.rs:18:1
|
LL | #[rustc_layout_scalar_valid_range_start(rustc_layout_scalar_valid_range_start)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-------------------------------------^^
| | |
| | expected an integer literal here
| help: must be of the form: `#[rustc_layout_scalar_valid_range_start(start)]`
error: attribute should be applied to a struct
--> $DIR/invalid_rustc_layout_scalar_valid_range.rs:12:1
|
LL | #[rustc_layout_scalar_valid_range_end(1)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | / enum E {
LL | | X = 1,
LL | | Y = 14,
LL | | }
| |_- not a struct
error: aborting due to 5 previous errors
Some errors have detailed explanations: E0539, E0805.
For more information about an error, try `rustc --explain E0539`.