Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions tests/ui/consts/const-block-const-bound.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//@ known-bug: #103507

#![allow(unused)]
#![feature(const_trait_impl, negative_impls, const_destruct)]

Expand All @@ -16,6 +14,6 @@ impl Drop for UnconstDrop {
fn main() {
const {
f(UnconstDrop);
//FIXME ~^ ERROR can't drop
//~^ ERROR trait bound `UnconstDrop: const Destruct` is not satisfied
}
}
4 changes: 2 additions & 2 deletions tests/ui/consts/const-block-const-bound.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error[E0277]: the trait bound `UnconstDrop: const Destruct` is not satisfied
--> $DIR/const-block-const-bound.rs:18:11
--> $DIR/const-block-const-bound.rs:16:11
|
LL | f(UnconstDrop);
| - ^^^^^^^^^^^
| |
| required by a bound introduced by this call
|
note: required by a bound in `f`
--> $DIR/const-block-const-bound.rs:8:15
--> $DIR/const-block-const-bound.rs:6:15
|
LL | const fn f<T: ~const Destruct>(x: T) {}
| ^^^^^^ required by this bound in `f`
Expand Down
6 changes: 1 addition & 5 deletions tests/ui/consts/issue-94675.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//@ known-bug: #103507

#![feature(const_trait_impl, const_vec_string_slice)]

struct Foo<'a> {
Expand All @@ -9,9 +7,7 @@ struct Foo<'a> {
impl<'a> Foo<'a> {
const fn spam(&mut self, baz: &mut Vec<u32>) {
self.bar[0] = baz.len();
//FIXME ~^ ERROR: cannot call
//FIXME ~| ERROR: cannot call
//FIXME ~| ERROR: the trait bound
//~^ ERROR: cannot call
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/consts/issue-94675.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0015]: cannot call non-const operator in constant functions
--> $DIR/issue-94675.rs:11:17
--> $DIR/issue-94675.rs:9:17
|
LL | self.bar[0] = baz.len();
| ^^^
Expand Down
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
Loading