Skip to content

Commit

Permalink
remove some known-bug that do not seem to make sense
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jan 15, 2025
1 parent 93ba568 commit 620fead
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
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

0 comments on commit 620fead

Please sign in to comment.