diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2019-10-23 22:20:58 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2019-10-24 12:26:01 -0700 |
| commit | 0baf61bfdb95980c69fbfcc0fc95ce82e8d81ac9 (patch) | |
| tree | 83a1e3a9b3ce6bdf5e87d47d5a79c5e033096519 /src/test/ui/error-codes | |
| parent | 4a8c5b20c7772bc5342b83d4b0696ea216ef75a7 (diff) | |
| download | rust-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/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0023.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0423.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0617.stderr | 1 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0618.stderr | 1 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0642.stderr | 3 |
5 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/error-codes/E0023.stderr b/src/test/ui/error-codes/E0023.stderr index dbce6003a2b..a3610099294 100644 --- a/src/test/ui/error-codes/E0023.stderr +++ b/src/test/ui/error-codes/E0023.stderr @@ -33,6 +33,7 @@ LL | Orange((String, String)), ... LL | Fruit::Orange(a, b) => {}, | ^^^^^^^^^^^^^^^^^^^ expected 1 field, found 2 + | help: missing parenthesis | LL | Fruit::Orange((a, b)) => {}, @@ -46,6 +47,7 @@ LL | Banana(()), ... LL | Fruit::Banana() => {}, | ^^^^^^^^^^^^^^^ expected 1 field, found 0 + | help: missing parenthesis | LL | Fruit::Banana(()) => {}, diff --git a/src/test/ui/error-codes/E0423.stderr b/src/test/ui/error-codes/E0423.stderr index 754006bc217..4e016dbd1c0 100644 --- a/src/test/ui/error-codes/E0423.stderr +++ b/src/test/ui/error-codes/E0423.stderr @@ -3,6 +3,7 @@ error: struct literals are not allowed here | LL | if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); } | ^^^^^^^^^^^^^^^^ + | help: surround the struct literal with parentheses | LL | if let S { x: _x, y: 2 } = (S { x: 1, y: 2 }) { println!("Ok"); } @@ -19,6 +20,7 @@ error: struct literals are not allowed here | LL | for _ in std::ops::Range { start: 0, end: 10 } {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | help: surround the struct literal with parentheses | LL | for _ in (std::ops::Range { start: 0, end: 10 }) {} diff --git a/src/test/ui/error-codes/E0617.stderr b/src/test/ui/error-codes/E0617.stderr index 7c4df099d0d..c029060c3fb 100644 --- a/src/test/ui/error-codes/E0617.stderr +++ b/src/test/ui/error-codes/E0617.stderr @@ -33,6 +33,7 @@ error[E0617]: can't pass `unsafe extern "C" fn(*const i8, ...) {printf}` to vari | LL | printf(::std::ptr::null(), printf); | ^^^^^^ + | help: cast the value to `unsafe extern "C" fn(*const i8, ...)` | LL | printf(::std::ptr::null(), printf as unsafe extern "C" fn(*const i8, ...)); diff --git a/src/test/ui/error-codes/E0618.stderr b/src/test/ui/error-codes/E0618.stderr index b691f09ad7a..6ddda3bf8b5 100644 --- a/src/test/ui/error-codes/E0618.stderr +++ b/src/test/ui/error-codes/E0618.stderr @@ -8,6 +8,7 @@ LL | X::Entry(); | ^^^^^^^^-- | | | call expression requires function + | help: `X::Entry` is a unit variant, you need to write it without the parenthesis | LL | X::Entry; diff --git a/src/test/ui/error-codes/E0642.stderr b/src/test/ui/error-codes/E0642.stderr index da255143494..45486a5d632 100644 --- a/src/test/ui/error-codes/E0642.stderr +++ b/src/test/ui/error-codes/E0642.stderr @@ -3,6 +3,7 @@ error[E0642]: patterns aren't allowed in methods without bodies | LL | fn foo((x, y): (i32, i32)); | ^^^^^^ + | help: give this argument a name or use an underscore to ignore it | LL | fn foo(_: (i32, i32)); @@ -13,6 +14,7 @@ error[E0642]: patterns aren't allowed in methods without bodies | LL | fn bar((x, y): (i32, i32)) {} | ^^^^^^ + | help: give this argument a name or use an underscore to ignore it | LL | fn bar(_: (i32, i32)) {} @@ -23,6 +25,7 @@ error[E0642]: patterns aren't allowed in methods without bodies | LL | fn method(S { .. }: S) {} | ^^^^^^^^ + | help: give this argument a name or use an underscore to ignore it | LL | fn method(_: S) {} |
