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> {
1717}
1818
1919const fn a < T : [ const ] Destruct > ( _: T ) { }
20- //FIXME ~^ ERROR destructor of
2120
2221const 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}
Original file line number Diff line number Diff line change 1- //@ known-bug: #110395
21#![ feature( const_trait_impl) ]
32
43struct 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
Original file line number Diff line number Diff line change 11error[E0015]: cannot call non-const closure in constants
2- --> $DIR/issue-102985.rs:6 :14
2+ --> $DIR/issue-102985.rs:5 :14
33 |
44LL | n => n(),
55 | ^^^
Original file line number Diff line number Diff line change 1- //@ known-bug: #110395
2-
31#![ feature( const_trait_impl) ]
42
53pub trait A {
@@ -8,8 +6,7 @@ pub trait A {
86
97pub 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
1512fn main ( ) { }
Original file line number Diff line number Diff line change 11error[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 |
44LL | T::assoc()
55 | ^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments