forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
115 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/test/ui/traits/bound/assoc-fn-bound-root-obligation.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
fn strip_lf(s: &str) -> &str { | ||
s.strip_suffix(b'\n').unwrap_or(s) | ||
//~^ ERROR expected a `FnMut<(char,)>` closure, found `u8` | ||
//~| NOTE expected an `FnMut<(char,)>` closure, found `u8` | ||
//~| NOTE required by a bound introduced by this call | ||
//~| HELP the trait `FnMut<(char,)>` is not implemented for `u8` | ||
//~| HELP the following other types implement trait `Pattern<'_>`: | ||
//~| NOTE required because of the requirements on the impl of `Pattern<'_>` for `u8` | ||
|
||
} | ||
|
||
fn main() {} |
23 changes: 23 additions & 0 deletions
23
src/test/ui/traits/bound/assoc-fn-bound-root-obligation.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
error[E0277]: expected a `FnMut<(char,)>` closure, found `u8` | ||
--> $DIR/assoc-fn-bound-root-obligation.rs:2:20 | ||
| | ||
LL | s.strip_suffix(b'\n').unwrap_or(s) | ||
| ------------ ^^^^^ expected an `FnMut<(char,)>` closure, found `u8` | ||
| | | ||
| required by a bound introduced by this call | ||
| | ||
= help: the trait `FnMut<(char,)>` is not implemented for `u8` | ||
= help: the following other types implement trait `Pattern<'_>`: | ||
&'b String | ||
&'b [char; N] | ||
&'b [char] | ||
&'b str | ||
&'c &'b str | ||
[char; N] | ||
char | ||
pattern::MultiCharEqPattern<C> | ||
= note: required because of the requirements on the impl of `Pattern<'_>` for `u8` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |