| error[E0493]: destructors cannot be evaluated at compile-time |
| --> $DIR/min_const_fn.rs:37:25 |
| | |
| LL | const fn into_inner(self) -> T { self.0 } |
| | ^^^^ constant functions cannot evaluate destructors |
| |
| error[E0723]: mutable references in const fn are unstable |
| --> $DIR/min_const_fn.rs:39:36 |
| | |
| LL | const fn get_mut(&mut self) -> &mut T { &mut self.0 } |
| | ^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0493]: destructors cannot be evaluated at compile-time |
| --> $DIR/min_const_fn.rs:44:28 |
| | |
| LL | const fn into_inner_lt(self) -> T { self.0 } |
| | ^^^^ constant functions cannot evaluate destructors |
| |
| error[E0723]: mutable references in const fn are unstable |
| --> $DIR/min_const_fn.rs:46:42 |
| | |
| LL | const fn get_mut_lt(&'a mut self) -> &mut T { &mut self.0 } |
| | ^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0493]: destructors cannot be evaluated at compile-time |
| --> $DIR/min_const_fn.rs:51:27 |
| | |
| LL | const fn into_inner_s(self) -> T { self.0 } |
| | ^^^^ constant functions cannot evaluate destructors |
| |
| error[E0723]: mutable references in const fn are unstable |
| --> $DIR/min_const_fn.rs:53:38 |
| | |
| LL | const fn get_mut_s(&mut self) -> &mut T { &mut self.0 } |
| | ^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: mutable references in const fn are unstable |
| --> $DIR/min_const_fn.rs:58:39 |
| | |
| LL | const fn get_mut_sq(&mut self) -> &mut T { &mut self.0 } |
| | ^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable |
| --> $DIR/min_const_fn.rs:76:16 |
| | |
| LL | const fn foo11<T: std::fmt::Display>(t: T) -> T { t } |
| | ^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable |
| --> $DIR/min_const_fn.rs:78:18 |
| | |
| LL | const fn foo11_2<T: Send>(t: T) -> T { t } |
| | ^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: only int, `bool` and `char` operations are stable in const fn |
| --> $DIR/min_const_fn.rs:80:33 |
| | |
| LL | const fn foo19(f: f32) -> f32 { f * 2.0 } |
| | ^^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: only int, `bool` and `char` operations are stable in const fn |
| --> $DIR/min_const_fn.rs:82:35 |
| | |
| LL | const fn foo19_2(f: f32) -> f32 { 2.0 - f } |
| | ^^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: only int and `bool` operations are stable in const fn |
| --> $DIR/min_const_fn.rs:84:35 |
| | |
| LL | const fn foo19_3(f: f32) -> f32 { -f } |
| | ^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: only int, `bool` and `char` operations are stable in const fn |
| --> $DIR/min_const_fn.rs:86:43 |
| | |
| LL | const fn foo19_4(f: f32, g: f32) -> f32 { f / g } |
| | ^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: cannot access `static` items in const fn |
| --> $DIR/min_const_fn.rs:90:27 |
| | |
| LL | const fn foo25() -> u32 { BAR } |
| | ^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: cannot access `static` items in const fn |
| --> $DIR/min_const_fn.rs:91:36 |
| | |
| LL | const fn foo26() -> &'static u32 { &BAR } |
| | ^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: casting pointers to ints is unstable in const fn |
| --> $DIR/min_const_fn.rs:92:42 |
| | |
| LL | const fn foo30(x: *const u32) -> usize { x as usize } |
| | ^^^^^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: casting pointers to ints is unstable in const fn |
| --> $DIR/min_const_fn.rs:94:63 |
| | |
| LL | const fn foo30_with_unsafe(x: *const u32) -> usize { unsafe { x as usize } } |
| | ^^^^^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: casting pointers to ints is unstable in const fn |
| --> $DIR/min_const_fn.rs:96:42 |
| | |
| LL | const fn foo30_2(x: *mut u32) -> usize { x as usize } |
| | ^^^^^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: casting pointers to ints is unstable in const fn |
| --> $DIR/min_const_fn.rs:98:63 |
| | |
| LL | const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize } } |
| | ^^^^^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: loops and conditional expressions are not stable in const fn |
| --> $DIR/min_const_fn.rs:100:38 |
| | |
| LL | const fn foo30_4(b: bool) -> usize { if b { 1 } else { 42 } } |
| | ^^^^^^^^^^^^^^^^^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: loops are not allowed in const fn |
| --> $DIR/min_const_fn.rs:102:29 |
| | |
| LL | const fn foo30_5(b: bool) { while b { } } |
| | ^^^^^^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: loops and conditional expressions are not stable in const fn |
| --> $DIR/min_const_fn.rs:105:44 |
| | |
| LL | const fn foo36(a: bool, b: bool) -> bool { a && b } |
| | ^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: loops and conditional expressions are not stable in const fn |
| --> $DIR/min_const_fn.rs:107:44 |
| | |
| LL | const fn foo37(a: bool, b: bool) -> bool { a || b } |
| | ^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: mutable references in const fn are unstable |
| --> $DIR/min_const_fn.rs:109:14 |
| | |
| LL | const fn inc(x: &mut i32) { *x += 1 } |
| | ^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable |
| --> $DIR/min_const_fn.rs:114:6 |
| | |
| LL | impl<T: std::fmt::Debug> Foo<T> { |
| | ^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable |
| --> $DIR/min_const_fn.rs:119:6 |
| | |
| LL | impl<T: std::fmt::Debug + Sized> Foo<T> { |
| | ^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable |
| --> $DIR/min_const_fn.rs:124:6 |
| | |
| LL | impl<T: Sync + Sized> Foo<T> { |
| | ^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: `impl Trait` in const fn is unstable |
| --> $DIR/min_const_fn.rs:130:24 |
| | |
| LL | const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> { AlanTuring(0) } |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable |
| --> $DIR/min_const_fn.rs:132:34 |
| | |
| LL | const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {} |
| | ^^^^^^^^^^^^^^^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable |
| --> $DIR/min_const_fn.rs:134:22 |
| | |
| LL | const fn no_apit(_x: impl std::fmt::Debug) {} |
| | ^^^^^^^^^^^^^^^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: `impl Trait` in const fn is unstable |
| --> $DIR/min_const_fn.rs:135:23 |
| | |
| LL | const fn no_rpit() -> impl std::fmt::Debug {} |
| | ^^^^^^^^^^^^^^^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable |
| --> $DIR/min_const_fn.rs:136:23 |
| | |
| LL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {} |
| | ^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable |
| --> $DIR/min_const_fn.rs:137:32 |
| | |
| LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() } |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0515]: cannot return reference to temporary value |
| --> $DIR/min_const_fn.rs:137:63 |
| | |
| LL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() } |
| | ^-- |
| | || |
| | |temporary value created here |
| | returns a reference to data owned by the current function |
| |
| error[E0723]: trait bounds other than `Sized` on const fn parameters are unstable |
| --> $DIR/min_const_fn.rs:143:41 |
| | |
| LL | const fn really_no_traits_i_mean_it() { (&() as &dyn std::fmt::Debug, ()).1 } |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: function pointers in const fn are unstable |
| --> $DIR/min_const_fn.rs:146:21 |
| | |
| LL | const fn no_fn_ptrs(_x: fn()) {} |
| | ^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error[E0723]: function pointers in const fn are unstable |
| --> $DIR/min_const_fn.rs:148:27 |
| | |
| LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo } |
| | ^^^^ |
| | |
| = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563 |
| = help: add `#![feature(const_fn)]` to the crate attributes to enable |
| |
| error: aborting due to 37 previous errors |
| |
| Some errors have detailed explanations: E0493, E0515, E0723. |
| For more information about an error, try `rustc --explain E0493`. |