Skip to content

Commit 2066d6e

Browse files
authored
Merge pull request rust-lang#4186 from rust-lang/rustup-2025-02-11
Automatic Rustup
2 parents f22fd36 + e8cf1d2 commit 2066d6e

File tree

992 files changed

+20311
-12309
lines changed

Some content is hidden

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

992 files changed

+20311
-12309
lines changed

.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ end_of_line = lf
99
charset = utf-8
1010
trim_trailing_whitespace = true
1111
insert_final_newline = true
12+
13+
[!src/llvm-project]
1214
indent_style = space
1315
indent_size = 4
1416

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ ec2cc761bc7067712ecc7734502f703fe3b024c8
2929
99cb0c6bc399fb94a0ddde7e9b38e9c00d523bad
3030
# reformat with rustfmt edition 2024
3131
c682aa162b0d41e21cc6748f4fecfe01efb69d1f
32+
# reformat with updated edition 2024
33+
1fcae03369abb4c2cc180cd5a49e1f4440a81300

Cargo.lock

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,9 @@ version = "0.1.0"
420420

421421
[[package]]
422422
name = "cc"
423-
version = "1.2.7"
423+
version = "1.2.13"
424424
source = "registry+https://github.com/rust-lang/crates.io-index"
425-
checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7"
425+
checksum = "c7777341816418c02e033934a09f20dc0ccaf65a5201ef8a450ae0105a573fda"
426426
dependencies = [
427427
"shlex",
428428
]
@@ -1209,16 +1209,6 @@ dependencies = [
12091209
"tidy",
12101210
]
12111211

1212-
[[package]]
1213-
name = "field-offset"
1214-
version = "0.3.6"
1215-
source = "registry+https://github.com/rust-lang/crates.io-index"
1216-
checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"
1217-
dependencies = [
1218-
"memoffset",
1219-
"rustc_version",
1220-
]
1221-
12221212
[[package]]
12231213
name = "filetime"
12241214
version = "0.2.25"
@@ -2295,15 +2285,6 @@ dependencies = [
22952285
"libc",
22962286
]
22972287

