1 #![unstable(feature = "humans",
2 reason = "who ever let humans program computers,
3 we're apparently really bad at it",
7 #![feature(staged_api)]
9 #[stable(feature = "rust1", since = "1.0.0")]
10 #[rustc_const_unstable(feature="foo", issue = "none")]
11 const fn foo() -> u32 { 42 }
13 fn meh() -> u32 { 42 }
15 const fn bar() -> u32 { foo() } //~ ERROR `foo` is not yet stable as a const fn
18 let _: &'static u32 = &foo(); //~ ERROR temporary value dropped while borrowed
22 let _: &'static u32 = &meh(); //~ ERROR temporary value dropped while borrowed
23 let x: &'static _ = &std::time::Duration::from_millis(42).subsec_millis();
24 //~^ ERROR temporary value dropped while borrowed