Skip to content

Commit 090669d

Browse files
committed
update failing E0621 tests
1 parent 501c558 commit 090669d

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ impl<'r> Itble<'r, usize, Range<usize>> for (usize, usize) {
2222
fn check<'r, I: Iterator<Item=usize>, T: Itble<'r, usize, I>>(cont: &T) -> bool
2323
{
2424
let cont_iter = cont.iter();
25-
//~^ ERROR cannot infer an appropriate lifetime for autoref due to conflicting requirements
25+
//~^ ERROR 24:26: 24:30: explicit lifetime required in the type of `cont` [E0621]
2626
let result = cont_iter.fold(Some(0), |state, val| {
2727
state.map_or(None, |mask| {
2828
let bit = 1 << val;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ impl Foo for A {}
1919
struct B<'a>(&'a (Foo+'a));
2020

2121
fn foo<'a>(a: &Foo) -> B<'a> {
22-
B(a) //~ ERROR cannot infer an appropriate lifetime
22+
B(a) //~ ERROR 22:5: 22:9: explicit lifetime required in the type of `a` [E0621]
2323
}
2424

2525
fn main() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct Parser<'a> {
2525
impl<'a> Parser<'a> {
2626
pub fn new(lexer: &'a mut Lexer) -> Parser<'a> {
2727
Parser { lexer: lexer }
28-
//~^ ERROR cannot infer an appropriate lifetime
28+
//~^ ERROR 27:25: 27:30: explicit lifetime required in the type of `lexer` [E0621]
2929
}
3030
}
3131

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct thing<'a, Q:'a> {
1313
}
1414

1515
fn thing<'a,Q>(x: &Q) -> thing<'a,Q> {
16-
thing{ x: x } //~ ERROR cannot infer
16+
thing{ x: x } //~ ERROR 16:5: 16:18: explicit lifetime required in the type of `x` [E0621]
1717
}
1818

1919
fn main() {

src/test/compile-fail/regions-glb-free-free.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ mod argparse {
2222

2323
impl<'a> Flag<'a> {
2424
pub fn set_desc(self, s: &str) -> Flag<'a> {
25-
Flag { //~ ERROR cannot infer
25+
Flag { //~ ERROR 25:13: 30:14: explicit lifetime required in the type of `s` [E0621]
2626
name: self.name,
2727
desc: s,
2828
max_count: self.max_count,

src/test/compile-fail/variance-trait-matching.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn get<'a, G>(get: &G) -> i32
3131
// This fails to type-check because, without variance, we can't
3232
// use `G : Get<&'a i32>` as evidence that `G : Get<&'b i32>`,
3333
// even if `'a : 'b`.
34-
pick(get, &22) //~ ERROR cannot infer
34+
pick(get, &22) //~ ERROR 34:5: 34:9: explicit lifetime required in the type of `get` [E0621]
3535
}
3636

3737
fn pick<'b, G>(get: &'b G, if_odd: &'b i32) -> i32

0 commit comments

Comments
 (0)