Skip to content

does not support #![feature(main)] #503

Closed
@matthiaskrgr

Description

@matthiaskrgr
#![feature(main)]

#[main]
fn a() {
    println!("hi");
}

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.

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=7ff692f07c7c3562df289936dbc97eda

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions