rust/tests/ui/traits/issue-102989.rs

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

15 lines
461 B
Rust
Raw Normal View History

2022-10-13 01:07:39 -05:00
// normalize-stderr-test "loaded from .*libcore-.*.rlib" -> "loaded from SYSROOT/libcore-*.rlib"
2022-10-14 12:45:11 -05:00
#![feature(lang_items)]
#[lang="sized"]
trait Sized { } //~ ERROR found duplicate lang item `sized`
fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
//~^ ERROR `self` parameter is only allowed in associated functions
//~| ERROR cannot find type `Struct` in this scope
let x = x << 1;
//~^ ERROR cannot find value `x` in this scope
}
fn main() {}