summary refs log tree commit diff
path: root/src/test/ui/impl-trait
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-10-23 22:20:58 -0700
committerEsteban Küber <esteban@kuber.com.ar>2019-10-24 12:26:01 -0700
commit0baf61bfdb95980c69fbfcc0fc95ce82e8d81ac9 (patch)
tree83a1e3a9b3ce6bdf5e87d47d5a79c5e033096519 /src/test/ui/impl-trait
parent4a8c5b20c7772bc5342b83d4b0696ea216ef75a7 (diff)
downloadrust-0baf61bfdb95980c69fbfcc0fc95ce82e8d81ac9.tar.gz
rust-0baf61bfdb95980c69fbfcc0fc95ce82e8d81ac9.zip
Increase spacing for suggestions in diagnostics
Make the spacing between the code snippet and verbose structured
suggestions consistent with note and help messages.
Diffstat (limited to 'src/test/ui/impl-trait')
-rw-r--r--src/test/ui/impl-trait/impl-generic-mismatch.stderr2
-rw-r--r--src/test/ui/impl-trait/multiple-lifetimes/error-handling.stderr1
-rw-r--r--src/test/ui/impl-trait/must_outlive_least_region_or_bound.nll.stderr2
-rw-r--r--src/test/ui/impl-trait/static-return-lifetime-infered.nll.stderr2
-rw-r--r--src/test/ui/impl-trait/universal_wrong_bounds.stderr2
5 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/impl-trait/impl-generic-mismatch.stderr b/src/test/ui/impl-trait/impl-generic-mismatch.stderr
index fae8da9861f..bfe94119a02 100644
--- a/src/test/ui/impl-trait/impl-generic-mismatch.stderr
+++ b/src/test/ui/impl-trait/impl-generic-mismatch.stderr
@@ -6,6 +6,7 @@ LL |     fn foo(&self, _: &impl Debug);
 ...
 LL |     fn foo<U: Debug>(&self, _: &U) { }
    |            ^ expected `impl Trait`, found generic parameter
+   |
 help: try removing the generic parameter and using `impl Trait` instead
    |
 LL |     fn foo(&self, _: &impl Debug) { }
@@ -19,6 +20,7 @@ LL |     fn bar<U: Debug>(&self, _: &U);
 ...
 LL |     fn bar(&self, _: &impl Debug) { }
    |                       ^^^^^^^^^^ expected generic parameter, found `impl Trait`
+   |
 help: try changing the `impl Trait` argument to a generic parameter
    |
 LL |     fn bar<U: Debug>(&self, _: &U) { }
diff --git a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.stderr b/src/test/ui/impl-trait/multiple-lifetimes/error-handling.stderr
index f27e6ff44a6..82e280b9fb2 100644
--- a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.stderr
+++ b/src/test/ui/impl-trait/multiple-lifetimes/error-handling.stderr
@@ -3,6 +3,7 @@ error: lifetime may not live long enough
    |
 LL | fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
    |        -- lifetime `'a` defined here                   ^^^^^^^^^ opaque type 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 | type E<'a, 'b> = impl Sized; + 'a
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 b1e4edd9980..097f003575e 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
@@ -5,6 +5,7 @@ LL | fn elided(x: &i32) -> impl Copy { x }
    |              -        ^^^^^^^^^ opaque type requires that `'1` must outlive `'static`
    |              |
    |              let's call the lifetime of this reference `'1`
+   |
 help: to allow this `impl Trait` to capture borrowed data with lifetime `'1`, add `'_` as a constraint
    |
 LL | fn elided(x: &i32) -> impl Copy + '_ { x }
@@ -17,6 +18,7 @@ LL | fn explicit<'a>(x: &'a i32) -> impl Copy { x }
    |             --                 ^^^^^^^^^ opaque type requires that `'a` must outlive `'static`
    |             |
    |             lifetime `'a` defined here
+   |
 help: to allow this `impl Trait` to capture borrowed data with lifetime `'a`, add `'a` as a constraint
    |
 LL | fn explicit<'a>(x: &'a i32) -> impl Copy + 'a { x }
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 0736f25cb51..423cfcc4989 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
@@ -5,6 +5,7 @@ LL |     fn iter_values_anon(&self) -> impl Iterator<Item=u32> {
    |                         -         ^^^^^^^^^^^^^^^^^^^^^^^ opaque type requires that `'1` must outlive `'static`
    |                         |
    |                         let's call the lifetime of this reference `'1`
+   |
 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> + '_ {
@@ -17,6 +18,7 @@ LL |     fn iter_values<'a>(&'a self) -> impl Iterator<Item=u32> {
    |                    --               ^^^^^^^^^^^^^^^^^^^^^^^ opaque type requires that `'a` must outlive `'static`
    |                    |
    |                    lifetime `'a` defined here
+   |
 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/universal_wrong_bounds.stderr b/src/test/ui/impl-trait/universal_wrong_bounds.stderr
index f530792955b..32b638dc465 100644
--- a/src/test/ui/impl-trait/universal_wrong_bounds.stderr
+++ b/src/test/ui/impl-trait/universal_wrong_bounds.stderr
@@ -3,6 +3,7 @@ error[E0404]: expected trait, found derive macro `Debug`
    |
 LL | fn wants_debug(g: impl Debug) { }
    |                        ^^^^^ not a trait
+   |
 help: possible better candidate is found in another module, you can import it into scope
    |
 LL | use std::fmt::Debug;
@@ -13,6 +14,7 @@ error[E0404]: expected trait, found derive macro `Debug`
    |
 LL | fn wants_display(g: impl Debug) { }
    |                          ^^^^^ not a trait
+   |
 help: possible better candidate is found in another module, you can import it into scope
    |
 LL | use std::fmt::Debug;