Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 5aeb82f

Browse files
authored
Merge pull request rust-lang#19460 from Veykril/push-krmvxxvrlmyx
fix: Fix `format_args` lowering using wrong integer suffix
2 parents f3f6f86 + 27ece57 commit 5aeb82f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/tools/rust-analyzer/crates/hir-def/src/expr_store/lower.rs

Lines changed: 2 additions & 1 deletion
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,

src/tools/rust-analyzer/crates/hir-def/src/expr_store/tests.rs

Lines changed: 1 addition & 1 deletion
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)