File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/test/ui/consts/min_const_fn Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1+ // gate-test-const_fn_impl_trait
2+
13struct AlanTuring < T > ( T ) ;
24const fn no_rpit2 ( ) -> AlanTuring < impl std:: fmt:: Debug > { //~ `impl Trait`
35 AlanTuring ( 0 )
Original file line number Diff line number Diff line change 11error[E0658]: `impl Trait` is not allowed in constant functions
2- --> $DIR/min_const_fn_impl_trait.rs:2 :24
2+ --> $DIR/min_const_fn_impl_trait.rs:4 :24
33 |
44LL | const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> {
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> {
88 = help: add `#![feature(const_fn_impl_trait)]` to the crate attributes to enable
99
1010error[E0658]: `impl Trait` is not allowed in constant functions
11- --> $DIR/min_const_fn_impl_trait.rs:6 :23
11+ --> $DIR/min_const_fn_impl_trait.rs:8 :23
1212 |
1313LL | const fn no_rpit() -> impl std::fmt::Debug {}
1414 | ^^^^^^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments