Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
ba6fe58095f98f070d161ffdc6c59b51b59d41db
rust/tests/ui/error-codes/E0718.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
184 B
Rust
Raw Normal View History

Extend lang items to assert correct target. 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.
2018-10-11 19:36:51 +02:00
#![feature(lang_items)]
Replace "rc"/"arc" lang items with Rc/Arc diagnostic items.
2020-04-08 04:26:48 +03:00
// Box is expected to be a struct, so this will error.
consistency rename: language item -> lang item
2024-04-17 12:30:45 +02:00
#[lang = "owned_box"] //~ ERROR lang item must be applied to a struct
Extend lang items to assert correct target. 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.
2018-10-11 19:36:51 +02:00
static X: u32 = 42;
fn main() {}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 1590ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API