rust/src/test/ui/issues/issue-13407.stderr
Esteban Küber 37a11a96a1 On type mismatch caused by assignment, point at assignee
* Do not emit unnecessary E0308 after E0070
* Show fewer errors on `while let` missing `let`
* Hide redundant E0308 on `while let` missing `let`
* Point at binding definition when possible on invalid assignment
* do not point at closure twice
* do not suggest `if let` for literals in lhs
* account for parameter types
2021-11-25 18:04:33 +00:00

25 lines
588 B
Plaintext

error[E0603]: unit struct `C` is private
--> $DIR/issue-13407.rs:6:8
|
LL | A::C = 1;
| ^ private unit struct
|
note: the unit struct `C` is defined here
--> $DIR/issue-13407.rs:2:5
|
LL | struct C;
| ^^^^^^^^^
error[E0070]: invalid left-hand side of assignment
--> $DIR/issue-13407.rs:6:10
|
LL | A::C = 1;
| ---- ^
| |
| cannot assign to this expression
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0070, E0603.
For more information about an error, try `rustc --explain E0070`.