Skip to content

Commit

Permalink
use impl Into<String>
Browse files Browse the repository at this point in the history
  • Loading branch information
hkBst committed Jan 29, 2025
1 parent ccc9ba5 commit 57cfcd2
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions compiler/rustc_parse_format/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 {
Expand Down

0 comments on commit 57cfcd2

Please sign in to comment.