diff options
| author | Michael Goulet <michael@errs.io> | 2023-12-26 13:29:13 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-26 13:29:13 -0500 |
| commit | e7bd402a38be3e7c6d5f32ddfb2d36b6f7d98f2f (patch) | |
| tree | f1bd72ee1a4dac2711d0d97879620a7e3eeb223c /compiler/rustc_ast_lowering/src/lib.rs | |
| parent | 50e380c8f3e8bad3c6327895a2af8a99b378030b (diff) | |
| parent | 7e00e9736db89ecef7575622a13b57021ec34493 (diff) | |
| download | rust-e7bd402a38be3e7c6d5f32ddfb2d36b6f7d98f2f.tar.gz rust-e7bd402a38be3e7c6d5f32ddfb2d36b6f7d98f2f.zip | |
Rollup merge of #119240 - compiler-errors:lang-item-more, r=petrochenkov
Make some non-diagnostic-affecting `QPath::LangItem` into regular `QPath`s The rest of 'em affect diagnostics, so leave them alone... for now. cc #115178
Diffstat (limited to 'compiler/rustc_ast_lowering/src/lib.rs')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/lib.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index e3954116288..1545a3621ce 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -770,6 +770,10 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { self.resolver.get_import_res(id).present_items() } + fn make_lang_item_qpath(&mut self, lang_item: hir::LangItem, span: Span) -> hir::QPath<'hir> { + hir::QPath::Resolved(None, self.make_lang_item_path(lang_item, span, None)) + } + fn make_lang_item_path( &mut self, lang_item: hir::LangItem, @@ -787,7 +791,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { hir_id: self.next_id(), res, args, - infer_args: false, + infer_args: args.is_none(), }]), }) } |
