Skip to content

Commit 3fa28cb

Browse files
committed
Add a new ui test and update existing ones
1 parent 7aff6ad commit 3fa28cb

25 files changed

+70
-58
lines changed

src/test/compile-fail/issue-12187-1.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ fn new<T>() -> &'static T {
1414

1515
fn main() {
1616
let &v = new();
17-
//~^ ERROR unable to fully infer type(s) [E0282]
18-
//~| NOTE cannot infer type
19-
//~| NOTE type annotations or generic parameter binding
17+
//~^ ERROR type annotations needed [E0282]
18+
//~| NOTE cannot infer type for `_`
2019
}

src/test/compile-fail/issue-12187-2.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ fn new<'r, T>() -> &'r T {
1414

1515
fn main() {
1616
let &v = new();
17-
//~^ ERROR unable to fully infer type(s) [E0282]
18-
//~| NOTE cannot infer type
19-
//~| NOTE type annotations or generic parameter binding
17+
//~^ ERROR type annotations needed [E0282]
18+
//~| NOTE cannot infer type for `_`
2019
}

src/test/compile-fail/issue-16966.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern:type annotations or generic parameter binding required
11+
// error-pattern:type annotations needed
1212
fn main() {
1313
panic!(
1414
std::default::Default::default()

src/test/compile-fail/issue-17551.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ use std::marker;
1313
struct B<T>(marker::PhantomData<T>);
1414

1515
fn main() {
16-
let foo = B(marker::PhantomData); //~ ERROR unable to fully infer type(s)
16+
let foo = B(marker::PhantomData); //~ ERROR type annotations needed
1717
let closure = || foo;
1818
}

src/test/compile-fail/issue-18159.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
// except according to those terms.
1010

1111
fn main() {
12-
let x; //~ ERROR unable to fully infer type(s)
12+
let x; //~ ERROR type annotations needed
1313
}

src/test/compile-fail/issue-23041.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ fn main()
1414
fn bar(x:i32) ->i32 { 3*x };
1515
let b:Box<Any> = Box::new(bar as fn(_)->_);
1616
b.downcast_ref::<fn(_)->_>(); //~ ERROR E0282
17-
//~| NOTE cannot infer type
18-
//~| NOTE type annotations or generic parameter binding required
17+
//~| NOTE cannot infer type for `_`
1918
}

src/test/compile-fail/issue-23046.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ pub fn let_<'var, VAR, F: for<'v: 'var> Fn(Expr<'v, VAR>) -> Expr<'v, VAR>>
2525

2626
fn main() {
2727
let ex = |x| {
28-
let_(add(x,x), |y| { //~ ERROR unable to fully infer type(s)
28+
let_(add(x,x), |y| { //~ ERROR type annotations needed
2929
let_(add(x, x), |x|x)})};
3030
}

src/test/compile-fail/issue-24013.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ fn main() {
1313
let a = 1;
1414
let b = 2;
1515
unsafe {swap::<&mut _>(transmute(&a), transmute(&b))};
16-
//~^ ERROR unable to fully infer type(s)
16+
//~^ ERROR type annotations needed
1717
}

src/test/compile-fail/issue-5062.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
// except according to those terms.
1010

1111
fn main() { format!("{:?}", None); }
12-
//~^ ERROR unable to fully infer type(s) [E0282]
12+
//~^ ERROR type annotations needed [E0282]

src/test/compile-fail/issue-6458-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
fn main() {
1212
// Unconstrained type:
1313
format!("{:?}", None);
14-
//~^ ERROR unable to fully infer type(s) [E0282]
14+
//~^ ERROR type annotations needed [E0282]
1515
}

0 commit comments

Comments
 (0)