Skip to content

Commit

Permalink
fix tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed May 31, 2019
1 parent 860dce7 commit d6ea6b9
Show file tree
Hide file tree
Showing 69 changed files with 138 additions and 210 deletions.
1 change: 0 additions & 1 deletion src/test/ui/fmt/format-string-error-2.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

// ignore-tidy-tab

fn main() {
Expand Down
36 changes: 18 additions & 18 deletions src/test/ui/fmt/format-string-error-2.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error: incorrect unicode escape sequence
--> $DIR/format-string-error-2.rs:78:20
--> $DIR/format-string-error-2.rs:77:20
|
LL | println!("\x7B}\u8 {", 1);
| ^^-
| |
| help: format of unicode escape sequences uses braces: `\u{8}`

error: invalid format string: expected `'}'`, found `'a'`
--> $DIR/format-string-error-2.rs:6:5
--> $DIR/format-string-error-2.rs:5:5
|
LL | format!("{
| - because of this opening brace
Expand All @@ -17,7 +17,7 @@ LL | a");
= note: if you intended to print `{`, you can escape it using `{{`

error: invalid format string: expected `'}'`, found `'b'`
--> $DIR/format-string-error-2.rs:10:5
--> $DIR/format-string-error-2.rs:9:5
|
LL | format!("{ \
| - because of this opening brace
Expand All @@ -28,7 +28,7 @@ LL | b");
= note: if you intended to print `{`, you can escape it using `{{`

error: invalid format string: expected `'}'`, found `'\'`
--> $DIR/format-string-error-2.rs:12:18
--> $DIR/format-string-error-2.rs:11:18
|
LL | format!(r#"{ \
| - ^ expected `}` in format string
Expand All @@ -38,7 +38,7 @@ LL | format!(r#"{ \
= note: if you intended to print `{`, you can escape it using `{{`

error: invalid format string: expected `'}'`, found `'\'`
--> $DIR/format-string-error-2.rs:16:18
--> $DIR/format-string-error-2.rs:15:18
|
LL | format!(r#"{ \n
| - ^ expected `}` in format string
Expand All @@ -48,7 +48,7 @@ LL | format!(r#"{ \n
= note: if you intended to print `{`, you can escape it using `{{`

error: invalid format string: expected `'}'`, found `'e'`
--> $DIR/format-string-error-2.rs:22:5
--> $DIR/format-string-error-2.rs:21:5
|
LL | format!("{ \n
| - because of this opening brace
Expand All @@ -59,7 +59,7 @@ LL | e");
= note: if you intended to print `{`, you can escape it using `{{`

error: invalid format string: expected `'}'`, found `'a'`
--> $DIR/format-string-error-2.rs:26:5
--> $DIR/format-string-error-2.rs:25:5
|
LL | {
| - because of this opening brace
Expand All @@ -69,7 +69,7 @@ LL | a");
= note: if you intended to print `{`, you can escape it using `{{`

error: invalid format string: expected `'}'`, found `'a'`
--> $DIR/format-string-error-2.rs:30:5
--> $DIR/format-string-error-2.rs:29:5
|
LL | {
| - because of this opening brace
Expand All @@ -79,7 +79,7 @@ LL | a
= note: if you intended to print `{`, you can escape it using `{{`

error: invalid format string: expected `'}'`, found `'b'`
--> $DIR/format-string-error-2.rs:36:5
--> $DIR/format-string-error-2.rs:35:5
|
LL | { \
| - because of this opening brace
Expand All @@ -90,7 +90,7 @@ LL | b");
= note: if you intended to print `{`, you can escape it using `{{`

error: invalid format string: expected `'}'`, found `'b'`
--> $DIR/format-string-error-2.rs:41:5
--> $DIR/format-string-error-2.rs:40:5
|
LL | { \
| - because of this opening brace
Expand All @@ -101,7 +101,7 @@ LL | b \
= note: if you intended to print `{`, you can escape it using `{{`

error: invalid format string: expected `'}'`, found `'\'`
--> $DIR/format-string-error-2.rs:46:8
--> $DIR/format-string-error-2.rs:45:8
|
LL | raw { \
| - ^ expected `}` in format string
Expand All @@ -111,7 +111,7 @@ LL | raw { \
= note: if you intended to print `{`, you can escape it using `{{`

error: invalid format string: expected `'}'`, found `'\'`
--> $DIR/format-string-error-2.rs:51:8
--> $DIR/format-string-error-2.rs:50:8
|
LL | raw { \n
| - ^ expected `}` in format string
Expand All @@ -121,7 +121,7 @@ LL | raw { \n
= note: if you intended to print `{`, you can escape it using `{{`

error: invalid format string: expected `'}'`, found `'e'`
--> $DIR/format-string-error-2.rs:58:5
--> $DIR/format-string-error-2.rs:57:5
|
LL | { \n
| - because of this opening brace
Expand All @@ -132,7 +132,7 @@ LL | e");
= note: if you intended to print `{`, you can escape it using `{{`

error: invalid format string: expected `'}'`, found `'a'`
--> $DIR/format-string-error-2.rs:68:5
--> $DIR/format-string-error-2.rs:67:5
|
LL | {
| - because of this opening brace
Expand All @@ -142,13 +142,13 @@ LL | asdf}
= note: if you intended to print `{`, you can escape it using `{{`

error: 1 positional argument in format string, but no arguments were given
--> $DIR/format-string-error-2.rs:71:17
--> $DIR/format-string-error-2.rs:70:17
|
LL | println!("\t{}");
| ^^

error: invalid format string: expected `'}'` but string was terminated
--> $DIR/format-string-error-2.rs:75:27
--> $DIR/format-string-error-2.rs:74:27
|
LL | println!("\x7B}\u{8} {", 1);
| -^ expected `'}'` in format string
Expand All @@ -158,15 +158,15 @@ LL | println!("\x7B}\u{8} {", 1);
= note: if you intended to print `{`, you can escape it using `{{`

error: invalid format string: unmatched `}` found
--> $DIR/format-string-error-2.rs:82:21
--> $DIR/format-string-error-2.rs:81:21
|
LL | println!(r#"\x7B}\u{8} {"#, 1);
| ^ unmatched `}` in format string
|
= note: if you intended to print `}`, you can escape it using `}}`

error: invalid format string: unmatched `}` found
--> $DIR/format-string-error-2.rs:85:21
--> $DIR/format-string-error-2.rs:84:21
|
LL | println!(r#"\x7B}\u8 {"#, 1);
| ^ unmatched `}` in format string
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/issues/issue-28433.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


enum Bird {
pub Duck,
//~^ ERROR unnecessary visibility qualifier
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/issues/issue-28433.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error: unnecessary visibility qualifier
--> $DIR/issue-28433.rs:4:5
--> $DIR/issue-28433.rs:2:5
|
LL | pub Duck,
| ^^^ `pub` not permitted here

error: unnecessary visibility qualifier
--> $DIR/issue-28433.rs:7:5
--> $DIR/issue-28433.rs:5:5
|
LL | pub(crate) Dove
| ^^^^^^^^^^ `pub` not permitted here
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/issues/issue-36638.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


struct Foo<Self>(Self);
//~^ ERROR expected identifier, found keyword `Self`
//~^^ ERROR E0392
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/issues/issue-36638.stderr
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
error: expected identifier, found keyword `Self`
--> $DIR/issue-36638.rs:3:12
--> $DIR/issue-36638.rs:1:12
|
LL | struct Foo<Self>(Self);
| ^^^^ expected identifier, found keyword

error: expected identifier, found keyword `Self`
--> $DIR/issue-36638.rs:7:11
--> $DIR/issue-36638.rs:5:11
|
LL | trait Bar<Self> {}
| ^^^^ expected identifier, found keyword

error[E0392]: parameter `Self` is never used
--> $DIR/issue-36638.rs:3:12
--> $DIR/issue-36638.rs:1:12
|
LL | struct Foo<Self>(Self);
| ^^^^ unused parameter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


// Test you can't use a higher-ranked trait bound inside of a qualified
// path (just won't parse).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: expected identifier, found keyword `for`
--> $DIR/associated-types-project-from-hrtb-explicit.rs:12:21
--> $DIR/associated-types-project-from-hrtb-explicit.rs:10:21
|
LL | fn foo2<I>(x: <I as for<'x> Foo<&'x isize>>::A)
| ^^^ expected identifier, found keyword
Expand All @@ -9,7 +9,7 @@ LL | fn foo2<I>(x: <I as r#for<'x> Foo<&'x isize>>::A)
| ^^^^^

error: expected one of `::` or `>`, found `Foo`
--> $DIR/associated-types-project-from-hrtb-explicit.rs:12:29
--> $DIR/associated-types-project-from-hrtb-explicit.rs:10:29
|
LL | fn foo2<I>(x: <I as for<'x> Foo<&'x isize>>::A)
| ^^^ expected one of `::` or `>` here
Expand Down
3 changes: 0 additions & 3 deletions src/test/ui/parser/bad-lit-suffixes.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@



extern
"C"suffix //~ ERROR suffixes on an ABI spec are invalid
fn foo() {}
Expand Down
32 changes: 16 additions & 16 deletions src/test/ui/parser/bad-lit-suffixes.stderr
Original file line number Diff line number Diff line change
@@ -1,109 +1,109 @@
error: suffixes on an ABI spec are invalid
--> $DIR/bad-lit-suffixes.rs:5:5
--> $DIR/bad-lit-suffixes.rs:2:5
|
LL | "C"suffix
| ^^^^^^^^^ invalid suffix `suffix`

error: suffixes on an ABI spec are invalid
--> $DIR/bad-lit-suffixes.rs:9:5
--> $DIR/bad-lit-suffixes.rs:6:5
|
LL | "C"suffix
| ^^^^^^^^^ invalid suffix `suffix`

error: suffixes on a string literal are invalid
--> $DIR/bad-lit-suffixes.rs:13:5
--> $DIR/bad-lit-suffixes.rs:10:5
|
LL | ""suffix;
| ^^^^^^^^ invalid suffix `suffix`

error: suffixes on a byte string literal are invalid
--> $DIR/bad-lit-suffixes.rs:14:5
--> $DIR/bad-lit-suffixes.rs:11:5
|
LL | b""suffix;
| ^^^^^^^^^ invalid suffix `suffix`

error: suffixes on a string literal are invalid
--> $DIR/bad-lit-suffixes.rs:15:5
--> $DIR/bad-lit-suffixes.rs:12:5
|
LL | r#""#suffix;
| ^^^^^^^^^^^ invalid suffix `suffix`

error: suffixes on a byte string literal are invalid
--> $DIR/bad-lit-suffixes.rs:16:5
--> $DIR/bad-lit-suffixes.rs:13:5
|
LL | br#""#suffix;
| ^^^^^^^^^^^^ invalid suffix `suffix`

error: suffixes on a char literal are invalid
--> $DIR/bad-lit-suffixes.rs:17:5
--> $DIR/bad-lit-suffixes.rs:14:5
|
LL | 'a'suffix;
| ^^^^^^^^^ invalid suffix `suffix`

error: suffixes on a byte literal are invalid
--> $DIR/bad-lit-suffixes.rs:18:5
--> $DIR/bad-lit-suffixes.rs:15:5
|
LL | b'a'suffix;
| ^^^^^^^^^^ invalid suffix `suffix`

error: invalid width `1024` for integer literal
--> $DIR/bad-lit-suffixes.rs:20:5
--> $DIR/bad-lit-suffixes.rs:17:5
|
LL | 1234u1024;
| ^^^^^^^^^
|
= help: valid widths are 8, 16, 32, 64 and 128

error: invalid width `1024` for integer literal
--> $DIR/bad-lit-suffixes.rs:21:5
--> $DIR/bad-lit-suffixes.rs:18:5
|
LL | 1234i1024;
| ^^^^^^^^^
|
= help: valid widths are 8, 16, 32, 64 and 128

error: invalid width `1024` for float literal
--> $DIR/bad-lit-suffixes.rs:22:5
--> $DIR/bad-lit-suffixes.rs:19:5
|
LL | 1234f1024;
| ^^^^^^^^^
|
= help: valid widths are 32 and 64

error: invalid width `1024` for float literal
--> $DIR/bad-lit-suffixes.rs:23:5
--> $DIR/bad-lit-suffixes.rs:20:5
|
LL | 1234.5f1024;
| ^^^^^^^^^^^
|
= help: valid widths are 32 and 64

error: invalid suffix `suffix` for integer literal
--> $DIR/bad-lit-suffixes.rs:25:5
--> $DIR/bad-lit-suffixes.rs:22:5
|
LL | 1234suffix;
| ^^^^^^^^^^ invalid suffix `suffix`
|
= help: the suffix must be one of the integral types (`u32`, `isize`, etc)

error: invalid suffix `suffix` for integer literal
--> $DIR/bad-lit-suffixes.rs:26:5
--> $DIR/bad-lit-suffixes.rs:23:5
|
LL | 0b101suffix;
| ^^^^^^^^^^^ invalid suffix `suffix`
|
= help: the suffix must be one of the integral types (`u32`, `isize`, etc)

error: invalid suffix `suffix` for float literal
--> $DIR/bad-lit-suffixes.rs:27:5
--> $DIR/bad-lit-suffixes.rs:24:5
|
LL | 1.0suffix;
| ^^^^^^^^^ invalid suffix `suffix`
|
= help: valid suffixes are `f32` and `f64`

error: invalid suffix `suffix` for float literal
--> $DIR/bad-lit-suffixes.rs:28:5
--> $DIR/bad-lit-suffixes.rs:25:5
|
LL | 1.0e10suffix;
| ^^^^^^^^^^^^ invalid suffix `suffix`
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/parser/doc-after-struct-field.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


struct X {
a: u8 /** document a */,
//~^ ERROR found a documentation comment that doesn't document anything
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/parser/doc-after-struct-field.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error[E0585]: found a documentation comment that doesn't document anything
--> $DIR/doc-after-struct-field.rs:4:11
--> $DIR/doc-after-struct-field.rs:2:11
|
LL | a: u8 /** document a */,
| ^^^^^^^^^^^^^^^^^
|
= help: doc comments must come before what they document, maybe a comment was intended with `//`?

error[E0585]: found a documentation comment that doesn't document anything
--> $DIR/doc-after-struct-field.rs:10:11
--> $DIR/doc-after-struct-field.rs:8:11
|
LL | a: u8 /// document a
| ^^^^^^^^^^^^^^
Expand Down
2 changes: 0 additions & 2 deletions src/test/ui/parser/doc-before-fn-rbrace.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


fn main() {
/// document
//~^ ERROR found a documentation comment that doesn't document anything
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/parser/doc-before-fn-rbrace.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0585]: found a documentation comment that doesn't document anything
--> $DIR/doc-before-fn-rbrace.rs:4:5
--> $DIR/doc-before-fn-rbrace.rs:2:5
|
LL | /// document
| ^^^^^^^^^^^^
Expand Down
Loading

0 comments on commit d6ea6b9

Please sign in to comment.