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
2 changes: 0 additions & 2 deletions tests/ui/traits/const-traits/const-drop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ impl<'a> const Drop for S<'a> {
}

const fn a<T: [const] Destruct>(_: T) {}
//FIXME ~^ ERROR destructor of

const fn b() -> u8 {
let mut c = 0;
let _ = S(&mut c);
//FIXME ~^ ERROR destructor of
a(S(&mut c));
c
}
Expand Down
5 changes: 1 addition & 4 deletions tests/ui/traits/const-traits/issue-102985.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
//@ known-bug: #110395
#![feature(const_trait_impl)]

struct Bug {
inner: [(); match || 1 {
n => n(),
//FIXME ~^ ERROR the trait bound
//FIXME ~| ERROR the trait bound
//FIXME ~| ERROR cannot call non-const closure in constants
//~^ ERROR cannot call non-const closure in constants
}],
}

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/traits/const-traits/issue-102985.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0015]: cannot call non-const closure in constants
--> $DIR/issue-102985.rs:6:14
--> $DIR/issue-102985.rs:5:14
|
LL | n => n(),
| ^^^
Expand Down
5 changes: 1 addition & 4 deletions tests/ui/traits/const-traits/issue-88155.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//@ known-bug: #110395

#![feature(const_trait_impl)]

pub trait A {
Expand All @@ -8,8 +6,7 @@ pub trait A {

pub const fn foo<T: A>() -> bool {
T::assoc()
//FIXME ~^ ERROR the trait bound
//FIXME ~| ERROR cannot call non-const function
//~^ ERROR cannot call non-const associated function
}

fn main() {}
2 changes: 1 addition & 1 deletion tests/ui/traits/const-traits/issue-88155.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0015]: cannot call non-const associated function `<T as A>::assoc` in constant functions
--> $DIR/issue-88155.rs:10:5
--> $DIR/issue-88155.rs:8:5
|
LL | T::assoc()
| ^^^^^^^^^^
Expand Down
Loading