Skip to content

Commit

Permalink
Rollup merge of rust-lang#99332 - jyn514:stabilize-label-break-value,…
Browse files Browse the repository at this point in the history
… r=petrochenkov

Stabilize `#![feature(label_break_value)]`

See the stabilization report in rust-lang#48594 (comment).
  • Loading branch information
JohnTitor authored Aug 24, 2022
2 parents 06d7119 + 345c42a commit 2cdc54d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion tests/ui/semicolon_if_nothing_returned.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![warn(clippy::semicolon_if_nothing_returned)]
#![allow(clippy::redundant_closure)]
#![feature(label_break_value)]
#![feature(let_else)]

fn get_unit() {}
Expand Down
10 changes: 5 additions & 5 deletions tests/ui/semicolon_if_nothing_returned.stderr
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
error: consider adding a `;` to the last statement for consistent formatting
--> $DIR/semicolon_if_nothing_returned.rs:10:5
--> $DIR/semicolon_if_nothing_returned.rs:9:5
|
LL | println!("Hello")
| ^^^^^^^^^^^^^^^^^ help: add a `;` here: `println!("Hello");`
|
= note: `-D clippy::semicolon-if-nothing-returned` implied by `-D warnings`

error: consider adding a `;` to the last statement for consistent formatting
--> $DIR/semicolon_if_nothing_returned.rs:14:5
--> $DIR/semicolon_if_nothing_returned.rs:13:5
|
LL | get_unit()
| ^^^^^^^^^^ help: add a `;` here: `get_unit();`

error: consider adding a `;` to the last statement for consistent formatting
--> $DIR/semicolon_if_nothing_returned.rs:19:5
--> $DIR/semicolon_if_nothing_returned.rs:18:5
|
LL | y = x + 1
| ^^^^^^^^^ help: add a `;` here: `y = x + 1;`

error: consider adding a `;` to the last statement for consistent formatting
--> $DIR/semicolon_if_nothing_returned.rs:25:9
--> $DIR/semicolon_if_nothing_returned.rs:24:9
|
LL | hello()
| ^^^^^^^ help: add a `;` here: `hello();`

error: consider adding a `;` to the last statement for consistent formatting
--> $DIR/semicolon_if_nothing_returned.rs:36:9
--> $DIR/semicolon_if_nothing_returned.rs:35:9
|
LL | ptr::drop_in_place(s.as_mut_ptr())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `ptr::drop_in_place(s.as_mut_ptr());`
Expand Down

0 comments on commit 2cdc54d

Please sign in to comment.