diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-02-02 17:55:11 +0900 |
|---|---|---|
| committer | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-02-02 18:38:23 +0900 |
| commit | 56ad8bcfe0025618d35c8479797bca5d05e81099 (patch) | |
| tree | a66f1245757bdd5be7a691dd561c4bdffe92eb0c /src/test/ui/span | |
| parent | bc4a3390648dffd88e6d69d06e6d49cf3981e713 (diff) | |
Do not suggest duplicate bounds
Diffstat (limited to 'src/test/ui/span')
| -rw-r--r-- | src/test/ui/span/issue-7575.stderr | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/test/ui/span/issue-7575.stderr b/src/test/ui/span/issue-7575.stderr index eb85be039ba..89b36848a28 100644 --- a/src/test/ui/span/issue-7575.stderr +++ b/src/test/ui/span/issue-7575.stderr @@ -61,7 +61,10 @@ error[E0599]: no method named `is_str` found for type parameter `T` in the curre --> $DIR/issue-7575.rs:70:7 | LL | t.is_str() - | ^^^^^^ this is an associated function, not a method + | --^^^^^^-- + | | | + | | this is an associated function, not a method + | help: disambiguate the method call for the candidate: `ManyImplTrait::is_str(t)` | = note: found the following associated functions; to be used as methods, functions must have a `self` parameter note: the candidate is defined in the trait `ManyImplTrait` @@ -70,14 +73,6 @@ note: the candidate is defined in the trait `ManyImplTrait` LL | fn is_str() -> bool { | ^^^^^^^^^^^^^^^^^^^ = help: items from traits can only be used if the type parameter is bounded by the trait -help: disambiguate the method call for the candidate - | -LL | ManyImplTrait::is_str(t) - | -help: the following trait defines an item `is_str`, perhaps you need to restrict type parameter `T` with it: - | -LL | fn param_bound<T: ManyImplTrait + ManyImplTrait>(t: T) -> bool { - | ^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors |
