update various test cases that generate slightly different output
For the most part, it seems to be better, but one side-effect is that I cannot seem to reproduce E0102 anymore.
This commit is contained in:
parent
bca56e82a1
commit
1c138ed1c7
@ -1378,7 +1378,7 @@ E0102: r##"
|
||||
You hit this error because the compiler lacks the information to
|
||||
determine the type of this variable. Erroneous code example:
|
||||
|
||||
```compile_fail,E0102
|
||||
```compile_fail,E0282
|
||||
// could be an array of anything
|
||||
let x = []; // error: cannot determine a type for this local variable
|
||||
```
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
fn main() {
|
||||
let x = [];
|
||||
//~^ ERROR E0102
|
||||
//~| NOTE cannot resolve type of variable
|
||||
//~^ ERROR type annotations needed
|
||||
//~| NOTE consider giving `x` a type
|
||||
//~| NOTE cannot infer type for `_`
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ fn main() {
|
||||
// n == m
|
||||
let &x = &1isize as &T; //~ ERROR type `&T` cannot be dereferenced
|
||||
let &&x = &(&1isize as &T); //~ ERROR type `&T` cannot be dereferenced
|
||||
let box x = box 1isize as Box<T>; //~ ERROR `T: std::marker::Sized` is not satisfied
|
||||
let box x = box 1isize as Box<T>; //~ ERROR type `std::boxed::Box<T>` cannot be dereferenced
|
||||
|
||||
// n > m
|
||||
let &&x = &1isize as &T;
|
||||
|
@ -16,4 +16,5 @@ fn main() {
|
||||
let &v = new();
|
||||
//~^ ERROR type annotations needed [E0282]
|
||||
//~| NOTE cannot infer type for `_`
|
||||
//~| NOTE consider giving a type to pattern
|
||||
}
|
||||
|
@ -16,4 +16,5 @@ fn main() {
|
||||
let &v = new();
|
||||
//~^ ERROR type annotations needed [E0282]
|
||||
//~| NOTE cannot infer type for `_`
|
||||
//~| NOTE consider giving a type to pattern
|
||||
}
|
||||
|
@ -9,7 +9,8 @@
|
||||
// except according to those terms.
|
||||
|
||||
fn main() {
|
||||
let v = &[]; //~ NOTE consider giving `v` a type
|
||||
let it = v.iter(); //~ ERROR type annotations needed
|
||||
//~^ NOTE cannot infer type for `_`
|
||||
let v = &[]; //~ ERROR type annotations needed
|
||||
//~| NOTE consider giving `v` a type
|
||||
//~| NOTE cannot infer type for `_`
|
||||
let it = v.iter();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user