File tree 2 files changed +4
-2
lines changed
src/test/ui/consts/min_const_fn
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
+
1
3
struct AlanTuring < T > ( T ) ;
2
4
const fn no_rpit2 ( ) -> AlanTuring < impl std:: fmt:: Debug > { //~ `impl Trait`
3
5
AlanTuring ( 0 )
Original file line number Diff line number Diff line change 1
1
error[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
3
3
|
4
4
LL | const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> {
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> {
8
8
= help: add `#![feature(const_fn_impl_trait)]` to the crate attributes to enable
9
9
10
10
error[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
12
12
|
13
13
LL | const fn no_rpit() -> impl std::fmt::Debug {}
14
14
| ^^^^^^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments