ast_validation: tweak diagnostic output

This commit is contained in:
Mazdak Farrokhzad 2020-02-11 08:19:21 +01:00
parent 79d139ac70
commit 3341c94006
20 changed files with 96 additions and 81 deletions

View file

@ -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>()
}
}

View file

@ -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