Remove E0245; improve E0404 explanation

This commit is contained in:
Mark Mansi 2018-02-22 17:50:06 -06:00
parent 9f9183d34d
commit 2ec79f936a
6 changed files with 45 additions and 17 deletions

View file

@ -13,5 +13,6 @@ struct Bar;
impl Foo for Bar {} //~ ERROR E0404
fn main() {
}
fn main() {}
fn baz<T: Foo>(_: T) {} //~ ERROR E0404

View file

@ -4,6 +4,12 @@ error[E0404]: expected trait, found struct `Foo`
LL | impl Foo for Bar {} //~ ERROR E0404
| ^^^ not a trait
error[E0404]: expected trait, found struct `Foo`
--> $DIR/E0404.rs:18:11
|
LL | fn baz<T: Foo>(_: T) {} //~ ERROR E0404
| ^^^ not a trait
error: cannot continue compilation due to previous error
If you want more information on this error, try using "rustc --explain E0404"