Typo caused the wrong "cannot find" error

This commit is contained in:
Oliver Schneider 2018-05-21 09:56:52 +02:00
parent ba1363ffe1
commit 0874ba0fe5
2 changed files with 4 additions and 11 deletions

View File

@ -13,12 +13,12 @@ use std::fmt::Display;
fn foo(f: impl Display + Clone) -> String {
wants_debug(f);
wants_display(f);
wants_clone(f); //~ ERROR cannot find
wants_clone(f);
}
fn wants_debug(g: impl Debug) { } //~ ERROR cannot find
fn wants_display(g: impl Debug) { } //~ ERROR cannot find
fn wants_cone(g: impl Clone) { }
fn wants_clone(g: impl Clone) { }
fn main() {
}

View File

@ -1,9 +1,3 @@
error[E0425]: cannot find function `wants_clone` in this scope
--> $DIR/universal_wrong_bounds.rs:16:5
|
LL | wants_clone(f); //~ ERROR cannot find
| ^^^^^^^^^^^ did you mean `wants_cone`?
error[E0405]: cannot find trait `Debug` in this scope
--> $DIR/universal_wrong_bounds.rs:19:24
|
@ -24,7 +18,6 @@ help: possible candidate is found in another module, you can import it into scop
LL | use std::fmt::Debug;
|
error: aborting due to 3 previous errors
error: aborting due to 2 previous errors
Some errors occurred: E0405, E0425.
For more information about an error, try `rustc --explain E0405`.
For more information about this error, try `rustc --explain E0405`.