File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed
src/test/ui/consts/min_const_fn Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 11struct AlanTuring < T > ( T ) ;
2- const fn no_rpit2 ( ) -> AlanTuring < impl std:: fmt:: Debug > {
3- //~^ ERROR `impl Trait` in const fn is unstable
2+ const fn no_rpit2 ( ) -> AlanTuring < impl std:: fmt:: Debug > { //~ `impl Trait`
43 AlanTuring ( 0 )
54}
65
7- const fn no_rpit ( ) -> impl std:: fmt:: Debug { } //~ ERROR `impl Trait` in const fn is unstable
6+ const fn no_rpit ( ) -> impl std:: fmt:: Debug { } //~ `impl Trait`
87
98fn main ( ) { }
Original file line number Diff line number Diff line change 1- error[E0723 ]: `impl Trait` in const fn is unstable
1+ error[E0658 ]: `impl Trait` is not allowed in constant functions
22 --> $DIR/min_const_fn_impl_trait.rs:2:24
33 |
44LL | const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> {
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66 |
7- = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563 > for more information
8- = help: add `#![feature(const_fn )]` to the crate attributes to enable
7+ = note: see issue #77463 <https://github.com/rust-lang/rust/issues/77463 > for more information
8+ = help: add `#![feature(const_fn_impl_trait )]` to the crate attributes to enable
99
10- error[E0723 ]: `impl Trait` in const fn is unstable
11- --> $DIR/min_const_fn_impl_trait.rs:7 :23
10+ error[E0658 ]: `impl Trait` is not allowed in constant functions
11+ --> $DIR/min_const_fn_impl_trait.rs:6 :23
1212 |
1313LL | const fn no_rpit() -> impl std::fmt::Debug {}
1414 | ^^^^^^^^^^^^^^^^^^^^
1515 |
16- = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563 > for more information
17- = help: add `#![feature(const_fn )]` to the crate attributes to enable
16+ = note: see issue #77463 <https://github.com/rust-lang/rust/issues/77463 > for more information
17+ = help: add `#![feature(const_fn_impl_trait )]` to the crate attributes to enable
1818
1919error: aborting due to 2 previous errors
2020
21- For more information about this error, try `rustc --explain E0723 `.
21+ For more information about this error, try `rustc --explain E0658 `.
You can’t perform that action at this time.
0 commit comments