Bless test outupt

This commit is contained in:
Dylan MacKenzie 2020-10-02 12:12:57 -07:00
parent 7a0c66bad1
commit 2e412fc8e4
2 changed files with 10 additions and 11 deletions

View File

@ -1,9 +1,8 @@
struct AlanTuring<T>(T);
const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> {
//~^ ERROR `impl Trait` in const fn is unstable
const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> { //~ `impl Trait`
AlanTuring(0)
}
const fn no_rpit() -> impl std::fmt::Debug {} //~ ERROR `impl Trait` in const fn is unstable
const fn no_rpit() -> impl std::fmt::Debug {} //~ `impl Trait`
fn main() {}

View File

@ -1,21 +1,21 @@
error[E0723]: `impl Trait` in const fn is unstable
error[E0658]: `impl Trait` is not allowed in constant functions
--> $DIR/min_const_fn_impl_trait.rs:2:24
|
LL | const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
= help: add `#![feature(const_fn)]` to the crate attributes to enable
= note: see issue #77463 <https://github.com/rust-lang/rust/issues/77463> for more information
= help: add `#![feature(const_fn_impl_trait)]` to the crate attributes to enable
error[E0723]: `impl Trait` in const fn is unstable
--> $DIR/min_const_fn_impl_trait.rs:7:23
error[E0658]: `impl Trait` is not allowed in constant functions
--> $DIR/min_const_fn_impl_trait.rs:6:23
|
LL | const fn no_rpit() -> impl std::fmt::Debug {}
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
= help: add `#![feature(const_fn)]` to the crate attributes to enable
= note: see issue #77463 <https://github.com/rust-lang/rust/issues/77463> for more information
= help: add `#![feature(const_fn_impl_trait)]` to the crate attributes to enable
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0723`.
For more information about this error, try `rustc --explain E0658`.