Skip to content

Commit 0874ba0

Browse files
committed
Typo caused the wrong "cannot find" error
1 parent ba1363f commit 0874ba0

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

src/test/ui/impl-trait/universal_wrong_bounds.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ use std::fmt::Display;
1313
fn foo(f: impl Display + Clone) -> String {
1414
wants_debug(f);
1515
wants_display(f);
16-
wants_clone(f); //~ ERROR cannot find
16+
wants_clone(f);
1717
}
1818

1919
fn wants_debug(g: impl Debug) { } //~ ERROR cannot find
2020
fn wants_display(g: impl Debug) { } //~ ERROR cannot find
21-
fn wants_cone(g: impl Clone) { }
21+
fn wants_clone(g: impl Clone) { }
2222

2323
fn main() {
2424
}

src/test/ui/impl-trait/universal_wrong_bounds.stderr

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
error[E0425]: cannot find function `wants_clone` in this scope
2-
--> $DIR/universal_wrong_bounds.rs:16:5
3-
|
4-
LL | wants_clone(f); //~ ERROR cannot find
5-
| ^^^^^^^^^^^ did you mean `wants_cone`?
6-
71
error[E0405]: cannot find trait `Debug` in this scope
82
--> $DIR/universal_wrong_bounds.rs:19:24
93
|
@@ -24,7 +18,6 @@ help: possible candidate is found in another module, you can import it into scop
2418
LL | use std::fmt::Debug;
2519
|
2620

27-
error: aborting due to 3 previous errors
21+
error: aborting due to 2 previous errors
2822

29-
Some errors occurred: E0405, E0425.
30-
For more information about an error, try `rustc --explain E0405`.
23+
For more information about this error, try `rustc --explain E0405`.

0 commit comments

Comments
 (0)