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
warning: unreachable expression
--> src/main.rs:5:5
|
5 | unreachable!()
| ^^^^^^^^^^^^^^
|
= note: #[warn(unreachable_code)] on by default
= note: this error originates in a macro outside of the current crate
I'm using a recent nightly and it works this way with 1.21 stable rustc too.
The text was updated successfully, but these errors were encountered:
Hi, I don't think this is a bug — the compiler knows that code after the loop is unreachable. The compiler has warned the same way since (at least) Rust 1.0 for this. You can safely remove the unreachable!() macro.
If you find a warning that doesn't make sense, or where following the logical implication of the warning leads to code that doesn't compile, then please file a bug for that. Thanks!
Hi, i'm not really sure if this is a bug, but the following code:
emits
I'm using a recent nightly and it works this way with 1.21 stable rustc too.
The text was updated successfully, but these errors were encountered: