Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bless test outupt
  • Loading branch information
ecstatic-morse committed Oct 6, 2020
1 parent 7a0c66b commit 2e412fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
5 changes: 2 additions & 3 deletions src/test/ui/consts/min_const_fn/min_const_fn_impl_trait.rs
@@ -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() {}
16 changes: 8 additions & 8 deletions src/test/ui/consts/min_const_fn/min_const_fn_impl_trait.stderr
@@ -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`.

0 comments on commit 2e412fc

Please sign in to comment.