Adjust according to petrochenkov's review comments
This commit is contained in:
parent
6ad24baf06
commit
98532a3090
4 changed files with 27 additions and 91 deletions
|
|
@ -1,8 +0,0 @@
|
|||
#![allow(bare_trait_objects)]
|
||||
|
||||
fn main() {
|
||||
let a: i8 += 1;
|
||||
//~^ ERROR expected trait, found builtin type `i8`
|
||||
//~| ERROR can't reassign to an uninitialized variable
|
||||
let _ = a;
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
error[E0067]: can't reassign to an uninitialized variable
|
||||
--> $DIR/let-binop-plus.rs:4:16
|
||||
|
|
||||
LL | let a: i8 += 1;
|
||||
| ^ help: initialize the variable
|
||||
|
||||
error[E0404]: expected trait, found builtin type `i8`
|
||||
--> $DIR/let-binop-plus.rs:4:12
|
||||
|
|
||||
LL | let a: i8 += 1;
|
||||
| ^^ not a trait
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0067, E0404.
|
||||
For more information about an error, try `rustc --explain E0067`.
|
||||
|
|
@ -1,39 +1,20 @@
|
|||
error[E0067]: can't reassign to an uninitialized variable
|
||||
error: can't reassign to an uninitialized variable
|
||||
--> $DIR/let-binop.rs:2:15
|
||||
|
|
||||
LL | let a: i8 *= 1;
|
||||
| ^^ help: initialize the variable
|
||||
|
||||
error[E0067]: can't reassign to an uninitialized variable
|
||||
error: can't reassign to an uninitialized variable
|
||||
--> $DIR/let-binop.rs:4:11
|
||||
|
|
||||
LL | let b += 1;
|
||||
| ^^
|
||||
|
|
||||
help: initialize the variable
|
||||
|
|
||||
LL | let b = 1;
|
||||
| ^
|
||||
help: otherwise, reassign to a previously initialized variable
|
||||
|
|
||||
LL | b += 1;
|
||||
| --
|
||||
| ^^ help: initialize the variable
|
||||
|
||||
error[E0067]: can't reassign to an uninitialized variable
|
||||
error: can't reassign to an uninitialized variable
|
||||
--> $DIR/let-binop.rs:6:11
|
||||
|
|
||||
LL | let c *= 1;
|
||||
| ^^
|
||||
|
|
||||
help: initialize the variable
|
||||
|
|
||||
LL | let c = 1;
|
||||
| ^
|
||||
help: otherwise, reassign to a previously initialized variable
|
||||
|
|
||||
LL | c *= 1;
|
||||
| --
|
||||
| ^^ help: initialize the variable
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0067`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue