blob: 473c9a339fc251384c2a132d985665157949fabe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
error[E0560]: struct `Crate` has no field named `fiel`
--> $DIR/dont-suggest-hygienic-fields.rs:44:34
|
LL | environment!();
| -------------- in this macro invocation
...
LL | const CRATE: Crate = Crate { fiel: () };
| ^^^^ unknown field
|
= note: this error originates in the macro `environment` (in Nightly builds, run with -Z macro-backtrace for more info)
help: a field with a similar name exists
|
LL | const CRATE: Crate = Crate { field: () };
| ~~~~~
error[E0609]: no field `field` on type `Compound`
--> $DIR/dont-suggest-hygienic-fields.rs:24:16
|
LL | let _ = ty.field;
| ^^^^^ unknown field
error[E0609]: no field `fieeld` on type `Compound`
--> $DIR/dont-suggest-hygienic-fields.rs:25:16
|
LL | let _ = ty.fieeld;
| ^^^^^^ unknown field
error[E0026]: struct `Compound` does not have a field named `field`
--> $DIR/dont-suggest-hygienic-fields.rs:27:20
|
LL | let Compound { field } = ty;
| ^^^^^ struct `Compound` does not have this field
error: pattern requires `..` due to inaccessible fields
--> $DIR/dont-suggest-hygienic-fields.rs:27:9
|
LL | let Compound { field } = ty;
| ^^^^^^^^^^^^^^^^^^
|
help: ignore the inaccessible and unused fields
|
LL | let Compound { field, .. } = ty;
| ++++
error[E0609]: no field `0` on type `Component`
--> $DIR/dont-suggest-hygienic-fields.rs:34:16
|
LL | let _ = ty.0;
| ^ unknown field
error: aborting due to 6 previous errors
Some errors have detailed explanations: E0026, E0560, E0609.
For more information about an error, try `rustc --explain E0026`.
|