2298-
[[package]]
2299-
name = "memoffset"
2300-
version = "0.9.1"
2301-
source = "registry+https://github.com/rust-lang/crates.io-index"
2302-
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
2303-
dependencies = [
2304-
"autocfg",
2305-
]
2306-
23072288
[[package]]
23082289
name = "mime"
23092290
version = "0.3.17"
@@ -2322,9 +2303,9 @@ dependencies = [
23222303

23232304
[[package]]
23242305
name = "minifier"
2325-
version = "0.3.2"
2306+
version = "0.3.4"
23262307
source = "registry+https://github.com/rust-lang/crates.io-index"
2327-
checksum = "bd559bbf5d350ac7f2c1cf92ed71a869b847a92bce0c1318b47932a5b5f65cdd"
2308+
checksum = "1cf47565b1430f5fe6c81d3afcb4b835271348d7eb35294a4d592e38dd09ea22"
23282309

23292310
[[package]]
23302311
name = "minimal-lexical"
@@ -3287,13 +3268,6 @@ dependencies = [
32873268
"tikv-jemalloc-sys",
32883269
]
32893270

3290-
[[package]]
3291-
name = "rustc-perf-wrapper"
3292-
version = "0.1.0"
3293-
dependencies = [
3294-
"clap",
3295-
]
3296-
32973271
[[package]]
32983272
name = "rustc-rayon"
32993273
version = "0.5.1"
@@ -3400,6 +3374,7 @@ dependencies = [
34003374
name = "rustc_ast_lowering"
34013375
version = "0.0.0"
34023376
dependencies = [
3377+
"rustc_abi",
34033378
"rustc_ast",
34043379
"rustc_ast_pretty",
34053380
"rustc_data_structures",
@@ -3422,6 +3397,7 @@ name = "rustc_ast_passes"
34223397
version = "0.0.0"
34233398
dependencies = [
34243399
"itertools",
3400+
"rustc_abi",
34253401
"rustc_ast",
34263402
"rustc_ast_pretty",
34273403
"rustc_attr_parsing",
@@ -4015,6 +3991,7 @@ version = "0.0.0"
40153991
dependencies = [
40163992
"rustc-rayon",
40173993
"rustc-rayon-core",
3994+
"rustc_abi",
40183995
"rustc_ast",
40193996
"rustc_ast_lowering",
40203997
"rustc_ast_passes",
@@ -4177,7 +4154,6 @@ version = "0.0.0"
41774154
dependencies = [
41784155
"bitflags",
41794156
"either",
4180-
"field-offset",
41814157
"gsgdt",
41824158
"polonius-engine",
41834159
"rustc-rayon-core",
@@ -4425,7 +4401,6 @@ dependencies = [
44254401
name = "rustc_query_impl"
44264402
version = "0.0.0"
44274403
dependencies = [
4428-
"field-offset",
44294404
"measureme",
44304405
"rustc_data_structures",
44314406
"rustc_errors",

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ members = [
4545
"src/tools/rustdoc-gui-test",
4646
"src/tools/opt-dist",
4747
"src/tools/coverage-dump",
48-
"src/tools/rustc-perf-wrapper",
4948
"src/tools/wasm-component-ld",
5049
"src/tools/features-status-dump",
5150
]

compiler/rustc_abi/src/lib.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,10 +1184,13 @@ impl Scalar {
11841184
#[inline]
11851185
pub fn is_bool(&self) -> bool {
11861186
use Integer::*;
1187-
matches!(self, Scalar::Initialized {
1188-
value: Primitive::Int(I8, false),
1189-
valid_range: WrappingRange { start: 0, end: 1 }
1190-
})
1187+
matches!(
1188+
self,
1189+
Scalar::Initialized {
1190+
value: Primitive::Int(I8, false),
1191+
valid_range: WrappingRange { start: 0, end: 1 }
1192+
}
1193+
)
11911194
}
11921195

11931196
/// Get the primitive representation of this type, ignoring the valid range and whether the

compiler/rustc_ast/src/ast.rs

Lines changed: 1 addition & 1 deletion
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/src/expand/autodiff_attrs.rs

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,6 @@ pub enum DiffMode {
3030
Forward,
3131
/// The target function, to be created using reverse mode AD.
3232
Reverse,
33-
/// The target function, to be created using forward mode AD.
34-
/// This target function will also be used as a source for higher order derivatives,
35-
/// so compute it before all Forward/Reverse targets and optimize it through llvm.
36-
ForwardFirst,
37-
/// The target function, to be created using reverse mode AD.
38-
/// This target function will also be used as a source for higher order derivatives,
39-
/// so compute it before all Forward/Reverse targets and optimize it through llvm.
40-
ReverseFirst,
4133
}
4234

4335
/// Dual and Duplicated (and their Only variants) are getting lowered to the same Enzyme Activity.
@@ -92,10 +84,10 @@ pub struct AutoDiffAttrs {
9284

9385
impl DiffMode {
9486
pub fn is_rev(&self) -> bool {
95-
matches!(self, DiffMode::Reverse | DiffMode::ReverseFirst)
87+
matches!(self, DiffMode::Reverse)
9688
}
9789
pub fn is_fwd(&self) -> bool {
98-
matches!(self, DiffMode::Forward | DiffMode::ForwardFirst)
90+
matches!(self, DiffMode::Forward)
9991
}
10092
}
10193

@@ -106,8 +98,6 @@ impl Display for DiffMode {
10698
DiffMode::Source => write!(f, "Source"),
10799
DiffMode::Forward => write!(f, "Forward"),
108100
DiffMode::Reverse => write!(f, "Reverse"),
109-
DiffMode::ForwardFirst => write!(f, "ForwardFirst"),
110-
DiffMode::ReverseFirst => write!(f, "ReverseFirst"),
111101
}
112102
}
113103
}
@@ -125,12 +115,12 @@ pub fn valid_ret_activity(mode: DiffMode, activity: DiffActivity) -> bool {
125115
match mode {
126116
DiffMode::Error => false,
127117
DiffMode::Source => false,
128-
DiffMode::Forward | DiffMode::ForwardFirst => {
118+
DiffMode::Forward => {
129119
activity == DiffActivity::Dual
130120
|| activity == DiffActivity::DualOnly
131121
|| activity == DiffActivity::Const
132122
}
133-
DiffMode::Reverse | DiffMode::ReverseFirst => {
123+
DiffMode::Reverse => {
134124
activity == DiffActivity::Const
135125
|| activity == DiffActivity::Active
136126
|| activity == DiffActivity::ActiveOnly
@@ -166,10 +156,10 @@ pub fn valid_input_activity(mode: DiffMode, activity: DiffActivity) -> bool {
166156
return match mode {
167157
DiffMode::Error => false,
168158
DiffMode::Source => false,
169-
DiffMode::Forward | DiffMode::ForwardFirst => {
159+
DiffMode::Forward => {
170160
matches!(activity, Dual | DualOnly | Const)
171161
}
172-
DiffMode::Reverse | DiffMode::ReverseFirst => {
162+
DiffMode::Reverse => {
173163
matches!(activity, Active | ActiveOnly | Duplicated | DuplicatedOnly | Const)
174164
}
175165
};
@@ -200,8 +190,6 @@ impl FromStr for DiffMode {
200190
"Source" => Ok(DiffMode::Source),
201191
"Forward" => Ok(DiffMode::Forward),
202192
"Reverse" => Ok(DiffMode::Reverse),
203-
"ForwardFirst" => Ok(DiffMode::ForwardFirst),
204-
"ReverseFirst" => Ok(DiffMode::ReverseFirst),
205193
_ => Err(()),
206194
}
207195
}

compiler/rustc_ast_lowering/Cargo.toml

Lines changed: 1 addition & 0 deletions
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/expr.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -828,15 +828,18 @@ impl<'hir> LoweringContext<'_, 'hir> {
828828
span,
829829
Some(Arc::clone(&self.allow_gen_future)),
830830
);
831-
self.lower_attrs(inner_hir_id, &[Attribute {
832-
kind: AttrKind::Normal(ptr::P(NormalAttr::from_ident(Ident::new(
833-
sym::track_caller,
834-
span,
835-
)))),
836-
id: self.tcx.sess.psess.attr_id_generator.mk_attr_id(),
837-
style: AttrStyle::Outer,
838-
span: unstable_span,
839-
}]);
831+
self.lower_attrs(
832+
inner_hir_id,
833+
&[Attribute {
834+
kind: AttrKind::Normal(ptr::P(NormalAttr::from_ident(Ident::new(
835+
sym::track_caller,
836+
span,
837+
)))),
838+
id: self.tcx.sess.psess.attr_id_generator.mk_attr_id(),
839+
style: AttrStyle::Outer,
840+
span: unstable_span,
841+
}],
842+
);
840843
}
841844
}
842845

compiler/rustc_ast_lowering/src/format.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,13 +362,16 @@ fn make_format_spec<'hir>(
362362
debug_hex,
363363
} = &placeholder.format_options;
364364
let fill = ctx.expr_char(sp, fill.unwrap_or(' '));
365-
let align =
366-
ctx.expr_lang_item_type_relative(sp, hir::LangItem::FormatAlignment, match alignment {
365+
let align = ctx.expr_lang_item_type_relative(
366+
sp,
367+
hir::LangItem::FormatAlignment,
368+
match alignment {
367369
Some(FormatAlignment::Left) => sym::Left,
368370
Some(FormatAlignment::Right) => sym::Right,
369371
Some(FormatAlignment::Center) => sym::Center,
370372
None => sym::Unknown,
371-
});
373+
},
374+
);
372375
// This needs to match `Flag` in library/core/src/fmt/rt.rs.
373376
let flags: u32 = ((sign == Some(FormatSign::Plus)) as u32)
374377
| ((sign == Some(FormatSign::Minus)) as u32) << 1

0 commit comments

Comments
 (0)