Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Bless test outupt
- Loading branch information
1 parent
7a0c66b
commit 2e412fc
Showing
2 changed files
with
10 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
16
src/test/ui/consts/min_const_fn/min_const_fn_impl_trait.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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`. |