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
When I run it locally, I get a "hi", but playground says
Compiling playground v0.0.1 (/playground)
warning: function is never used: `a`
--> src/lib.rs:6:1
|
6 | fn a() {
| ^^^^^^
|
= note: #[warn(dead_code)] on by default
Finished dev [unoptimized + debuginfo] target(s) in 1.43s
Warnings
No main function was detected, so your code was compiled
but not run. If you'd like to execute your code, please
add a main function.
Yes, the automatic detection of whether to run cargo run / cargo build / cargo test is based on a simple regex match. You don't have fn main() so the regex isn't triggered. You need to expressly request to run the code:
You'll note that the button says "build" not "run" before you do this.
When I run it locally, I get a "hi", but playground says
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=7ff692f07c7c3562df289936dbc97eda
The text was updated successfully, but these errors were encountered: