]> git.lizzy.rs Git - rust.git/blob - src/test/ui/resolve/issue-24968.rs
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / resolve / issue-24968.rs
1 // Also includes more Self usages per #93796
2
3 fn foo(_: Self) {
4 //~^ ERROR cannot find type `Self`
5 }
6
7 fn foo2() {
8     let x: Self;
9     //~^ ERROR cannot find type `Self`
10 }
11
12 type Foo<T>
13 where
14     Self: Clone,
15 //~^ ERROR cannot find type `Self`
16 = Vec<T>;
17
18 const FOO: Self = 0;
19 //~^ ERROR cannot find type `Self`
20
21 const FOO2: u32 = Self::bar();
22 //~^ ERROR failed to resolve: `Self`
23
24 static FOO_S: Self = 0;
25 //~^ ERROR cannot find type `Self`
26
27 static FOO_S2: u32 = Self::bar();
28 //~^ ERROR failed to resolve: `Self`
29
30 fn main() {}