fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
3.9 KiB127 linesraw
1error: expected identifier, found keyword `fn`
2  --> $DIR/kw-in-trait-bounds.rs:3:10
3   |
4LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn())
5   |          ^^
6   |
7help: use `Fn` to refer to the trait
8   |
9LL | fn _f<F: Fn(), G>(_: impl fn(), _: &dyn fn())
10   |          ~~
11
12error: expected identifier, found keyword `fn`
13  --> $DIR/kw-in-trait-bounds.rs:3:27
14   |
15LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn())
16   |                           ^^
17   |
18help: use `Fn` to refer to the trait
19   |
20LL | fn _f<F: fn(), G>(_: impl Fn(), _: &dyn fn())
21   |                           ~~
22
23error: expected identifier, found keyword `fn`
24  --> $DIR/kw-in-trait-bounds.rs:3:41
25   |
26LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn())
27   |                                         ^^
28   |
29help: use `Fn` to refer to the trait
30   |
31LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn Fn())
32   |                                         ~~
33
34error: expected identifier, found keyword `fn`
35  --> $DIR/kw-in-trait-bounds.rs:11:4
36   |
37LL | G: fn(),
38   |    ^^
39   |
40help: use `Fn` to refer to the trait
41   |
42LL | G: Fn(),
43   |    ~~
44
45error: expected identifier, found keyword `struct`
46  --> $DIR/kw-in-trait-bounds.rs:16:10
47   |
48LL | fn _g<A: struct, B>(_: impl struct, _: &dyn struct)
49   |          ^^^^^^ expected identifier, found keyword
50   |
51help: escape `struct` to use it as an identifier
52   |
53LL | fn _g<A: r#struct, B>(_: impl struct, _: &dyn struct)
54   |          ++
55
56error: expected identifier, found keyword `struct`
57  --> $DIR/kw-in-trait-bounds.rs:16:29
58   |
59LL | fn _g<A: struct, B>(_: impl struct, _: &dyn struct)
60   |                             ^^^^^^ expected identifier, found keyword
61   |
62help: escape `struct` to use it as an identifier
63   |
64LL | fn _g<A: struct, B>(_: impl r#struct, _: &dyn struct)
65   |                             ++
66
67error: expected identifier, found keyword `struct`
68  --> $DIR/kw-in-trait-bounds.rs:16:45
69   |
70LL | fn _g<A: struct, B>(_: impl struct, _: &dyn struct)
71   |                                             ^^^^^^ expected identifier, found keyword
72   |
73help: escape `struct` to use it as an identifier
74   |
75LL | fn _g<A: struct, B>(_: impl struct, _: &dyn r#struct)
76   |                                             ++
77
78error: expected identifier, found keyword `struct`
79  --> $DIR/kw-in-trait-bounds.rs:30:8
80   |
81LL |     B: struct,
82   |        ^^^^^^ expected identifier, found keyword
83   |
84help: escape `struct` to use it as an identifier
85   |
86LL |     B: r#struct,
87   |        ++
88
89error[E0405]: cannot find trait `r#struct` in this scope
90  --> $DIR/kw-in-trait-bounds.rs:16:10
91   |
92LL | fn _g<A: struct, B>(_: impl struct, _: &dyn struct)
93   |          ^^^^^^ help: a trait with a similar name exists (notice the capitalization): `Struct`
94...
95LL | trait Struct {}
96   | ------------ similarly named trait `Struct` defined here
97
98error[E0405]: cannot find trait `r#struct` in this scope
99  --> $DIR/kw-in-trait-bounds.rs:30:8
100   |
101LL |     B: struct,
102   |        ^^^^^^ help: a trait with a similar name exists (notice the capitalization): `Struct`
103...
104LL | trait Struct {}
105   | ------------ similarly named trait `Struct` defined here
106
107error[E0405]: cannot find trait `r#struct` in this scope
108  --> $DIR/kw-in-trait-bounds.rs:16:29
109   |
110LL | fn _g<A: struct, B>(_: impl struct, _: &dyn struct)
111   |                             ^^^^^^ help: a trait with a similar name exists (notice the capitalization): `Struct`
112...
113LL | trait Struct {}
114   | ------------ similarly named trait `Struct` defined here
115
116error[E0405]: cannot find trait `r#struct` in this scope
117  --> $DIR/kw-in-trait-bounds.rs:16:45
118   |
119LL | fn _g<A: struct, B>(_: impl struct, _: &dyn struct)
120   |                                             ^^^^^^ help: a trait with a similar name exists (notice the capitalization): `Struct`
121...
122LL | trait Struct {}
123   | ------------ similarly named trait `Struct` defined here
124
125error: aborting due to 12 previous errors
126
127For more information about this error, try `rustc --explain E0405`.