Add link to invalid repr error
This commit is contained in:
parent
625143bac3
commit
6bb29af766
5 changed files with 10 additions and 0 deletions
|
|
@ -132,6 +132,7 @@ attr_parsing_unknown_version_literal =
|
|||
attr_parsing_unrecognized_repr_hint =
|
||||
unrecognized representation hint
|
||||
.help = valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
|
||||
.note = for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
|
||||
|
||||
attr_parsing_unstable_cfg_target_compact =
|
||||
compact `cfg(target(..))` is experimental and subject to change
|
||||
|
|
|
|||
|
|
@ -498,6 +498,7 @@ pub(crate) struct ReprIdent {
|
|||
#[derive(Diagnostic)]
|
||||
#[diag(attr_parsing_unrecognized_repr_hint, code = E0552)]
|
||||
#[help]
|
||||
#[note]
|
||||
pub(crate) struct UnrecognizedReprHint {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ LL | let y = #[repr(uwu(4))]
|
|||
| ^^^^^^
|
||||
|
|
||||
= help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
|
||||
= note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ LL | #[repr(nothing)]
|
|||
| ^^^^^^^
|
||||
|
|
||||
= help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
|
||||
= note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
|
||||
|
||||
error[E0552]: unrecognized representation hint
|
||||
--> $DIR/issue-43988.rs:18:12
|
||||
|
|
@ -33,6 +34,7 @@ LL | #[repr(something_not_real)]
|
|||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
|
||||
= note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
|
||||
|
||||
error[E0539]: malformed `repr` attribute input
|
||||
--> $DIR/issue-43988.rs:24:5
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ LL | #[repr(uwu)]
|
|||
| ^^^
|
||||
|
|
||||
= help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
|
||||
= note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
|
||||
|
||||
error[E0552]: unrecognized representation hint
|
||||
--> $DIR/invalid_repr_list_help.rs:6:8
|
||||
|
|
@ -13,6 +14,7 @@ LL | #[repr(uwu = "a")]
|
|||
| ^^^^^^^^^
|
||||
|
|
||||
= help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
|
||||
= note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
|
||||
|
||||
error[E0552]: unrecognized representation hint
|
||||
--> $DIR/invalid_repr_list_help.rs:9:8
|
||||
|
|
@ -21,6 +23,7 @@ LL | #[repr(uwu(4))]
|
|||
| ^^^^^^
|
||||
|
|
||||
= help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
|
||||
= note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
|
||||
|
||||
error[E0552]: unrecognized representation hint
|
||||
--> $DIR/invalid_repr_list_help.rs:14:8
|
||||
|
|
@ -29,6 +32,7 @@ LL | #[repr(uwu, u8)]
|
|||
| ^^^
|
||||
|
|
||||
= help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
|
||||
= note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
|
||||
|
||||
error[E0552]: unrecognized representation hint
|
||||
--> $DIR/invalid_repr_list_help.rs:19:8
|
||||
|
|
@ -37,6 +41,7 @@ LL | #[repr(uwu)]
|
|||
| ^^^
|
||||
|
|
||||
= help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
|
||||
= note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
|
||||
|
||||
error: unknown `doc` attribute `owo`
|
||||
--> $DIR/invalid_repr_list_help.rs:20:7
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue