This commit extends the existing lang items functionality to assert that the `#[lang_item]` attribute is only found on the appropriate item for any given lang item. That is, language items representing traits must only ever have their corresponding attribute placed on a trait, for example.
9 lines
301 B
Text
9 lines
301 B
Text
error[E0718]: `arc` language item must be applied to a struct
|
|
--> $DIR/E0718.rs:14:1
|
|
|
|
|
LL | #[lang = "arc"]
|
|
| ^^^^^^^^^^^^^^^ attribute should be applied to a struct, not a static item
|
|
|
|
error: aborting due to previous error
|
|
|
|
For more information about this error, try `rustc --explain E0718`.
|