atom-community / atom-community/atom-script
Unable to run rust files begin with #![...]
- Dominant language
- JavaScript
- Stars
- 730
- Forks
- 264
- PR merge metrics
- No merged PRs in 30d
Description
A rust file usually begin with #![...]. But script can run it.
Here is my case:
```
#![feature(fnbox)]
use std::boxed::FnBox;
// Return a closure taking no inputs and returning nothing
// which implements `FnBox` (capture by value).
fn create_fn() -> Box {
let text = "Fn".to_owned();
Box::new(move || println!("This is a: {}", text))
}
fn create_fnmut() -> Box {
let text = "FnMut".to_owned();
Box::new(move || println!("This is a: {}", text))
}
fn create_fnbox() -> Box {
let text = "FnBox".to_owned();
Box::new(move || println!("This is a: {}", text))
}
fn main() {
let fn_plain = create_fn();
let mut fn_mut = create_fnmut();
let fn_box = create_fnbox();
fn_plain();
fn_mut();
fn_box();
}
```
Script reports that:
```
Unable to run
[feature(fnbox)]
Is it in your PATH?
...
```
Contributor guide
Assessment
This issue has not been assessed yet.