]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/kw-in-trait-bounds.stderr
Account for ADT bodies and struct expressions
[rust.git] / src / test / ui / parser / kw-in-trait-bounds.stderr
1 error: expected identifier, found keyword `fn`
2   --> $DIR/kw-in-trait-bounds.rs:3:10
3    |
4 LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn())
5    |          ^^ expected identifier, found keyword
6    |
7 help: escape `fn` to use it as an identifier
8    |
9 LL | fn _f<F: r#fn(), G>(_: impl fn(), _: &dyn fn())
10    |          ++
11
12 error: expected identifier, found keyword `fn`
13   --> $DIR/kw-in-trait-bounds.rs:3:27
14    |
15 LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn())
16    |                           ^^ expected identifier, found keyword
17    |
18 help: escape `fn` to use it as an identifier
19    |
20 LL | fn _f<F: fn(), G>(_: impl r#fn(), _: &dyn fn())
21    |                           ++
22
23 error: expected identifier, found keyword `fn`
24   --> $DIR/kw-in-trait-bounds.rs:3:41
25    |
26 LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn())
27    |                                         ^^ expected identifier, found keyword
28    |
29 help: escape `fn` to use it as an identifier
30    |
31 LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn r#fn())
32    |                                         ++
33
34 error: expected identifier, found keyword `fn`
35   --> $DIR/kw-in-trait-bounds.rs:17:4
36    |
37 LL | G: fn(),
38    |    ^^ expected identifier, found keyword
39    |
40 help: escape `fn` to use it as an identifier
41    |
42 LL | G: r#fn(),
43    |    ++
44
45 error: expected identifier, found keyword `struct`
46   --> $DIR/kw-in-trait-bounds.rs:24:10
47    |
48 LL | fn _g<A: struct, B>(_: impl struct, _: &dyn struct)
49    |          ^^^^^^ expected identifier, found keyword
50    |
51 help: escape `struct` to use it as an identifier
52    |
53 LL | fn _g<A: r#struct, B>(_: impl struct, _: &dyn struct)
54    |          ++
55
56 error: expected identifier, found keyword `struct`
57   --> $DIR/kw-in-trait-bounds.rs:24:29
58    |
59 LL | fn _g<A: struct, B>(_: impl struct, _: &dyn struct)
60    |                             ^^^^^^ expected identifier, found keyword
61    |
62 help: escape `struct` to use it as an identifier
63    |
64 LL | fn _g<A: struct, B>(_: impl r#struct, _: &dyn struct)
65    |                             ++
66
67 error: expected identifier, found keyword `struct`
68   --> $DIR/kw-in-trait-bounds.rs:24:45
69    |
70 LL | fn _g<A: struct, B>(_: impl struct, _: &dyn struct)
71    |                                             ^^^^^^ expected identifier, found keyword
72    |
73 help: escape `struct` to use it as an identifier
74    |
75 LL | fn _g<A: struct, B>(_: impl struct, _: &dyn r#struct)
76    |                                             ++
77
78 error: expected identifier, found keyword `struct`
79   --> $DIR/kw-in-trait-bounds.rs:38:8
80    |
81 LL |     B: struct,
82    |        ^^^^^^ expected identifier, found keyword
83    |
84 help: escape `struct` to use it as an identifier
85    |
86 LL |     B: r#struct,
87    |        ++
88
89 error[E0405]: cannot find trait `r#fn` in this scope
90   --> $DIR/kw-in-trait-bounds.rs:3:10
91    |
92 LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn())
93    |          ^^ help: a trait with a similar name exists (notice the capitalization): `Fn`
94   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
95    |
96    = note: similarly named trait `Fn` defined here
97
98 error[E0405]: cannot find trait `r#fn` in this scope
99   --> $DIR/kw-in-trait-bounds.rs:17:4
100    |
101 LL | G: fn(),
102    |    ^^ help: a trait with a similar name exists (notice the capitalization): `Fn`
103   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
104    |
105    = note: similarly named trait `Fn` defined here
106
107 error[E0405]: cannot find trait `r#fn` in this scope
108   --> $DIR/kw-in-trait-bounds.rs:3:27
109    |
110 LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn())
111    |                           ^^ help: a trait with a similar name exists (notice the capitalization): `Fn`
112   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
113    |
114    = note: similarly named trait `Fn` defined here
115
116 error[E0405]: cannot find trait `r#fn` in this scope
117   --> $DIR/kw-in-trait-bounds.rs:3:41
118    |
119 LL | fn _f<F: fn(), G>(_: impl fn(), _: &dyn fn())
120    |                                         ^^ help: a trait with a similar name exists (notice the capitalization): `Fn`
121   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
122    |
123    = note: similarly named trait `Fn` defined here
124
125 error[E0405]: cannot find trait `r#struct` in this scope
126   --> $DIR/kw-in-trait-bounds.rs:24:10
127    |
128 LL | fn _g<A: struct, B>(_: impl struct, _: &dyn struct)
129    |          ^^^^^^ help: a trait with a similar name exists (notice the capitalization): `Struct`
130 ...
131 LL | trait Struct {}
132    | ------------ similarly named trait `Struct` defined here
133
134 error[E0405]: cannot find trait `r#struct` in this scope
135   --> $DIR/kw-in-trait-bounds.rs:38:8
136    |
137 LL |     B: struct,
138    |        ^^^^^^ help: a trait with a similar name exists (notice the capitalization): `Struct`
139 ...
140 LL | trait Struct {}
141    | ------------ similarly named trait `Struct` defined here
142
143 error[E0405]: cannot find trait `r#struct` in this scope
144   --> $DIR/kw-in-trait-bounds.rs:24:29
145    |
146 LL | fn _g<A: struct, B>(_: impl struct, _: &dyn struct)
147    |                             ^^^^^^ help: a trait with a similar name exists (notice the capitalization): `Struct`
148 ...
149 LL | trait Struct {}
150    | ------------ similarly named trait `Struct` defined here
151
152 error[E0405]: cannot find trait `r#struct` in this scope
153   --> $DIR/kw-in-trait-bounds.rs:24:45
154    |
155 LL | fn _g<A: struct, B>(_: impl struct, _: &dyn struct)
156    |                                             ^^^^^^ help: a trait with a similar name exists (notice the capitalization): `Struct`
157 ...
158 LL | trait Struct {}
159    | ------------ similarly named trait `Struct` defined here
160
161 error: aborting due to 16 previous errors
162
163 For more information about this error, try `rustc --explain E0405`.