2022-06-20 02:24:28 +00:00
|
|
|
// Also includes more Self usages per #93796
|
|
|
|
|
2015-05-16 07:36:17 +00:00
|
|
|
fn foo(_: Self) {
|
2017-11-20 12:13:27 +00:00
|
|
|
//~^ ERROR cannot find type `Self`
|
2015-05-16 07:36:17 +00:00
|
|
|
}
|
|
|
|
|
2022-06-20 02:24:28 +00:00
|
|
|
fn foo2() {
|
|
|
|
let x: Self;
|
|
|
|
//~^ ERROR cannot find type `Self`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Foo<T>
|
|
|
|
where
|
|
|
|
Self: Clone,
|
|
|
|
//~^ ERROR cannot find type `Self`
|
|
|
|
= Vec<T>;
|
|
|
|
|
|
|
|
const FOO: Self = 0;
|
|
|
|
//~^ ERROR cannot find type `Self`
|
|
|
|
|
|
|
|
const FOO2: u32 = Self::bar();
|
|
|
|
//~^ ERROR failed to resolve: `Self`
|
|
|
|
|
|
|
|
static FOO_S: Self = 0;
|
|
|
|
//~^ ERROR cannot find type `Self`
|
|
|
|
|
|
|
|
static FOO_S2: u32 = Self::bar();
|
|
|
|
//~^ ERROR failed to resolve: `Self`
|
|
|
|
|
2015-05-16 07:36:17 +00:00
|
|
|
fn main() {}
|