Skip to content

Commit 2cfd421

Browse files
committed
Auto merge of #160814 - JonathanBrouwer:rollup-5WAvt58, r=<try>
Rollup of 9 pull requests try-job: dist-various-1 try-job: test-various try-job: x86_64-gnu-aux try-job: x86_64-gnu-llvm-21-3 try-job: x86_64-msvc-1 try-job: aarch64-apple-1 try-job: aarch64-apple-2 try-job: x86_64-mingw-1 try-job: i686-msvc-1 try-job: i686-msvc-2
2 parents 153ecc4 + 51e3439 commit 2cfd421

256 files changed

Lines changed: 796 additions & 637 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

compiler/rustc_abi/src/extern_abi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ impl ExternAbi {
290290
}
291291

292292
/// Returns whether the ABI supports C variadics. This only controls whether we allow *imports*
293-
/// of such functions via `extern` blocks; there's a separate check during AST construction
294-
/// guarding *definitions* of variadic functions.
293+
/// of such functions via `extern` blocks and definition via naked functions; there's a
294+
/// separate check during AST construction guarding *definitions* of variadic functions.
295295
#[cfg(feature = "nightly")]
296296
pub fn supports_c_variadic(self) -> CVariadicStatus {
297297
// * C and Cdecl obviously support varargs.

compiler/rustc_ast_lowering/src/contract.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use std::sync::Arc;
22

3+
use rustc_hir::attrs::lang_items::LangItem;
34
use thin_vec::thin_vec;
45

56
use crate::LoweringContext;
@@ -146,7 +147,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
146147
);
147148
let precond = self.expr_call_lang_item_fn_mut(
148149
req_span,
149-
rustc_hir::LangItem::ContractCheckRequires,
150+
LangItem::ContractCheckRequires,
150151
&*arena_vec![self; lowered_req],
151152
);
152153
self.stmt_expr(req.span, precond)
@@ -165,7 +166,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
165166
let lowered_ens = self.lower_expr_mut(&ens);
166167
self.expr_call_lang_item_fn(
167168
ens_span,
168-
rustc_hir::LangItem::ContractBuildCheckEnsures,
169+
LangItem::ContractBuildCheckEnsures,
169170
&*arena_vec![self; lowered_ens],
170171
)
171172
}
@@ -208,15 +209,15 @@ impl<'hir> LoweringContext<'_, 'hir> {
208209

209210
let postcond_checker = self.arena.alloc(self.expr_enum_variant_lang_item(
210211
postcond_checker.span,
211-
rustc_hir::lang_items::LangItem::OptionSome,
212+
rustc_hir::attrs::lang_items::LangItem::OptionSome,
212213
&*arena_vec![self; *postcond_checker],
213214
));
214215
let then_block_stmts = self.block_all(span, stmts, Some(postcond_checker));
215216
let then_block = self.arena.alloc(self.expr_block(&then_block_stmts));
216217

217218
let none_expr = self.arena.alloc(self.expr_enum_variant_lang_item(
218219
postcond_checker.span,
219-
rustc_hir::lang_items::LangItem::OptionNone,
220+
rustc_hir::attrs::lang_items::LangItem::OptionNone,
220221
Default::default(),
221222
));
222223
let else_block = self.block_expr(none_expr);
@@ -326,7 +327,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
326327
let cond_fn = self.expr_ident(span, cond_ident, cond_hir_id);
327328
let contract_check = self.expr_call_lang_item_fn_mut(
328329
span,
329-
rustc_hir::LangItem::ContractCheckEnsures,
330+
LangItem::ContractCheckEnsures,
330331
arena_vec![self; *cond_fn, *ret],
331332
);
332333
let contract_check = self.arena.alloc(contract_check);

compiler/rustc_ast_lowering/src/delegation/attributes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
use rustc_hir as hir;
12
use rustc_hir::attrs::{AttributeKind, InlineAttr};
2-
use rustc_hir::{self as hir};
33
use rustc_span::Span;
44
use rustc_span::def_id::DefId;
55

compiler/rustc_ast_lowering/src/delegation/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ use hir::def::Res;
4545
use rustc_abi::ExternAbi;
4646
use rustc_ast as ast;
4747
use rustc_ast::*;
48+
use rustc_hir::attrs::lang_items::LangItem;
4849
use rustc_hir::def::DefKind;
4950
use rustc_hir::{self as hir, FnDeclFlags};
5051
use rustc_middle::ty::Asyncness;
@@ -341,8 +342,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
341342
crate::re_lowering::ReloweringChecker::allow_relowering(self, |this| {
342343
this.lower_block_noalloc(HirId::INVALID, block, false)
343344
})
344-
},
345-
_ => self.lower_block_noalloc(HirId::INVALID, block, false)
345+
}
346+
_ => self.lower_block_noalloc(HirId::INVALID, block, false),
346347
};
347348

348349
// Remove node ids for which we overwrote resolution to generated param
@@ -456,7 +457,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
456457

457458
let expr = self.mk_expr(initializer, span);
458459

459-
let path = self.make_lang_item_qpath(hir::LangItem::FromFn, span, None);
460+
let path = self.make_lang_item_qpath(LangItem::FromFn, span, None);
460461
let path = self.arena.alloc(self.mk_expr(hir::ExprKind::Path(path), span));
461462

462463
let call = hir::ExprKind::Call(path, self.arena.alloc_slice(&[expr]));

0 commit comments

Comments
 (0)