diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2025-01-30 12:45:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-30 12:45:38 +0100 |
| commit | 9b7af17d5b5456e9f49b623cad99e15e9a1fc9cc (patch) | |
| tree | d8048cdbc069c518fb6c6e19e09231fc292bc534 | |
| parent | d7668d8bf4e6d82da8059cd0c6efecdfd249f27a (diff) | |
| parent | 57cfcd228dd6b5873c96799c64c6186fa8edec66 (diff) | |
| download | rust-9b7af17d5b5456e9f49b623cad99e15e9a1fc9cc.tar.gz rust-9b7af17d5b5456e9f49b623cad99e15e9a1fc9cc.zip | |
Rollup merge of #136251 - hkBst:opt_imports, r=estebank
use impl Into<String> instead of explicit type args with bounds
| -rw-r--r-- | compiler/rustc_parse_format/src/lib.rs | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/compiler/rustc_parse_format/src/lib.rs b/compiler/rustc_parse_format/src/lib.rs index 09c88e7f83b..d021ea107ed 100644 --- a/compiler/rustc_parse_format/src/lib.rs +++ b/compiler/rustc_parse_format/src/lib.rs @@ -363,12 +363,7 @@ impl<'a> Parser<'a> { /// Notifies of an error. The message doesn't actually need to be of type /// String, but I think it does when this eventually uses conditions so it /// might as well start using it now. - fn err<S1: Into<String>, S2: Into<String>>( - &mut self, - description: S1, - label: S2, - span: InnerSpan, - ) { + fn err(&mut self, description: impl Into<String>, label: impl Into<String>, span: InnerSpan) { self.errors.push(ParseError { description: description.into(), note: None, @@ -382,11 +377,11 @@ impl<'a> Parser<'a> { /// Notifies of an error. The message doesn't actually need to be of type /// String, but I think it does when this eventually uses conditions so it /// might as well start using it now. - fn err_with_note<S1: Into<String>, S2: Into<String>, S3: Into<String>>( + fn err_with_note( &mut self, - description: S1, - label: S2, - note: S3, + description: impl Into<String>, + label: impl Into<String>, + note: impl Into<String>, span: InnerSpan, ) { self.errors.push(ParseError { |
