ast_validation: tweak diagnostic output
This commit is contained in:
parent
79d139ac70
commit
3341c94006
20 changed files with 96 additions and 81 deletions
|
|
@ -5,7 +5,7 @@ const ARR_LEN: usize = Tt::const_val::<[i8; 123]>();
|
|||
|
||||
trait Tt {
|
||||
const fn const_val<T: Sized>() -> usize {
|
||||
//~^ ERROR trait fns cannot be declared const
|
||||
//~^ ERROR functions in traits cannot be declared const
|
||||
core::mem::size_of::<T>()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
error[E0379]: trait fns cannot be declared const
|
||||
error[E0379]: functions in traits cannot be declared const
|
||||
--> $DIR/issue-54954.rs:7:5
|
||||
|
|
||||
LL | const fn const_val<T: Sized>() -> usize {
|
||||
| ^^^^^ trait fns cannot be const
|
||||
| ^^^^^ functions in traits cannot be const
|
||||
|
||||
error[E0283]: type annotations needed
|
||||
--> $DIR/issue-54954.rs:3:24
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue