E0379: Make diagnostic more precise
This commit is contained in:
parent
8f546aa495
commit
ae8e401c9f
13 changed files with 31 additions and 20 deletions
|
@ -7,7 +7,7 @@ trait Trait {
|
|||
}
|
||||
|
||||
impl const Trait for () {
|
||||
const fn fun() {} //~ ERROR functions in traits cannot be declared const
|
||||
const fn fun() {} //~ ERROR functions in trait impls cannot be declared const
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -4,11 +4,11 @@ error[E0379]: functions in traits cannot be declared const
|
|||
LL | const fn fun();
|
||||
| ^^^^^ functions in traits cannot be const
|
||||
|
||||
error[E0379]: functions in traits cannot be declared const
|
||||
error[E0379]: functions in trait impls cannot be declared const
|
||||
--> $DIR/trait-fn-const.rs:10:5
|
||||
|
|
||||
LL | const fn fun() {}
|
||||
| ^^^^^ functions in traits cannot be const
|
||||
| ^^^^^ functions in trait impls cannot be const
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue