Skip to content

Commit

Permalink
fix known-bug link in normalize-tait-in-const
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jan 15, 2025
1 parent 620fead commit 0922c19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion tests/ui/impl-trait/normalize-tait-in-const.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//@ known-bug: #103507
//! This is a regression test for <https://github.com/rust-lang/rust/issues/103507>.
//@ known-bug: #110395

#![feature(type_alias_impl_trait)]
#![feature(const_trait_impl, const_destruct)]
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/impl-trait/normalize-tait-in-const.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/normalize-tait-in-const.rs:26:35
--> $DIR/normalize-tait-in-const.rs:27:35
|
LL | const fn with_positive<F: for<'a> ~const Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) {
| ^^^^^^ can't be applied to `Fn`
Expand All @@ -8,7 +8,7 @@ note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_
--> $SRC_DIR/core/src/ops/function.rs:LL:COL

error: `~const` can only be applied to `#[const_trait]` traits
--> $DIR/normalize-tait-in-const.rs:26:35
--> $DIR/normalize-tait-in-const.rs:27:35
|
LL | const fn with_positive<F: for<'a> ~const Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) {
| ^^^^^^ can't be applied to `Fn`
Expand All @@ -18,7 +18,7 @@ note: `Fn` can't be used with `~const` because it isn't annotated with `#[const_
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0015]: cannot call non-const closure in constant functions
--> $DIR/normalize-tait-in-const.rs:27:5
--> $DIR/normalize-tait-in-const.rs:28:5
|
LL | fun(filter_positive());
| ^^^^^^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit 0922c19

Please sign in to comment.