about summary refs log tree commit diff
path: root/src/test/ui/impl-trait
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2018-09-15 18:30:29 +0100
committerMatthew Jasper <mjjasper1@gmail.com>2018-09-19 20:50:09 +0100
commitbd0895d7d011cc4c6bef4f95e6df64d2fee6ff73 (patch)
tree146b8e71049cc840d5a99f42d9f96da9882f53da /src/test/ui/impl-trait
parent994dc4bd1ef01b45408750679d9ec46bc1c2ff33 (diff)
downloadrust-bd0895d7d011cc4c6bef4f95e6df64d2fee6ff73.tar.gz
rust-bd0895d7d011cc4c6bef4f95e6df64d2fee6ff73.zip
Update ui tests
Diffstat (limited to 'src/test/ui/impl-trait')
-rw-r--r--src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr6
-rw-r--r--src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr4
-rw-r--r--src/test/ui/impl-trait/type_parameters_captured.nll.stderr6
3 files changed, 8 insertions, 8 deletions
diff --git a/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr b/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr
index 3019e3aa1f7..485d3566244 100644
--- a/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr
+++ b/src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr
@@ -36,10 +36,10 @@ LL |     move |_| println!("{}", y)
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
 
 error[E0310]: the parameter type `T` may not live long enough
-  --> $DIR/must_outlive_least_region_or_bound.rs:34:5
+  --> $DIR/must_outlive_least_region_or_bound.rs:32:51
    |
-LL |     x
-   |     ^
+LL | fn ty_param_wont_outlive_static<T:Debug>(x: T) -> impl Debug + 'static {
+   |                                                   ^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider adding an explicit lifetime bound `T: 'static`...
 
diff --git a/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr b/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr
index 4bc8876c232..7e9aa90c6c5 100644
--- a/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr
+++ b/src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr
@@ -4,7 +4,7 @@ error: unsatisfied lifetime constraints
 LL |     fn iter_values_anon(&self) -> impl Iterator<Item=u32> {
    |                         - let's call the lifetime of this reference `'1`
 LL |         self.x.iter().map(|a| a.0)
-   |         ^^^^^^ cast requires that `'1` must outlive `'static`
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'static`
 help: to allow this impl Trait to capture borrowed data with lifetime `'1`, add `'_` as a constraint
    |
 LL |     fn iter_values_anon(&self) -> impl Iterator<Item=u32> + '_ {
@@ -16,7 +16,7 @@ error: unsatisfied lifetime constraints
 LL |     fn iter_values<'a>(&'a self) -> impl Iterator<Item=u32> {
    |                    -- lifetime `'a` defined here
 LL |         self.x.iter().map(|a| a.0)
-   |         ^^^^^^ cast requires that `'a` must outlive `'static`
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`
 help: to allow this impl Trait to capture borrowed data with lifetime `'a`, add `'a` as a constraint
    |
 LL |     fn iter_values<'a>(&'a self) -> impl Iterator<Item=u32> + 'a {
diff --git a/src/test/ui/impl-trait/type_parameters_captured.nll.stderr b/src/test/ui/impl-trait/type_parameters_captured.nll.stderr
index 3c2c86fffde..18258ef1f9d 100644
--- a/src/test/ui/impl-trait/type_parameters_captured.nll.stderr
+++ b/src/test/ui/impl-trait/type_parameters_captured.nll.stderr
@@ -1,8 +1,8 @@
 error[E0310]: the parameter type `T` may not live long enough
-  --> $DIR/type_parameters_captured.rs:19:5
+  --> $DIR/type_parameters_captured.rs:17:20
    |
-LL |     x
-   |     ^
+LL | fn foo<T>(x: T) -> impl Any + 'static {
+   |                    ^^^^^^^^^^^^^^^^^^
    |
    = help: consider adding an explicit lifetime bound `T: 'static`...