about summary refs log tree commit diff
diff options
context:
space:
mode:
authorb-naber <bn263@gmx.de>2022-09-30 14:21:17 +0200
committerb-naber <bn263@gmx.de>2022-09-30 16:11:19 +0200
commita8f17e3ad49090fd4b7c1301fbea6858453ecfb9 (patch)
treebcd27edd1780a16fd892192bb51bd3786c6d532c
parente1f735a5d1d39cd1d609fe7708bd79639cfa0e64 (diff)
downloadrust-a8f17e3ad49090fd4b7c1301fbea6858453ecfb9.tar.gz
rust-a8f17e3ad49090fd4b7c1301fbea6858453ecfb9.zip
bless tests
-rw-r--r--src/test/ui/async-await/issue-70935-complex-spans.drop_tracking.stderr2
-rw-r--r--src/test/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr4
-rw-r--r--src/test/ui/lifetimes/re-empty-in-error.stderr2
-rw-r--r--src/test/ui/regions/issue-102392.rs6
-rw-r--r--src/test/ui/regions/issue-102392.stderr14
-rw-r--r--src/test/ui/where-clauses/higher-ranked-fn-type.quiet.stderr4
-rw-r--r--src/test/ui/where-clauses/higher-ranked-fn-type.rs2
7 files changed, 27 insertions, 7 deletions
diff --git a/src/test/ui/async-await/issue-70935-complex-spans.drop_tracking.stderr b/src/test/ui/async-await/issue-70935-complex-spans.drop_tracking.stderr
index 85f7d1dd674..7fb88116665 100644
--- a/src/test/ui/async-await/issue-70935-complex-spans.drop_tracking.stderr
+++ b/src/test/ui/async-await/issue-70935-complex-spans.drop_tracking.stderr
@@ -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
    |
diff --git a/src/test/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr b/src/test/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr
index cfcef9699f3..7dabd97b94e 100644
--- a/src/test/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr
+++ b/src/test/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr
@@ -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
 
diff --git a/src/test/ui/lifetimes/re-empty-in-error.stderr b/src/test/ui/lifetimes/re-empty-in-error.stderr
index 840707d9470..c35d8ecec5e 100644
--- a/src/test/ui/lifetimes/re-empty-in-error.stderr
+++ b/src/test/ui/lifetimes/re-empty-in-error.stderr
@@ -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
 
diff --git a/src/test/ui/regions/issue-102392.rs b/src/test/ui/regions/issue-102392.rs
new file mode 100644
index 00000000000..87cc1a8e7a8
--- /dev/null
+++ b/src/test/ui/regions/issue-102392.rs
@@ -0,0 +1,6 @@
+fn g(f: for<'a> fn(fn(&str, &'a str))) -> bool {
+    f
+    //~^ ERROR mismatched types
+}
+
+fn main() {}
diff --git a/src/test/ui/regions/issue-102392.stderr b/src/test/ui/regions/issue-102392.stderr
new file mode 100644
index 00000000000..56f4c0c5db4
--- /dev/null
+++ b/src/test/ui/regions/issue-102392.stderr
@@ -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`.
diff --git a/src/test/ui/where-clauses/higher-ranked-fn-type.quiet.stderr b/src/test/ui/where-clauses/higher-ranked-fn-type.quiet.stderr
index d9950a3d9b7..30248a7a397 100644
--- a/src/test/ui/where-clauses/higher-ranked-fn-type.quiet.stderr
+++ b/src/test/ui/where-clauses/higher-ranked-fn-type.quiet.stderr
@@ -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
diff --git a/src/test/ui/where-clauses/higher-ranked-fn-type.rs b/src/test/ui/where-clauses/higher-ranked-fn-type.rs
index 0d8893e08d3..ab6edde4ee7 100644
--- a/src/test/ui/where-clauses/higher-ranked-fn-type.rs
+++ b/src/test/ui/where-clauses/higher-ranked-fn-type.rs
@@ -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(
 }