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
b60f7b51a27dfd9cbc5ecaa56ee679cd1b67f4c4
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
188 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.
#[lang = "owned_box"] //~ ERROR language 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: 2137ms Template: 3ms
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