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
A warning noting that a panic would occur (either showing the line of the todo! or the line of the function call making use of the todo!, for instance). I suppose even fancier ergonomics could be added, so that if the return type is (), a () could could be supplied - but this is still not good IMO, since that implies an effect should happen, but isn't happening. So even in that case, I think a warning should be given.
Instead, this happened:
Currently (nightly) rustc will not warn if some_num is used, e.g., from main: println!("{}", some_num()); - this will compile without warning, but will panic:
$ ./target/debug/sfwtools
thread 'main' panicked at 'not yet implemented', src/sfwtools.rs:63:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I tried this code:
I expected to see this happen:
A warning noting that a panic would occur (either showing the line of the todo! or the line of the function call making use of the todo!, for instance). I suppose even fancier ergonomics could be added, so that if the return type is (), a () could could be supplied - but this is still not good IMO, since that implies an effect should happen, but isn't happening. So even in that case, I think a warning should be given.
Instead, this happened:
Currently (nightly)
rustc
will not warn if some_num is used, e.g., frommain
:println!("{}", some_num());
- this will compile without warning, but will panic:Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: