marking fn e as #[main]

This commit is contained in:
iosmanthus 2018-12-10 18:20:51 +08:00
parent 3a997f6258
commit fb1378ba87

9
e.rs
View File

@ -1,15 +1,14 @@
#![feature(main)]
#[cfg(feature = "functional")]
#[main]
fn e() {
std::iter::repeat('e').for_each(|e| print!("{}", e))
std::iter::repeat('e').for_each(|e| print!("{}", e));
}
#[cfg(not(feature = "functional"))]
#[main]
fn e() -> ! {
loop {
print!("e");
}
}
fn main() {
e();
}