Skip to content

Commit 7c429b9

Browse files
committed
Auto merge of #136752 - workingjubilee:rollup-zi40nso, r=workingjubilee
Rollup of 13 pull requests Successful merges: - #134999 (Add cygwin target.) - #135439 (Make `-O` mean `OptLevel::Aggressive`) - #136397 (Add a comment pointing to ICE-136223) - #136681 (resolve `llvm-config` path properly on cross builds) - #136686 (Clean up `HashMap` and `HashSet` docs.) - #136694 (Update minifier version to `0.3.4`) - #136706 (compiler: mostly-finish `rustc_abi` updates) - #136710 (Document `Sum::sum` returns additive identities for `[]`) - #136724 (Make `AsyncFnOnce`, `AsyncFnMut`, `AsyncFn` non-`#[fundamental]`) - #136727 (Have a break from review rotation) - #136730 (transmutability: fix ICE when passing wrong ADT to ASSUME) - #136736 (Small resolve refactor) - #136746 (Emit an error if `-Zdwarf-version=1` is requested) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 43ca9d1 + 9d443d8 commit 7c429b9

File tree

157 files changed

+619
-260
lines changed

Some content is hidden

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

157 files changed

+619
-260
lines changed

Cargo.lock

+5-2
Original file line numberDiff line numberDiff line change
@@ -2322,9 +2322,9 @@ dependencies = [
23222322

23232323
[[package]]
23242324
name = "minifier"
2325-
version = "0.3.2"
2325+
version = "0.3.4"
23262326
source = "registry+https://github.com/rust-lang/crates.io-index"
2327-
checksum = "bd559bbf5d350ac7f2c1cf92ed71a869b847a92bce0c1318b47932a5b5f65cdd"
2327+
checksum = "1cf47565b1430f5fe6c81d3afcb4b835271348d7eb35294a4d592e38dd09ea22"
23282328

23292329
[[package]]
23302330
name = "minimal-lexical"
@@ -3400,6 +3400,7 @@ dependencies = [
34003400
name = "rustc_ast_lowering"
34013401
version = "0.0.0"
34023402
dependencies = [
3403+
"rustc_abi",
34033404
"rustc_ast",
34043405
"rustc_ast_pretty",
34053406
"rustc_data_structures",
@@ -3422,6 +3423,7 @@ name = "rustc_ast_passes"
34223423
version = "0.0.0"
34233424
dependencies = [
34243425
"itertools",
3426+
"rustc_abi",
34253427
"rustc_ast",
34263428
"rustc_ast_pretty",
34273429
"rustc_attr_parsing",
@@ -4015,6 +4017,7 @@ version = "0.0.0"
40154017
dependencies = [
40164018
"rustc-rayon",
40174019
"rustc-rayon-core",
4020+
"rustc_abi",
40184021
"rustc_ast",
40194022
"rustc_ast_lowering",
40204023
"rustc_ast_passes",

compiler/rustc_ast/src/ast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3225,7 +3225,7 @@ pub enum Extern {
32253225
///
32263226
/// E.g. `extern fn foo() {}`.
32273227
///
3228-
/// This is just `extern "C"` (see `rustc_target::spec::abi::Abi::FALLBACK`).
3228+
/// This is just `extern "C"` (see `rustc_abi::ExternAbi::FALLBACK`).
32293229
Implicit(Span),
32303230
/// An explicit extern keyword was used with an explicit ABI.
32313231
///

compiler/rustc_ast_lowering/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ doctest = false
88

99
[dependencies]
1010
# tidy-alphabetical-start
11+
rustc_abi = { path = "../rustc_abi" }
1112
rustc_ast = { path = "../rustc_ast" }
1213
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
1314
rustc_data_structures = { path = "../rustc_data_structures" }

compiler/rustc_ast_lowering/src/item.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use rustc_abi::ExternAbi;
12
use rustc_ast::ptr::P;
23
use rustc_ast::visit::AssocCtxt;
34
use rustc_ast::*;
@@ -11,7 +12,6 @@ use rustc_middle::span_bug;
1112
use rustc_middle::ty::{ResolverAstLowering, TyCtxt};
1213
use rustc_span::edit_distance::find_best_match_for_name;
1314
use rustc_span::{DesugaringKind, Ident, Span, Symbol, kw, sym};
14-
use rustc_target::spec::abi;
1515
use smallvec::{SmallVec, smallvec};
1616
use thin_vec::ThinVec;
1717
use tracing::instrument;
@@ -275,7 +275,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
275275
ModKind::Unloaded => panic!("`mod` items should have been loaded by now"),
276276
},
277277
ItemKind::ForeignMod(fm) => hir::ItemKind::ForeignMod {
278-
abi: fm.abi.map_or(abi::Abi::FALLBACK, |abi| self.lower_abi(abi)),
278+
abi: fm.abi.map_or(ExternAbi::FALLBACK, |abi| self.lower_abi(abi)),
279279
items: self
280280
.arena
281281
.alloc_from_iter(fm.items.iter().map(|x| self.lower_foreign_item_ref(x))),
@@ -1470,23 +1470,23 @@ impl<'hir> LoweringContext<'_, 'hir> {
14701470
}
14711471
}
14721472

1473-
pub(super) fn lower_abi(&mut self, abi: StrLit) -> abi::Abi {
1474-
abi::lookup(abi.symbol_unescaped.as_str()).unwrap_or_else(|err| {
1473+
pub(super) fn lower_abi(&mut self, abi: StrLit) -> ExternAbi {
1474+
rustc_abi::lookup(abi.symbol_unescaped.as_str()).unwrap_or_else(|err| {
14751475
self.error_on_invalid_abi(abi, err);
1476-
abi::Abi::Rust
1476+
ExternAbi::Rust
14771477
})
14781478
}
14791479

1480-
pub(super) fn lower_extern(&mut self, ext: Extern) -> abi::Abi {
1480+
pub(super) fn lower_extern(&mut self, ext: Extern) -> ExternAbi {
14811481
match ext {
1482-
Extern::None => abi::Abi::Rust,
1483-
Extern::Implicit(_) => abi::Abi::FALLBACK,
1482+
Extern::None => ExternAbi::Rust,
1483+
Extern::Implicit(_) => ExternAbi::FALLBACK,
14841484
Extern::Explicit(abi, _) => self.lower_abi(abi),
14851485
}
14861486
}
14871487

1488-
fn error_on_invalid_abi(&self, abi: StrLit, err: abi::AbiUnsupported) {
1489-
let abi_names = abi::enabled_names(self.tcx.features(), abi.span)
1488+
fn error_on_invalid_abi(&self, abi: StrLit, err: rustc_abi::AbiUnsupported) {
1489+
let abi_names = rustc_abi::enabled_names(self.tcx.features(), abi.span)
14901490
.iter()
14911491
.map(|s| Symbol::intern(s))
14921492
.collect::<Vec<_>>();
@@ -1495,7 +1495,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
14951495
abi: abi.symbol_unescaped,
14961496
span: abi.span,
14971497
explain: match err {
1498-
abi::AbiUnsupported::Reason { explain } => Some(InvalidAbiReason(explain)),
1498+
rustc_abi::AbiUnsupported::Reason { explain } => Some(InvalidAbiReason(explain)),
14991499
_ => None,
15001500
},
15011501
suggestion: suggested_name.map(|suggested_name| InvalidAbiSuggestion {

compiler/rustc_ast_passes/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ edition = "2021"
66
[dependencies]
77
# tidy-alphabetical-start
88
itertools = "0.12"
9+
rustc_abi = { path = "../rustc_abi" }
910
rustc_ast = { path = "../rustc_ast" }
1011
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
1112
rustc_attr_parsing = { path = "../rustc_attr_parsing" }

compiler/rustc_ast_passes/src/feature_gate.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use rustc_session::Session;
66
use rustc_session::parse::{feature_err, feature_err_issue, feature_warn};
77
use rustc_span::source_map::Spanned;
88
use rustc_span::{Span, Symbol, sym};
9-
use rustc_target::spec::abi;
109
use thin_vec::ThinVec;
1110

1211
use crate::errors;
@@ -77,12 +76,12 @@ impl<'a> PostExpansionVisitor<'a> {
7776
fn check_abi(&self, abi: ast::StrLit) {
7877
let ast::StrLit { symbol_unescaped, span, .. } = abi;
7978

80-
match abi::is_enabled(self.features, span, symbol_unescaped.as_str()) {
79+
match rustc_abi::is_enabled(self.features, span, symbol_unescaped.as_str()) {
8180
Ok(()) => (),
82-
Err(abi::AbiDisabled::Unstable { feature, explain }) => {
81+
Err(rustc_abi::AbiDisabled::Unstable { feature, explain }) => {
8382
feature_err_issue(&self.sess, feature, span, GateIssue::Language, explain).emit();
8483
}
85-
Err(abi::AbiDisabled::Unrecognized) => {
84+
Err(rustc_abi::AbiDisabled::Unrecognized) => {
8685
if self.sess.opts.pretty.is_none_or(|ppm| ppm.needs_hir()) {
8786
self.sess.dcx().span_delayed_bug(
8887
span,

compiler/rustc_codegen_cranelift/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ fn build_isa(sess: &Session) -> Arc<dyn TargetIsa + 'static> {
289289
flags_builder.set("opt_level", "none").unwrap();
290290
}
291291
OptLevel::Less
292-
| OptLevel::Default
292+
| OptLevel::More
293293
| OptLevel::Size
294294
| OptLevel::SizeMin
295295
| OptLevel::Aggressive => {

compiler/rustc_codegen_gcc/src/abi.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
#[cfg(feature = "master")]
22
use gccjit::FnAttribute;
33
use gccjit::{ToLValue, ToRValue, Type};
4+
use rustc_abi::{Reg, RegKind};
45
use rustc_codegen_ssa::traits::{AbiBuilderMethods, BaseTypeCodegenMethods};
56
use rustc_data_structures::fx::FxHashSet;
67
use rustc_middle::bug;
78
use rustc_middle::ty::Ty;
89
use rustc_middle::ty::layout::LayoutOf;
910
#[cfg(feature = "master")]
1011
use rustc_session::config;
11-
use rustc_target::callconv::{ArgAttributes, CastTarget, FnAbi, PassMode, Reg, RegKind};
12+
use rustc_target::callconv::{ArgAttributes, CastTarget, FnAbi, PassMode};
1213

1314
use crate::builder::Builder;
1415
use crate::context::CodegenCx;

compiler/rustc_codegen_gcc/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ fn to_gcc_opt_level(optlevel: Option<OptLevel>) -> OptimizationLevel {
476476
Some(level) => match level {
477477
OptLevel::No => OptimizationLevel::None,
478478
OptLevel::Less => OptimizationLevel::Limited,
479-
OptLevel::Default => OptimizationLevel::Standard,
479+
OptLevel::More => OptimizationLevel::Standard,
480480
OptLevel::Aggressive => OptimizationLevel::Aggressive,
481481
OptLevel::Size | OptLevel::SizeMin => OptimizationLevel::Limited,
482482
},

compiler/rustc_codegen_llvm/src/abi.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ use std::cmp;
44
use libc::c_uint;
55
use rustc_abi as abi;
66
pub(crate) use rustc_abi::ExternAbi;
7-
use rustc_abi::Primitive::Int;
8-
use rustc_abi::{HasDataLayout, Size};
7+
use rustc_abi::{HasDataLayout, Primitive, Reg, RegKind, Size};
98
use rustc_codegen_ssa::MemFlags;
109
use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
1110
use rustc_codegen_ssa::mir::place::{PlaceRef, PlaceValue};
@@ -440,7 +439,7 @@ impl<'ll, 'tcx> FnAbiLlvmExt<'ll, 'tcx> for FnAbi<'tcx, Ty<'tcx>> {
440439
let apply_range_attr = |idx: AttributePlace, scalar: rustc_abi::Scalar| {
441440
if cx.sess().opts.optimize != config::OptLevel::No
442441
&& llvm_util::get_version() >= (19, 0, 0)
443-
&& matches!(scalar.primitive(), Int(..))
442+
&& matches!(scalar.primitive(), Primitive::Int(..))
444443
// If the value is a boolean, the range is 0..2 and that ultimately
445444
// become 0..0 when the type becomes i1, which would be rejected
446445
// by the LLVM verifier.
@@ -574,7 +573,7 @@ impl<'ll, 'tcx> FnAbiLlvmExt<'ll, 'tcx> for FnAbi<'tcx, Ty<'tcx>> {
574573
if bx.cx.sess().opts.optimize != config::OptLevel::No
575574
&& llvm_util::get_version() < (19, 0, 0)
576575
&& let abi::BackendRepr::Scalar(scalar) = self.ret.layout.backend_repr
577-
&& matches!(scalar.primitive(), Int(..))
576+
&& matches!(scalar.primitive(), Primitive::Int(..))
578577
// If the value is a boolean, the range is 0..2 and that ultimately
579578
// become 0..0 when the type becomes i1, which would be rejected
580579
// by the LLVM verifier.

compiler/rustc_codegen_llvm/src/back/write.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ fn to_llvm_opt_settings(cfg: config::OptLevel) -> (llvm::CodeGenOptLevel, llvm::
138138
match cfg {
139139
No => (llvm::CodeGenOptLevel::None, llvm::CodeGenOptSizeNone),
140140
Less => (llvm::CodeGenOptLevel::Less, llvm::CodeGenOptSizeNone),
141-
Default => (llvm::CodeGenOptLevel::Default, llvm::CodeGenOptSizeNone),
141+
More => (llvm::CodeGenOptLevel::Default, llvm::CodeGenOptSizeNone),
142142
Aggressive => (llvm::CodeGenOptLevel::Aggressive, llvm::CodeGenOptSizeNone),
143143
Size => (llvm::CodeGenOptLevel::Default, llvm::CodeGenOptSizeDefault),
144144
SizeMin => (llvm::CodeGenOptLevel::Default, llvm::CodeGenOptSizeAggressive),
@@ -150,7 +150,7 @@ fn to_pass_builder_opt_level(cfg: config::OptLevel) -> llvm::PassBuilderOptLevel
150150
match cfg {
151151
No => llvm::PassBuilderOptLevel::O0,
152152
Less => llvm::PassBuilderOptLevel::O1,
153-
Default => llvm::PassBuilderOptLevel::O2,
153+
More => llvm::PassBuilderOptLevel::O2,
154154
Aggressive => llvm::PassBuilderOptLevel::O3,
155155
Size => llvm::PassBuilderOptLevel::Os,
156156
SizeMin => llvm::PassBuilderOptLevel::Oz,

compiler/rustc_codegen_llvm/src/type_.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
use std::{fmt, ptr};
22

33
use libc::{c_char, c_uint};
4-
use rustc_abi::{AddressSpace, Align, Integer, Size};
4+
use rustc_abi::{AddressSpace, Align, Integer, Reg, Size};
55
use rustc_codegen_ssa::common::TypeKind;
66
use rustc_codegen_ssa::traits::*;
77
use rustc_data_structures::small_c_str::SmallCStr;
88
use rustc_middle::bug;
99
use rustc_middle::ty::layout::TyAndLayout;
1010
use rustc_middle::ty::{self, Ty};
11-
use rustc_target::callconv::{CastTarget, FnAbi, Reg};
11+
use rustc_target::callconv::{CastTarget, FnAbi};
1212

1313
use crate::abi::{FnAbiLlvmExt, LlvmType};
1414
use crate::context::{CodegenCx, SimpleCx};

compiler/rustc_codegen_ssa/src/back/linker.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ impl<'a> GccLinker<'a> {
410410
let opt_level = match self.sess.opts.optimize {
411411
config::OptLevel::No => "O0",
412412
config::OptLevel::Less => "O1",
413-
config::OptLevel::Default | config::OptLevel::Size | config::OptLevel::SizeMin => "O2",
413+
config::OptLevel::More | config::OptLevel::Size | config::OptLevel::SizeMin => "O2",
414414
config::OptLevel::Aggressive => "O3",
415415
};
416416

@@ -685,7 +685,7 @@ impl<'a> Linker for GccLinker<'a> {
685685

686686
// GNU-style linkers support optimization with -O. GNU ld doesn't
687687
// need a numeric argument, but other linkers do.
688-
if self.sess.opts.optimize == config::OptLevel::Default
688+
if self.sess.opts.optimize == config::OptLevel::More
689689
|| self.sess.opts.optimize == config::OptLevel::Aggressive
690690
{
691691
self.link_arg("-O1");
@@ -1213,7 +1213,7 @@ impl<'a> Linker for EmLinker<'a> {
12131213
self.cc_arg(match self.sess.opts.optimize {
12141214
OptLevel::No => "-O0",
12151215
OptLevel::Less => "-O1",
1216-
OptLevel::Default => "-O2",
1216+
OptLevel::More => "-O2",
12171217
OptLevel::Aggressive => "-O3",
12181218
OptLevel::Size => "-Os",
12191219
OptLevel::SizeMin => "-Oz",
@@ -1384,7 +1384,7 @@ impl<'a> Linker for WasmLd<'a> {
13841384
self.link_arg(match self.sess.opts.optimize {
13851385
OptLevel::No => "-O0",
13861386
OptLevel::Less => "-O1",
1387-
OptLevel::Default => "-O2",
1387+
OptLevel::More => "-O2",
13881388
OptLevel::Aggressive => "-O3",
13891389
// Currently LLD doesn't support `Os` and `Oz`, so pass through `O2`
13901390
// instead.
@@ -1451,7 +1451,7 @@ impl<'a> WasmLd<'a> {
14511451
let opt_level = match self.sess.opts.optimize {
14521452
config::OptLevel::No => "O0",
14531453
config::OptLevel::Less => "O1",
1454-
config::OptLevel::Default => "O2",
1454+
config::OptLevel::More => "O2",
14551455
config::OptLevel::Aggressive => "O3",
14561456
// wasm-ld only handles integer LTO opt levels. Use O2
14571457
config::OptLevel::Size | config::OptLevel::SizeMin => "O2",
@@ -1525,7 +1525,7 @@ impl<'a> Linker for L4Bender<'a> {
15251525
fn optimize(&mut self) {
15261526
// GNU-style linkers support optimization with -O. GNU ld doesn't
15271527
// need a numeric argument, but other linkers do.
1528-
if self.sess.opts.optimize == config::OptLevel::Default
1528+
if self.sess.opts.optimize == config::OptLevel::More
15291529
|| self.sess.opts.optimize == config::OptLevel::Aggressive
15301530
{
15311531
self.link_arg("-O1");
@@ -1929,7 +1929,7 @@ impl<'a> Linker for LlbcLinker<'a> {
19291929
match self.sess.opts.optimize {
19301930
OptLevel::No => "-O0",
19311931
OptLevel::Less => "-O1",
1932-
OptLevel::Default => "-O2",
1932+
OptLevel::More => "-O2",
19331933
OptLevel::Aggressive => "-O3",
19341934
OptLevel::Size => "-Os",
19351935
OptLevel::SizeMin => "-Oz",
@@ -2006,7 +2006,7 @@ impl<'a> Linker for BpfLinker<'a> {
20062006
self.link_arg(match self.sess.opts.optimize {
20072007
OptLevel::No => "-O0",
20082008
OptLevel::Less => "-O1",
2009-
OptLevel::Default => "-O2",
2009+
OptLevel::More => "-O2",
20102010
OptLevel::Aggressive => "-O3",
20112011
OptLevel::Size => "-Os",
20122012
OptLevel::SizeMin => "-Oz",

compiler/rustc_codegen_ssa/src/back/write.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ impl ModuleConfig {
236236
// Copy what clang does by turning on loop vectorization at O2 and
237237
// slp vectorization at O3.
238238
vectorize_loop: !sess.opts.cg.no_vectorize_loops
239-
&& (sess.opts.optimize == config::OptLevel::Default
239+
&& (sess.opts.optimize == config::OptLevel::More
240240
|| sess.opts.optimize == config::OptLevel::Aggressive),
241241
vectorize_slp: !sess.opts.cg.no_vectorize_slp
242242
&& sess.opts.optimize == config::OptLevel::Aggressive,
@@ -260,7 +260,7 @@ impl ModuleConfig {
260260
MergeFunctions::Trampolines | MergeFunctions::Aliases => {
261261
use config::OptLevel::*;
262262
match sess.opts.optimize {
263-
Aggressive | Default | SizeMin | Size => true,
263+
Aggressive | More | SizeMin | Size => true,
264264
Less | No => false,
265265
}
266266
}

compiler/rustc_codegen_ssa/src/base.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1054,12 +1054,12 @@ pub(crate) fn provide(providers: &mut Providers) {
10541054
config::OptLevel::No => return config::OptLevel::No,
10551055
// If globally optimise-speed is already specified, just use that level.
10561056
config::OptLevel::Less => return config::OptLevel::Less,
1057-
config::OptLevel::Default => return config::OptLevel::Default,
1057+
config::OptLevel::More => return config::OptLevel::More,
10581058
config::OptLevel::Aggressive => return config::OptLevel::Aggressive,
10591059
// If globally optimize-for-size has been requested, use -O2 instead (if optimize(size)
10601060
// are present).
1061-
config::OptLevel::Size => config::OptLevel::Default,
1062-
config::OptLevel::SizeMin => config::OptLevel::Default,
1061+
config::OptLevel::Size => config::OptLevel::More,
1062+
config::OptLevel::SizeMin => config::OptLevel::More,
10631063
};
10641064

10651065
let defids = tcx.collect_and_partition_mono_items(cratenum).all_mono_items;

compiler/rustc_codegen_ssa/src/mir/block.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::cmp;
22

3-
use rustc_abi::{self as abi, ExternAbi, HasDataLayout, WrappingRange};
3+
use rustc_abi::{BackendRepr, ExternAbi, HasDataLayout, Reg, WrappingRange};
44
use rustc_ast as ast;
55
use rustc_ast::{InlineAsmOptions, InlineAsmTemplatePiece};
66
use rustc_hir::lang_items::LangItem;
@@ -14,7 +14,7 @@ use rustc_middle::{bug, span_bug};
1414
use rustc_session::config::OptLevel;
1515
use rustc_span::source_map::Spanned;
1616
use rustc_span::{Span, sym};
17-
use rustc_target::callconv::{ArgAbi, FnAbi, PassMode, Reg};
17+
use rustc_target::callconv::{ArgAbi, FnAbi, PassMode};
1818
use tracing::{debug, info};
1919

2020
use super::operand::OperandRef;
@@ -1545,7 +1545,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
15451545
// the load would just produce `OperandValue::Ref` instead
15461546
// of the `OperandValue::Immediate` we need for the call.
15471547
llval = bx.load(bx.backend_type(arg.layout), llval, align);
1548-
if let abi::BackendRepr::Scalar(scalar) = arg.layout.backend_repr {
1548+
if let BackendRepr::Scalar(scalar) = arg.layout.backend_repr {
15491549
if scalar.is_bool() {
15501550
bx.range_metadata(llval, WrappingRange { start: 0, end: 1 });
15511551
}

compiler/rustc_codegen_ssa/src/traits/consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
use rustc_abi as abi;
12
use rustc_middle::mir::interpret::{ConstAllocation, Scalar};
2-
use rustc_target::abi;
33

44
use super::BackendTypes;
55

compiler/rustc_codegen_ssa/src/traits/type_.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use rustc_abi::{AddressSpace, Float, Integer};
1+
use rustc_abi::{AddressSpace, Float, Integer, Reg};
22
use rustc_middle::bug;
33
use rustc_middle::ty::layout::{HasTyCtxt, HasTypingEnv, TyAndLayout};
44
use rustc_middle::ty::{self, Ty};
5-
use rustc_target::callconv::{ArgAbi, CastTarget, FnAbi, Reg};
5+
use rustc_target::callconv::{ArgAbi, CastTarget, FnAbi};
66

77
use super::BackendTypes;
88
use super::misc::MiscCodegenMethods;

0 commit comments

Comments
 (0)