bless tests
This commit is contained in:
parent
e1f735a5d1
commit
a8f17e3ad4
7 changed files with 27 additions and 7 deletions
|
@ -18,7 +18,7 @@ LL | async fn baz<T>(_c: impl FnMut() -> T) where T: Future<Output=()> {
|
|||
| ___________________________________________________________________^
|
||||
LL | | }
|
||||
| |_^
|
||||
= note: required because it captures the following types: `ResumeTy`, `impl for<'a, 'b, 'c> Future<Output = ()>`, `()`
|
||||
= note: required because it captures the following types: `ResumeTy`, `impl Future<Output = ()>`, `()`
|
||||
note: required because it's used within this `async` block
|
||||
--> $DIR/issue-70935-complex-spans.rs:16:16
|
||||
|
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
error[E0119]: conflicting implementations of trait `Trait` for type `for<'r> fn(for<'r> fn(&'r ()))`
|
||||
error[E0119]: conflicting implementations of trait `Trait` for type `for<'r> fn(fn(&'r ()))`
|
||||
--> $DIR/coherence-fn-covariant-bound-vs-static.rs:17:1
|
||||
|
|
||||
LL | impl Trait for for<'r> fn(fn(&'r ())) {}
|
||||
| ------------------------------------- first implementation here
|
||||
LL | impl<'a> Trait for fn(fn(&'a ())) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'r> fn(for<'r> fn(&'r ()))`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'r> fn(fn(&'r ()))`
|
||||
|
|
||||
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ error: higher-ranked lifetime error
|
|||
LL | foo(&10);
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= note: could not prove `for<'b, 'a> &'b (): 'a`
|
||||
= note: could not prove `for<'b> &'b (): 'a`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
6
src/test/ui/regions/issue-102392.rs
Normal file
6
src/test/ui/regions/issue-102392.rs
Normal file
|
@ -0,0 +1,6 @@
|
|||
fn g(f: for<'a> fn(fn(&str, &'a str))) -> bool {
|
||||
f
|
||||
//~^ ERROR mismatched types
|
||||
}
|
||||
|
||||
fn main() {}
|
14
src/test/ui/regions/issue-102392.stderr
Normal file
14
src/test/ui/regions/issue-102392.stderr
Normal file
|
@ -0,0 +1,14 @@
|
|||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-102392.rs:2:5
|
||||
|
|
||||
LL | fn g(f: for<'a> fn(fn(&str, &'a str))) -> bool {
|
||||
| ---- expected `bool` because of return type
|
||||
LL | f
|
||||
| ^ expected `bool`, found fn pointer
|
||||
|
|
||||
= note: expected type `bool`
|
||||
found fn pointer `for<'a> fn(for<'b> fn(&'b str, &'a str))`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
|
@ -1,8 +1,8 @@
|
|||
error[E0277]: the trait bound `for<'b> for<'b> fn(&'b ()): Foo` is not satisfied
|
||||
error[E0277]: the trait bound `for<'b> fn(&'b ()): Foo` is not satisfied
|
||||
--> $DIR/higher-ranked-fn-type.rs:20:5
|
||||
|
|
||||
LL | called()
|
||||
| ^^^^^^ the trait `for<'b> Foo` is not implemented for `for<'b> fn(&'b ())`
|
||||
| ^^^^^^ the trait `for<'b> Foo` is not implemented for `fn(&'b ())`
|
||||
|
|
||||
note: required by a bound in `called`
|
||||
--> $DIR/higher-ranked-fn-type.rs:12:25
|
||||
|
|
|
@ -18,7 +18,7 @@ where
|
|||
(for<'a> fn(&'a ())): Foo,
|
||||
{
|
||||
called()
|
||||
//[quiet]~^ ERROR the trait bound `for<'b> for<'b> fn(&'b ()): Foo` is not satisfied
|
||||
//[quiet]~^ ERROR the trait bound `for<'b> fn(&'b ()): Foo` is not satisfied
|
||||
//[verbose]~^^ ERROR the trait bound `for<'b> fn(&ReLateBound(
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue