Skip to content

Commit 51939db

Browse files
committed
Auto merge of rust-lang#15052 - lnicola:fmt-arguments, r=Veykril
minor: Rename minicore ArgumentV1 to match libcore
2 parents f8dec25 + 6d6354e commit 51939db

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

crates/ide/src/inlay_hints/chaining.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ fn main() {
474474
file_id: FileId(
475475
1,
476476
),
477-
range: 9333..9341,
477+
range: 9286..9294,
478478
},
479479
),
480480
tooltip: "",
@@ -487,7 +487,7 @@ fn main() {
487487
file_id: FileId(
488488
1,
489489
),
490-
range: 9365..9369,
490+
range: 9318..9322,
491491
},
492492
),
493493
tooltip: "",
@@ -511,7 +511,7 @@ fn main() {
511511
file_id: FileId(
512512
1,
513513
),
514-
range: 9333..9341,
514+
range: 9286..9294,
515515
},
516516
),
517517
tooltip: "",
@@ -524,7 +524,7 @@ fn main() {
524524
file_id: FileId(
525525
1,
526526
),
527-
range: 9365..9369,
527+
range: 9318..9322,
528528
},
529529
),
530530
tooltip: "",
@@ -548,7 +548,7 @@ fn main() {
548548
file_id: FileId(
549549
1,
550550
),
551-
range: 9333..9341,
551+
range: 9286..9294,
552552
},
553553
),
554554
tooltip: "",
@@ -561,7 +561,7 @@ fn main() {
561561
file_id: FileId(
562562
1,
563563
),
564-
range: 9365..9369,
564+
range: 9318..9322,
565565
},
566566
),
567567
tooltip: "",

crates/test-utils/src/minicore.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -867,29 +867,26 @@ pub mod fmt {
867867
}
868868

869869
#[lang = "format_argument"]
870-
pub struct ArgumentV1<'a> {
870+
pub struct Argument<'a> {
871871
value: &'a Opaque,
872872
formatter: fn(&Opaque, &mut Formatter<'_>) -> Result,
873873
}
874874

875-
impl<'a> ArgumentV1<'a> {
876-
pub fn new<'b, T>(x: &'b T, f: fn(&T, &mut Formatter<'_>) -> Result) -> ArgumentV1<'b> {
875+
impl<'a> Argument<'a> {
876+
pub fn new<'b, T>(x: &'b T, f: fn(&T, &mut Formatter<'_>) -> Result) -> Argument<'b> {
877877
use crate::mem::transmute;
878-
unsafe { ArgumentV1 { formatter: transmute(f), value: transmute(x) } }
878+
unsafe { Argument { formatter: transmute(f), value: transmute(x) } }
879879
}
880880
}
881881

882882
#[lang = "format_arguments"]
883883
pub struct Arguments<'a> {
884884
pieces: &'a [&'static str],
885-
args: &'a [ArgumentV1<'a>],
885+
args: &'a [Argument<'a>],
886886
}
887887

888888
impl<'a> Arguments<'a> {
889-
pub const fn new_v1(
890-
pieces: &'a [&'static str],
891-
args: &'a [ArgumentV1<'a>],
892-
) -> Arguments<'a> {
889+
pub const fn new_v1(pieces: &'a [&'static str], args: &'a [Argument<'a>]) -> Arguments<'a> {
893890
Arguments { pieces, args }
894891
}
895892
}

0 commit comments

Comments
 (0)