--- /dev/null
+warning: unnecessary trailing semicolons
+ --> $DIR/block-expr-precedence.rs:60:21
+ |
+LL | if (true) { 12; };;; -num;
+ | ^^ help: remove these semicolons
+ |
+ = note: `#[warn(redundant_semicolon)]` on by default
+
LL | if not // lack of braces is [sic]
| -- this `if` statement has a condition, but no block
LL | println!("Then when?");
- | ^ expected `{`
+ | ^
+ | |
+ | expected `{`
+ | help: try placing this code inside a block: `{ ; }`
error: unexpected `2` after identifier
--> $DIR/issue-46836-identifier-not-instead-of-negation.rs:26:24
//~^ ERROR found a documentation comment that doesn't document anything
//~| HELP maybe a comment was intended
;
+ //~^ WARNING unnecessary trailing semicolon
+ //~| HELP remove this semicolon
}
|
= help: doc comments must come before what they document, maybe a comment was intended with `//`?
+warning: unnecessary trailing semicolon
+ --> $DIR/doc-before-semi.rs:5:5
+ |
+LL | ;
+ | ^ help: remove this semicolon
+ |
+ = note: `#[warn(redundant_semicolon)]` on by default
+
error: aborting due to previous error
For more information about this error, try `rustc --explain E0585`.
#[recollect_attr]
fn a() {
- let x: usize = "hello";;;;; //~ ERROR mismatched types
+ let x: usize = "hello"; //~ ERROR mismatched types
}
#[recollect_attr]
error[E0308]: mismatched types
--> $DIR/span-preservation.rs:12:20
|
-LL | let x: usize = "hello";;;;;
+LL | let x: usize = "hello";
| ^^^^^^^ expected usize, found reference
|
= note: expected type `usize`