about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-08-31 13:40:20 -0700
committerEsteban Küber <esteban@kuber.com.ar>2019-08-31 13:40:20 -0700
commitaee6cd937a3fff26a5d13f0a8570cafe5fb8a11c (patch)
tree9eb0947ed9703c3bf90e56786836c4f05835127f /src/test
parent9d15b6fb95d7aed3bcadaadaf0516c4733c4f439 (diff)
downloadrust-aee6cd937a3fff26a5d13f0a8570cafe5fb8a11c.tar.gz
rust-aee6cd937a3fff26a5d13f0a8570cafe5fb8a11c.zip
Fix nll tests
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr45
-rw-r--r--src/test/ui/kindck/kindck-send-object1.nll.stderr16
2 files changed, 24 insertions, 37 deletions
diff --git a/src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr b/src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr
index 7e4ac4e8ce6..565c60e5216 100644
--- a/src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr
+++ b/src/test/ui/closure-expected-type/expect-fn-supply-fn.nll.stderr
@@ -1,53 +1,44 @@
 error[E0631]: type mismatch in closure arguments
   --> $DIR/expect-fn-supply-fn.rs:30:5
    |
-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) -> _`
-   |
-note: required by `with_closure_expecting_fn_with_free_region`
-  --> $DIR/expect-fn-supply-fn.rs:1:1
-   |
 LL | / fn with_closure_expecting_fn_with_free_region<F>(_: F)
 LL | |     where F: for<'a> FnOnce(fn(&'a u32), &i32)
 LL | | {
 LL | | }
-   | |_^
+   | |_- required by `with_closure_expecting_fn_with_free_region`
+...
+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) -> _`
 
 error[E0631]: type mismatch in closure arguments
   --> $DIR/expect-fn-supply-fn.rs:37:5
    |
-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) -> _`
-   |
-note: required by `with_closure_expecting_fn_with_bound_region`
-  --> $DIR/expect-fn-supply-fn.rs:6:1
-   |
 LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F)
 LL | |     where F: FnOnce(fn(&u32), &i32)
 LL | | {
 LL | | }
-   | |_^
+   | |_- required by `with_closure_expecting_fn_with_bound_region`
+...
+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
    |
-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) -> _`
-   |
-note: required by `with_closure_expecting_fn_with_bound_region`
-  --> $DIR/expect-fn-supply-fn.rs:6:1
-   |
 LL | / fn with_closure_expecting_fn_with_bound_region<F>(_: F)
 LL | |     where F: FnOnce(fn(&u32), &i32)
 LL | | {
 LL | | }
-   | |_^
+   | |_- required by `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
 
diff --git a/src/test/ui/kindck/kindck-send-object1.nll.stderr b/src/test/ui/kindck/kindck-send-object1.nll.stderr
index 998dc90456f..c7d18cd8b8b 100644
--- a/src/test/ui/kindck/kindck-send-object1.nll.stderr
+++ b/src/test/ui/kindck/kindck-send-object1.nll.stderr
@@ -1,31 +1,27 @@
 error[E0277]: `(dyn Dummy + 'a)` cannot be shared between threads safely
   --> $DIR/kindck-send-object1.rs:10:5
    |
+LL | fn assert_send<T:Send+'static>() { }
+   | -------------------------------- required by `assert_send`
+...
 LL |     assert_send::<&'a dyn Dummy>();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely
    |
    = help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'a)`
    = note: required because of the requirements on the impl of `std::marker::Send` for `&'a (dyn Dummy + 'a)`
-note: required by `assert_send`
-  --> $DIR/kindck-send-object1.rs:5:1
-   |
-LL | fn assert_send<T:Send+'static>() { }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0277]: `(dyn Dummy + 'a)` cannot be sent between threads safely
   --> $DIR/kindck-send-object1.rs:29:5
    |
+LL | fn assert_send<T:Send+'static>() { }
+   | -------------------------------- required by `assert_send`
+...
 LL |     assert_send::<Box<dyn Dummy + 'a>>();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely
    |
    = help: the trait `std::marker::Send` is not implemented for `(dyn Dummy + 'a)`
    = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<(dyn Dummy + 'a)>`
    = note: required because it appears within the type `std::boxed::Box<(dyn Dummy + 'a)>`
-note: required by `assert_send`
-  --> $DIR/kindck-send-object1.rs:5:1
-   |
-LL | fn assert_send<T:Send+'static>() { }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors