Commit 0922c19 1 parent 620fead commit 0922c19 Copy full SHA for 0922c19
File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
- //@ known-bug: #103507
1
+ //! This is a regression test for <https://github.com/rust-lang/rust/issues/103507>.
2
+ //@ known-bug: #110395
2
3
3
4
#![ feature( type_alias_impl_trait) ]
4
5
#![ feature( const_trait_impl, const_destruct) ]
Original file line number Diff line number Diff line change 1
1
error: `~const` can only be applied to `#[const_trait]` traits
2
- --> $DIR/normalize-tait-in-const.rs:26 :35
2
+ --> $DIR/normalize-tait-in-const.rs:27 :35
3
3
|
4
4
LL | const fn with_positive<F: for<'a> ~const Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) {
5
5
| ^^^^^^ can't be applied to `Fn`
@@ -8,7 +8,7 @@ note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_
8
8
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
9
9
10
10
error: `~const` can only be applied to `#[const_trait]` traits
11
- --> $DIR/normalize-tait-in-const.rs:26 :35
11
+ --> $DIR/normalize-tait-in-const.rs:27 :35
12
12
|
13
13
LL | const fn with_positive<F: for<'a> ~const Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) {
14
14
| ^^^^^^ can't be applied to `Fn`
@@ -18,7 +18,7 @@ note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_
18
18
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
19
19
20
20
error[E0015]: cannot call non-const closure in constant functions
21
- --> $DIR/normalize-tait-in-const.rs:27 :5
21
+ --> $DIR/normalize-tait-in-const.rs:28 :5
22
22
|
23
23
LL | fun(filter_positive());
24
24
| ^^^^^^^^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments