Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74005b7
commit f2c8b9a
Showing
4 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -321,6 +321,7 @@ fn transform_block( | |
#(#stmts)* | ||
}; | ||
|
||
#[allow(unreachable_code)] | ||
__ret | ||
}) | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#![deny(warnings)] | ||
|
||
use async_trait::async_trait; | ||
|
||
#[async_trait] | ||
pub trait Trait { | ||
async fn f() { | ||
unimplemented!() | ||
} | ||
} | ||
|
||
#[async_trait] | ||
pub trait TraitFoo { | ||
async fn f() { | ||
let y = unimplemented!(); | ||
let z = y; | ||
} | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: unreachable statement | ||
--> $DIR/unreachable.rs:16:9 | ||
| | ||
15 | let y = unimplemented!(); | ||
| ---------------- any code following this expression is unreachable | ||
16 | let z = y; | ||
| ^^^^^^^^^^ unreachable statement | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/unreachable.rs:1:9 | ||
| | ||
1 | #![deny(warnings)] | ||
| ^^^^^^^^ | ||
= note: `#[deny(unreachable_code)]` implied by `#[deny(warnings)]` |