From 0baf61bfdb95980c69fbfcc0fc95ce82e8d81ac9 Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Wed, 23 Oct 2019 22:20:58 -0700 Subject: Increase spacing for suggestions in diagnostics Make the spacing between the code snippet and verbose structured suggestions consistent with note and help messages. --- src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr | 1 + src/test/ui/methods/method-on-ambiguous-numeric-type.stderr | 3 +++ 2 files changed, 4 insertions(+) (limited to 'src/test/ui/methods') diff --git a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr index b1bd749bef4..8dfbde92f64 100644 --- a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr +++ b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr @@ -11,6 +11,7 @@ error[E0308]: mismatched types | LL | let y: usize = x.foo(); | ^^^^^^^ expected usize, found isize + | help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit | LL | let y: usize = x.foo().try_into().unwrap(); diff --git a/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr b/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr index 40e765abe27..d9e250882e1 100644 --- a/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr +++ b/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr @@ -3,6 +3,7 @@ error[E0689]: can't call method `neg` on ambiguous numeric type `{float}` | LL | let x = 2.0.neg(); | ^^^ + | help: you must specify a concrete type for this numeric value, like `f32` | LL | let x = 2.0_f32.neg(); @@ -13,6 +14,7 @@ error[E0689]: can't call method `neg` on ambiguous numeric type `{float}` | LL | let x = y.neg(); | ^^^ + | help: you must specify a type for this binding, like `f32` | LL | let y: f32 = 2.0; @@ -31,6 +33,7 @@ error[E0689]: can't call method `pow` on ambiguous numeric type `{integer}` | LL | local_bar.pow(2); | ^^^ + | help: you must specify a type for this binding, like `i32` | LL | ($ident:ident) => { let $ident: i32 = 42; } -- cgit 1.4.1-3-g733a5