File tree Expand file tree Collapse file tree 5 files changed +4
-12
lines changed
tests/ui/traits/const-traits Expand file tree Collapse file tree 5 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,10 @@ impl<'a> const Drop for S<'a> {
17
17
}
18
18
19
19
const fn a < T : [ const ] Destruct > ( _: T ) { }
20
- //FIXME ~^ ERROR destructor of
21
20
22
21
const fn b ( ) -> u8 {
23
22
let mut c = 0 ;
24
23
let _ = S ( & mut c) ;
25
- //FIXME ~^ ERROR destructor of
26
24
a ( S ( & mut c) ) ;
27
25
c
28
26
}
Original file line number Diff line number Diff line change 1
- //@ known-bug: #110395
2
1
#![ feature( const_trait_impl) ]
3
2
4
3
struct Bug {
5
4
inner : [ ( ) ; match || 1 {
6
5
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
10
7
} ] ,
11
8
}
12
9
Original file line number Diff line number Diff line change 1
1
error[E0015]: cannot call non-const closure in constants
2
- --> $DIR/issue-102985.rs:6 :14
2
+ --> $DIR/issue-102985.rs:5 :14
3
3
|
4
4
LL | n => n(),
5
5
| ^^^
Original file line number Diff line number Diff line change 1
- //@ known-bug: #110395
2
-
3
1
#![ feature( const_trait_impl) ]
4
2
5
3
pub trait A {
@@ -8,8 +6,7 @@ pub trait A {
8
6
9
7
pub const fn foo < T : A > ( ) -> bool {
10
8
T :: assoc ( )
11
- //FIXME ~^ ERROR the trait bound
12
- //FIXME ~| ERROR cannot call non-const function
9
+ //~^ ERROR cannot call non-const associated function
13
10
}
14
11
15
12
fn main ( ) { }
Original file line number Diff line number Diff line change 1
1
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
3
3
|
4
4
LL | T::assoc()
5
5
| ^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments