Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
93e2982
commit c88a76e
Showing
11 changed files
with
186 additions
and
101 deletions.
There are no files selected for viewing
20 changes: 10 additions & 10 deletions
20
src/test/ui/associated-types/cache/project-fn-ret-invariant.krisskross.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 11 additions & 11 deletions
22
src/test/ui/associated-types/cache/project-fn-ret-invariant.oneuse.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 32 additions & 31 deletions
63
src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,43 @@ | ||
error[E0631]: type mismatch in closure arguments | ||
--> $DIR/expect-fn-supply-fn.rs:30:5 | ||
error: lifetime may not live long enough | ||
--> $DIR/expect-fn-supply-fn.rs:16:49 | ||
| | ||
LL | fn with_closure_expecting_fn_with_free_region<F>(_: F) | ||
| ------------------------------------------ required by a bound in this | ||
LL | where F: for<'a> FnOnce(fn(&'a u32), &i32) | ||
| ------------------------- required by this bound in `with_closure_expecting_fn_with_free_region` | ||
LL | fn expect_free_supply_free_from_fn<'x>(x: &'x u32) { | ||
| -- lifetime `'x` defined here | ||
... | ||
LL | with_closure_expecting_fn_with_free_region(|x: fn(&u32), y| {}); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------- found signature of `fn(for<'r> fn(&'r u32), _) -> _` | ||
| | | ||
| expected signature of `fn(fn(&'a u32), &i32) -> _` | ||
LL | with_closure_expecting_fn_with_free_region(|x: fn(&'x u32), y| {}); | ||
| ^ | ||
| | | ||
| has type `fn(&'1 u32)` | ||
| requires that `'1` must outlive `'x` | ||
|
||
error[E0631]: type mismatch in closure arguments | ||
--> $DIR/expect-fn-supply-fn.rs:37:5 | ||
error: lifetime may not live long enough | ||
--> $DIR/expect-fn-supply-fn.rs:16:49 | ||
| | ||
LL | fn with_closure_expecting_fn_with_bound_region<F>(_: F) | ||
| ------------------------------------------- required by a bound in this | ||
LL | where F: FnOnce(fn(&u32), &i32) | ||
| ---------------------- required by this bound in `with_closure_expecting_fn_with_bound_region` | ||
LL | fn expect_free_supply_free_from_fn<'x>(x: &'x u32) { | ||
| -- lifetime `'x` defined here | ||
... | ||
LL | with_closure_expecting_fn_with_free_region(|x: fn(&'x u32), y| {}); | ||
| ^ requires that `'x` must outlive `'static` | ||
| | ||
= help: consider replacing `'x` with `'static` | ||
|
||
error: higher-ranked subtype error | ||
--> $DIR/expect-fn-supply-fn.rs:32:49 | ||
| | ||
LL | with_closure_expecting_fn_with_free_region(|x: fn(&u32), y| {}); | ||
| ^ | ||
|
||
error: higher-ranked subtype error | ||
--> $DIR/expect-fn-supply-fn.rs:39:50 | ||
| | ||
LL | with_closure_expecting_fn_with_bound_region(|x: fn(&'x u32), y| {}); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------------------- found signature of `fn(fn(&'x u32), _) -> _` | ||
| | | ||
| expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _` | ||
| ^ | ||
|
||
error[E0631]: type mismatch in closure arguments | ||
--> $DIR/expect-fn-supply-fn.rs:46:5 | ||
error: higher-ranked subtype error | ||
--> $DIR/expect-fn-supply-fn.rs:48:50 | ||
| | ||
LL | fn with_closure_expecting_fn_with_bound_region<F>(_: F) | ||
| ------------------------------------------- required by a bound in this | ||
LL | where F: FnOnce(fn(&u32), &i32) | ||
| ---------------------- required by this bound in `with_closure_expecting_fn_with_bound_region` | ||
... | ||
LL | with_closure_expecting_fn_with_bound_region(|x: Foo<'_>, y| { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --------------- found signature of `for<'r> fn(fn(&'r u32), _) -> _` | ||
| | | ||
| expected signature of `fn(for<'r> fn(&'r u32), &i32) -> _` | ||
| ^ | ||
|
||
error: aborting due to 3 previous errors | ||
error: aborting due to 5 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0631`. |
2 changes: 1 addition & 1 deletion
2
src/test/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 35 additions & 9 deletions
44
src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,40 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/region-lifetime-bounds-on-fns-where-clause.rs:20:43 | ||
error: lifetime may not live long enough | ||
--> $DIR/region-lifetime-bounds-on-fns-where-clause.rs:8:5 | ||
| | ||
LL | fn b<'a, 'b>(x: &mut &'a isize, y: &mut &'b isize) { | ||
| -- -- lifetime `'b` defined here | ||
| | | ||
| lifetime `'a` defined here | ||
LL | // Illegal now because there is no `'b:'a` declaration. | ||
LL | *x = *y; | ||
| ^^^^^^^ assignment requires that `'b` must outlive `'a` | ||
| | ||
= help: consider adding the following bound: `'b: 'a` | ||
|
||
error: lifetime may not live long enough | ||
--> $DIR/region-lifetime-bounds-on-fns-where-clause.rs:14:5 | ||
| | ||
LL | fn c<'a,'b>(x: &mut &'a isize, y: &mut &'b isize) { | ||
| -- -- lifetime `'b` defined here | ||
| | | ||
| lifetime `'a` defined here | ||
... | ||
LL | a(x, y); | ||
| ^^^^^^^ argument requires that `'b` must outlive `'a` | ||
| | ||
= help: consider adding the following bound: `'b: 'a` | ||
|
||
error: higher-ranked subtype error | ||
--> $DIR/region-lifetime-bounds-on-fns-where-clause.rs:20:12 | ||
| | ||
LL | let _: fn(&mut &isize, &mut &isize) = a; | ||
| ---------------------------- ^ expected concrete lifetime, found bound lifetime parameter | ||
| | | ||
| expected due to this | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: higher-ranked subtype error | ||
--> $DIR/region-lifetime-bounds-on-fns-where-clause.rs:20:12 | ||
| | ||
= note: expected fn pointer `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)` | ||
found fn item `for<'r, 's> fn(&'r mut &isize, &'s mut &isize) {a::<'_, '_>}` | ||
LL | let _: fn(&mut &isize, &mut &isize) = a; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
error: aborting due to 4 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
50 changes: 41 additions & 9 deletions
50
src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,46 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:22:56 | ||
error: lifetime may not live long enough | ||
--> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:9:5 | ||
| | ||
LL | fn b<'a, 'b, 'c>(x: &mut &'a isize, y: &mut &'b isize, z: &mut &'c isize) { | ||
| -- -- lifetime `'b` defined here | ||
| | | ||
| lifetime `'a` defined here | ||
LL | // Illegal now because there is no `'b:'a` declaration. | ||
LL | *x = *y; | ||
| ^^^^^^^ assignment requires that `'b` must outlive `'a` | ||
| | ||
= help: consider adding the following bound: `'b: 'a` | ||
|
||
error: lifetime may not live long enough | ||
--> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:16:5 | ||
| | ||
LL | fn c<'a,'b, 'c>(x: &mut &'a isize, y: &mut &'b isize, z: &mut &'c isize) { | ||
| -- -- lifetime `'b` defined here | ||
| | | ||
| lifetime `'a` defined here | ||
... | ||
LL | a(x, y, z); | ||
| ^^^^^^^^^^ argument requires that `'b` must outlive `'a` | ||
| | ||
= help: consider adding the following bound: `'b: 'a` | ||
|
||
error: higher-ranked subtype error | ||
--> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:22:12 | ||
| | ||
LL | let _: fn(&mut &isize, &mut &isize, &mut &isize) = a; | ||
| ----------------------------------------- ^ expected concrete lifetime, found bound lifetime parameter | ||
| | | ||
| expected due to this | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: higher-ranked subtype error | ||
--> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:22:12 | ||
| | ||
= note: expected fn pointer `for<'r, 's, 't0, 't1, 't2, 't3> fn(&'r mut &'s isize, &'t0 mut &'t1 isize, &'t2 mut &'t3 isize)` | ||
found fn item `for<'r, 's, 't0> fn(&'r mut &isize, &'s mut &isize, &'t0 mut &isize) {a::<'_, '_, '_>}` | ||
LL | let _: fn(&mut &isize, &mut &isize, &mut &isize) = a; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: higher-ranked subtype error | ||
--> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:22:12 | ||
| | ||
LL | let _: fn(&mut &isize, &mut &isize, &mut &isize) = a; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
error: aborting due to 5 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
Oops, something went wrong.