Skip to content

Commit 7ad30cc

Browse files
committed
Some const_trait_impl test cleanups
1 parent cdac44e commit 7ad30cc

File tree

5 files changed

+4
-12
lines changed

5 files changed

+4
-12
lines changed

tests/ui/traits/const-traits/const-drop.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ impl<'a> const Drop for S<'a> {
1717
}
1818

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

2221
const fn b() -> u8 {
2322
let mut c = 0;
2423
let _ = S(&mut c);
25-
//FIXME ~^ ERROR destructor of
2624
a(S(&mut c));
2725
c
2826
}

tests/ui/traits/const-traits/issue-102985.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
//@ known-bug: #110395
21
#![feature(const_trait_impl)]
32

43
struct Bug {
54
inner: [(); match || 1 {
65
n => n(),
7-
//FIXME ~^ ERROR the trait bound
8-
//FIXME ~| ERROR the trait bound
9-
//FIXME ~| ERROR cannot call non-const closure in constants
6+
//~^ ERROR cannot call non-const closure in constants
107
}],
118
}
129

tests/ui/traits/const-traits/issue-102985.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0015]: cannot call non-const closure in constants
2-
--> $DIR/issue-102985.rs:6:14
2+
--> $DIR/issue-102985.rs:5:14
33
|
44
LL | n => n(),
55
| ^^^
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//@ known-bug: #110395
2-
31
#![feature(const_trait_impl)]
42

53
pub trait A {
@@ -8,8 +6,7 @@ pub trait A {
86

97
pub const fn foo<T: A>() -> bool {
108
T::assoc()
11-
//FIXME ~^ ERROR the trait bound
12-
//FIXME ~| ERROR cannot call non-const function
9+
//~^ ERROR cannot call non-const associated function
1310
}
1411

1512
fn main() {}

tests/ui/traits/const-traits/issue-88155.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0015]: cannot call non-const associated function `<T as A>::assoc` in constant functions
2-
--> $DIR/issue-88155.rs:10:5
2+
--> $DIR/issue-88155.rs:8:5
33
|
44
LL | T::assoc()
55
| ^^^^^^^^^^

0 commit comments

Comments
 (0)