Skip to content

Commit eac2c25

Browse files
committed
Remove QPath::LangItem from format_args!
1 parent e289f27 commit eac2c25

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/rustc_ast_lowering/src/format.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,8 @@ fn make_format_spec<'hir>(
391391
let flags = ctx.expr_field(Ident::new(sym::flags, sp), ctx.arena.alloc(flags), sp);
392392
let precision = ctx.expr_field(Ident::new(sym::precision, sp), ctx.arena.alloc(precision), sp);
393393
let width = ctx.expr_field(Ident::new(sym::width, sp), ctx.arena.alloc(width), sp);
394-
let placeholder = ctx.arena.alloc(hir::QPath::LangItem(hir::LangItem::FormatPlaceholder, sp));
394+
let placeholder =
395+
ctx.arena.alloc(ctx.make_lang_item_qpath(hir::LangItem::FormatPlaceholder, sp, None));
395396
let fields = ctx.arena.alloc_from_iter([position, flags, precision, width]);
396397
ctx.expr(sp, hir::ExprKind::Struct(placeholder, fields, hir::StructTailExpr::None))
397398
}

0 commit comments

Comments
 (0)