Update error expectations
This commit is contained in:
parent
9fcb6a2b88
commit
87e76e6ca4
@ -25,6 +25,6 @@ pub fn let_<'var, VAR, F: for<'v: 'var> Fn(Expr<'v, VAR>) -> Expr<'v, VAR>>
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let ex = |x| {
|
let ex = |x| {
|
||||||
let_(add(x,x), |y| { //~ ERROR unable to infer enough type information about `_`
|
let_(add(x,x), |y| { //~ ERROR unable to infer enough type information about `VAR`
|
||||||
let_(add(x, x), |x|x)})};
|
let_(add(x, x), |x|x)})};
|
||||||
}
|
}
|
||||||
|
@ -9,4 +9,4 @@
|
|||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
fn main() { format!("{:?}", None); }
|
fn main() { format!("{:?}", None); }
|
||||||
//~^ ERROR unable to infer enough type information about `_` [E0282]
|
//~^ ERROR unable to infer enough type information about `T` [E0282]
|
||||||
|
@ -11,5 +11,5 @@
|
|||||||
fn main() {
|
fn main() {
|
||||||
// Unconstrained type:
|
// Unconstrained type:
|
||||||
format!("{:?}", None);
|
format!("{:?}", None);
|
||||||
//~^ ERROR unable to infer enough type information about `_` [E0282]
|
//~^ ERROR unable to infer enough type information about `T` [E0282]
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ use std::mem;
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
mem::transmute(0);
|
mem::transmute(0);
|
||||||
//~^ ERROR unable to infer enough type information about `_` [E0282]
|
//~^ ERROR unable to infer enough type information about `U` [E0282]
|
||||||
//~| NOTE cannot infer type for `_`
|
//~| NOTE cannot infer type for `U`
|
||||||
//~| NOTE type annotations or generic parameter binding
|
//~| NOTE type annotations or generic parameter binding
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,8 @@ pub fn foo<State>(_: TypeWithState<State>) {}
|
|||||||
|
|
||||||
pub fn bar() {
|
pub fn bar() {
|
||||||
foo(TypeWithState(marker::PhantomData));
|
foo(TypeWithState(marker::PhantomData));
|
||||||
//~^ ERROR unable to infer enough type information about `_` [E0282]
|
//~^ ERROR unable to infer enough type information about `State` [E0282]
|
||||||
//~| NOTE cannot infer type for `_`
|
//~| NOTE cannot infer type for `State`
|
||||||
//~| NOTE type annotations or generic parameter binding
|
//~| NOTE type annotations or generic parameter binding
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let v = &[];
|
let v = &[];
|
||||||
let it = v.iter(); //~ ERROR unable to infer enough type information about `_` [E0282]
|
let it = v.iter(); //~ ERROR unable to infer enough type information about `T` [E0282]
|
||||||
//~| NOTE cannot infer type for `_`
|
//~| NOTE cannot infer type for `T`
|
||||||
//~| NOTE type annotations or generic parameter binding
|
//~| NOTE type annotations or generic parameter binding
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ impl foo for Vec<isize> {
|
|||||||
fn m1() {
|
fn m1() {
|
||||||
// we couldn't infer the type of the vector just based on calling foo()...
|
// we couldn't infer the type of the vector just based on calling foo()...
|
||||||
let mut x = Vec::new();
|
let mut x = Vec::new();
|
||||||
//~^ ERROR unable to infer enough type information about `_` [E0282]
|
//~^ ERROR unable to infer enough type information about `T` [E0282]
|
||||||
x.foo();
|
x.foo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,8 +34,8 @@ where T : Convert<U>
|
|||||||
|
|
||||||
fn a() {
|
fn a() {
|
||||||
test(22, std::default::Default::default());
|
test(22, std::default::Default::default());
|
||||||
//~^ ERROR unable to infer enough type information about `_` [E0282]
|
//~^ ERROR unable to infer enough type information about `U` [E0282]
|
||||||
//~| NOTE cannot infer type for `_`
|
//~| NOTE cannot infer type for `U`
|
||||||
//~| NOTE type annotations or generic parameter binding
|
//~| NOTE type annotations or generic parameter binding
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
// Issue #5062
|
// Issue #5062
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
None; //~ ERROR unable to infer enough type information about `_` [E0282]
|
None; //~ ERROR unable to infer enough type information about `T` [E0282]
|
||||||
//~| NOTE cannot infer type for `_`
|
//~| NOTE cannot infer type for `T`
|
||||||
//~| NOTE type annotations or generic parameter binding
|
//~| NOTE type annotations or generic parameter binding
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ struct S<'a, T:'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
S { o: &None }; //~ ERROR unable to infer enough type information about `_` [E0282]
|
S { o: &None }; //~ ERROR unable to infer enough type information about `T` [E0282]
|
||||||
//~| NOTE cannot infer type for `_`
|
//~| NOTE cannot infer type for `T`
|
||||||
//~| NOTE type annotations or generic parameter binding
|
//~| NOTE type annotations or generic parameter binding
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let _foo = Vec::new();
|
let _foo = Vec::new();
|
||||||
//~^ ERROR unable to infer enough type information about `_` [E0282]
|
//~^ ERROR unable to infer enough type information about `T` [E0282]
|
||||||
//~| NOTE cannot infer type for `_`
|
//~| NOTE cannot infer type for `T`
|
||||||
//~| NOTE type annotations or generic parameter binding
|
//~| NOTE type annotations or generic parameter binding
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
error[E0282]: unable to infer enough type information about `_`
|
error[E0282]: unable to infer enough type information about `T`
|
||||||
--> $DIR/repair_span_std_macros.rs:12:13
|
--> $DIR/repair_span_std_macros.rs:12:13
|
||||||
|
|
|
|
||||||
12 | let x = vec![];
|
12 | let x = vec![];
|
||||||
| ^^^^^^ cannot infer type for `_`
|
| ^^^^^^ cannot infer type for `T`
|
||||||
|
|
|
|
||||||
= note: type annotations or generic parameter binding required
|
= note: type annotations or generic parameter binding required
|
||||||
= note: this error originates in a macro outside of the current crate
|
= note: this error originates in a macro outside of the current crate
|
||||||
|
Loading…
Reference in New Issue
Block a user