diff options
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0152.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0152.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0718.rs | 17 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0718.stderr | 9 |
4 files changed, 29 insertions, 3 deletions
diff --git a/src/test/ui/error-codes/E0152.rs b/src/test/ui/error-codes/E0152.rs index 8fbad7b3ff3..96a4d51bd24 100644 --- a/src/test/ui/error-codes/E0152.rs +++ b/src/test/ui/error-codes/E0152.rs @@ -10,7 +10,7 @@ #![feature(lang_items)] -#[lang = "panic_impl"] +#[lang = "arc"] struct Foo; //~ ERROR E0152 fn main() { diff --git a/src/test/ui/error-codes/E0152.stderr b/src/test/ui/error-codes/E0152.stderr index c7f5f362efb..a0530f24de6 100644 --- a/src/test/ui/error-codes/E0152.stderr +++ b/src/test/ui/error-codes/E0152.stderr @@ -1,10 +1,10 @@ -error[E0152]: duplicate lang item found: `panic_impl`. +error[E0152]: duplicate lang item found: `arc`. --> $DIR/E0152.rs:14:1 | LL | struct Foo; //~ ERROR E0152 | ^^^^^^^^^^^ | - = note: first defined in crate `std`. + = note: first defined in crate `alloc`. error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0718.rs b/src/test/ui/error-codes/E0718.rs new file mode 100644 index 00000000000..ce74e35ac6b --- /dev/null +++ b/src/test/ui/error-codes/E0718.rs @@ -0,0 +1,17 @@ +// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(lang_items)] + +// Arc is expected to be a struct, so this will error. +#[lang = "arc"] +static X: u32 = 42; + +fn main() {} diff --git a/src/test/ui/error-codes/E0718.stderr b/src/test/ui/error-codes/E0718.stderr new file mode 100644 index 00000000000..8ce721d30a1 --- /dev/null +++ b/src/test/ui/error-codes/E0718.stderr @@ -0,0 +1,9 @@ +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`. |
