Skip to content

Commit 57cfcd2

Browse files
committed
use impl Into<String>
1 parent ccc9ba5 commit 57cfcd2

File tree

1 file changed

+5
-10
lines changed
  • compiler/rustc_parse_format/src

1 file changed

+5
-10
lines changed

compiler/rustc_parse_format/src/lib.rs

+5-10
Original file line numberDiff line numberDiff line change
@@ -363,12 +363,7 @@ impl<'a> Parser<'a> {
363363
/// Notifies of an error. The message doesn't actually need to be of type
364364
/// String, but I think it does when this eventually uses conditions so it
365365
/// might as well start using it now.
366-
fn err<S1: Into<String>, S2: Into<String>>(
367-
&mut self,
368-
description: S1,
369-
label: S2,
370-
span: InnerSpan,
371-
) {
366+
fn err(&mut self, description: impl Into<String>, label: impl Into<String>, span: InnerSpan) {
372367
self.errors.push(ParseError {
373368
description: description.into(),
374369
note: None,
@@ -382,11 +377,11 @@ impl<'a> Parser<'a> {
382377
/// Notifies of an error. The message doesn't actually need to be of type
383378
/// String, but I think it does when this eventually uses conditions so it
384379
/// might as well start using it now.
385-
fn err_with_note<S1: Into<String>, S2: Into<String>, S3: Into<String>>(
380+
fn err_with_note(
386381
&mut self,
387-
description: S1,
388-
label: S2,
389-
note: S3,
382+
description: impl Into<String>,
383+
label: impl Into<String>,
384+
note: impl Into<String>,
390385
span: InnerSpan,
391386
) {
392387
self.errors.push(ParseError {

0 commit comments

Comments
 (0)