You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use fehler::throws;use std::io::Error;fnno_warning() -> Result<(),Error>{loop{returnOk(());}}#[throws]fnunexpected_warning(){loop{return;}}fnmain(){no_warning().unwrap();unexpected_warning().unwrap();}
Gives this warning:
warning: unreachable expression
--> src/main.rs:10:1
|
10 | #[throws]
| ^^^^^^^^^ unreachable expression
11 | fn unexpected_warning() {
12 | / loop {
13 | | return;
14 | | }
| |_____- any code following this expression is unreachable
|
= note: `#[warn(unreachable_code)]` on by default
= note: this warning originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
Example code:
Gives this warning:
The text was updated successfully, but these errors were encountered: