Skip to content

Commit 5bbf2ce

Browse files
authored
Merge pull request #19460 from Veykril/push-krmvxxvrlmyx
fix: Fix `format_args` lowering using wrong integer suffix
2 parents 1fb465f + 9a5a11f commit 5bbf2ce

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

crates/hir-def/src/expr_store/lower.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2400,7 +2400,8 @@ impl ExprCollector<'_> {
24002400
Some(FormatCount::Literal(n)) => {
24012401
let args = self.alloc_expr_desugared(Expr::Literal(Literal::Uint(
24022402
*n as u128,
2403-
Some(BuiltinUint::Usize),
2403+
// FIXME: Change this to Some(BuiltinUint::U16) once we drop support for toolchains < 1.88
2404+
None,
24042405
)));
24052406
let count_is = match LangItem::FormatCount.ty_rel_path(
24062407
self.db,

crates/hir-def/src/expr_store/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ fn main() {
216216
8u32,
217217
builtin#lang(Count::Implied),
218218
builtin#lang(Count::Is)(
219-
2usize,
219+
2,
220220
),
221221
), builtin#lang(Placeholder::new)(
222222
1usize,

0 commit comments

Comments
 (0)