]> git.proxmox.com Git - rustc.git/blame - tests/ui/resolve/issue-24968.rs
New upstream version 1.74.1+dfsg1
[rustc.git] / tests / ui / resolve / issue-24968.rs
CommitLineData
923072b8
FG
1// Also includes more Self usages per #93796
2
62682a34 3fn foo(_: Self) {
ff7c6d11 4//~^ ERROR cannot find type `Self`
62682a34 5}
223e47cc 6
923072b8
FG
7fn foo2() {
8 let x: Self;
9 //~^ ERROR cannot find type `Self`
10}
11
12type Foo<T>
13where
14 Self: Clone,
15//~^ ERROR cannot find type `Self`
16= Vec<T>;
17
18const FOO: Self = 0;
19//~^ ERROR cannot find type `Self`
20
21const FOO2: u32 = Self::bar();
22//~^ ERROR failed to resolve: `Self`
23
24static FOO_S: Self = 0;
25//~^ ERROR cannot find type `Self`
26
27static FOO_S2: u32 = Self::bar();
28//~^ ERROR failed to resolve: `Self`
29
223e47cc 30fn main() {}