Skip to content

Commit a0d1ff6

Browse files
authored
Merge pull request #4780 from RalfJung/rustup
Rustup
2 parents a316ed2 + d11ac79 commit a0d1ff6

File tree

78 files changed

+704
-699
lines changed

Some content is hidden

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

78 files changed

+704
-699
lines changed

compiler/rustc_arena/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
// tidy-alphabetical-start
1111
#![allow(clippy::mut_from_ref)] // Arena allocators are one place where this pattern is fine.
1212
#![allow(internal_features)]
13-
#![cfg_attr(bootstrap, feature(maybe_uninit_slice))]
1413
#![cfg_attr(test, feature(test))]
1514
#![deny(unsafe_op_in_unsafe_fn)]
1615
#![doc(test(no_crate_inject, attr(deny(warnings), allow(internal_features))))]

compiler/rustc_codegen_llvm/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
//! This API is completely unstable and subject to change.
66
77
// tidy-alphabetical-start
8-
#![cfg_attr(bootstrap, feature(slice_as_array))]
98
#![feature(assert_matches)]
109
#![feature(extern_types)]
1110
#![feature(file_buffered)]

compiler/rustc_codegen_llvm/src/llvm_util.rs

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,10 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
266266
"leoncasa" => Some(LLVMFeature::new("hasleoncasa")),
267267
s => Some(LLVMFeature::new(s)),
268268
},
269+
Arch::Wasm32 | Arch::Wasm64 => match s {
270+
"gc" if major < 22 => None,
271+
s => Some(LLVMFeature::new(s)),
272+
},
269273
Arch::X86 | Arch::X86_64 => {
270274
match s {
271275
"sse4.2" => Some(LLVMFeature::with_dependencies(
@@ -360,25 +364,25 @@ fn update_target_reliable_float_cfg(sess: &Session, cfg: &mut TargetConfig) {
360364
let target_abi = &sess.target.options.abi;
361365
let target_pointer_width = sess.target.pointer_width;
362366
let version = get_version();
363-
let lt_20_1_1 = version < (20, 1, 1);
364-
let lt_21_0_0 = version < (21, 0, 0);
367+
let (major, _, _) = version;
365368

366369
cfg.has_reliable_f16 = match (target_arch, target_os) {
367-
// LLVM crash without neon <https://github.com/llvm/llvm-project/issues/129394> (fixed in llvm20)
370+
// LLVM crash without neon <https://github.com/llvm/llvm-project/issues/129394> (fixed in LLVM 20.1.1)
368371
(Arch::AArch64, _)
369-
if !cfg.target_features.iter().any(|f| f.as_str() == "neon") && lt_20_1_1 =>
372+
if !cfg.target_features.iter().any(|f| f.as_str() == "neon")
373+
&& version < (20, 1, 1) =>
370374
{
371375
false
372376
}
373377
// Unsupported <https://github.com/llvm/llvm-project/issues/94434>
374378
(Arch::Arm64EC, _) => false,
375379
// Selection failure <https://github.com/llvm/llvm-project/issues/50374> (fixed in llvm21)
376-
(Arch::S390x, _) if lt_21_0_0 => false,
380+
(Arch::S390x, _) if major < 21 => false,
377381
// MinGW ABI bugs <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115054>
378382
(Arch::X86_64, Os::Windows) if *target_env == Env::Gnu && *target_abi != Abi::Llvm => false,
379383
// Infinite recursion <https://github.com/llvm/llvm-project/issues/97981>
380384
(Arch::CSky, _) => false,
381-
(Arch::Hexagon, _) if lt_21_0_0 => false, // (fixed in llvm21)
385+
(Arch::Hexagon, _) if major < 21 => false, // (fixed in llvm21)
382386
(Arch::PowerPC | Arch::PowerPC64, _) => false,
383387
(Arch::Sparc | Arch::Sparc64, _) => false,
384388
(Arch::Wasm32 | Arch::Wasm64, _) => false,
@@ -389,23 +393,23 @@ fn update_target_reliable_float_cfg(sess: &Session, cfg: &mut TargetConfig) {
389393
};
390394

391395
cfg.has_reliable_f128 = match (target_arch, target_os) {
396+
// Unsupported https://github.com/llvm/llvm-project/issues/121122
397+
(Arch::AmdGpu, _) => false,
392398
// Unsupported <https://github.com/llvm/llvm-project/issues/94434>
393399
(Arch::Arm64EC, _) => false,
394-
// Selection bug <https://github.com/llvm/llvm-project/issues/96432> (fixed in llvm20)
395-
(Arch::Mips64 | Arch::Mips64r6, _) if lt_20_1_1 => false,
400+
// Selection bug <https://github.com/llvm/llvm-project/issues/96432> (fixed in LLVM 20.1.0)
401+
(Arch::Mips64 | Arch::Mips64r6, _) if version < (20, 1, 0) => false,
396402
// Selection bug <https://github.com/llvm/llvm-project/issues/95471>. This issue is closed
397403
// but basic math still does not work.
398404
(Arch::Nvptx64, _) => false,
399-
// Unsupported https://github.com/llvm/llvm-project/issues/121122
400-
(Arch::AmdGpu, _) => false,
401405
// ABI bugs <https://github.com/rust-lang/rust/issues/125109> et al. (full
402406
// list at <https://github.com/rust-lang/rust/issues/116909>)
403407
(Arch::PowerPC | Arch::PowerPC64, _) => false,
404408
// ABI unsupported <https://github.com/llvm/llvm-project/issues/41838>
405409
(Arch::Sparc, _) => false,
406410
// Stack alignment bug <https://github.com/llvm/llvm-project/issues/77401>. NB: tests may
407411
// not fail if our compiler-builtins is linked. (fixed in llvm21)
408-
(Arch::X86, _) if lt_21_0_0 => false,
412+
(Arch::X86, _) if major < 21 => false,
409413
// MinGW ABI bugs <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115054>
410414
(Arch::X86_64, Os::Windows) if *target_env == Env::Gnu && *target_abi != Abi::Llvm => false,
411415
// There are no known problems on other platforms, so the only requirement is that symbols

compiler/rustc_feature/src/accepted.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ declare_features! (
6161
/// Allows explicit discriminants on non-unit enum variants.
6262
(accepted, arbitrary_enum_discriminant, "1.66.0", Some(60553)),
6363
/// Allows #[cfg(...)] on inline assembly templates and operands.
64-
(accepted, asm_cfg, "CURRENT_RUSTC_VERSION", Some(140364)),
64+
(accepted, asm_cfg, "1.93.0", Some(140364)),
6565
/// Allows using `const` operands in inline assembly.
6666
(accepted, asm_const, "1.82.0", Some(93332)),
6767
/// Allows using `label` operands in inline assembly.
@@ -218,7 +218,7 @@ declare_features! (
218218
/// Allows access to crate names passed via `--extern` through prelude.
219219
(accepted, extern_prelude, "1.30.0", Some(44660)),
220220
/// Allows using `system` as a calling convention with varargs.
221-
(accepted, extern_system_varargs, "CURRENT_RUSTC_VERSION", Some(136946)),
221+
(accepted, extern_system_varargs, "1.93.0", Some(136946)),
222222
/// Allows using F16C intrinsics from `core::arch::{x86, x86_64}`.
223223
(accepted, f16c_target_feature, "1.68.0", Some(44839)),
224224
/// Allows field shorthands (`x` meaning `x: x`) in struct literal expressions.
@@ -392,7 +392,7 @@ declare_features! (
392392
/// Allows code like `let x: &'static u32 = &42` to work (RFC 1414).
393393
(accepted, rvalue_static_promotion, "1.21.0", Some(38865)),
394394
/// Allows use of the `vector` and related s390x target features.
395-
(accepted, s390x_target_feature_vector, "CURRENT_RUSTC_VERSION", Some(145649)),
395+
(accepted, s390x_target_feature_vector, "1.93.0", Some(145649)),
396396
/// Allows `Self` in type definitions (RFC 2300).
397397
(accepted, self_in_typedefs, "1.32.0", Some(49303)),
398398
/// Allows `Self` struct constructor (RFC 2302).

compiler/rustc_feature/src/removed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ declare_features! (
190190
/// Allows use of unary negate on unsigned integers, e.g., -e for e: u8
191191
(removed, negate_unsigned, "1.0.0", Some(29645), None),
192192
/// Allows diverging expressions to fall back to `!` rather than `()`.
193-
(removed, never_type_fallback, "CURRENT_RUSTC_VERSION", Some(65992), Some("removed in favor of unconditional fallback"), 148871),
193+
(removed, never_type_fallback, "1.93.0", Some(65992), Some("removed in favor of unconditional fallback"), 148871),
194194
/// Allows `#[no_coverage]` on functions.
195195
/// The feature was renamed to `coverage_attribute` and the attribute to `#[coverage(on|off)]`
196196
(removed, no_coverage, "1.74.0", Some(84605), Some("renamed to `coverage_attribute`"), 114656),

compiler/rustc_feature/src/unstable.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ declare_features! (
412412
(unstable, c_variadic, "1.34.0", Some(44930)),
413413
/// Allows defining c-variadic naked functions with any extern ABI that is allowed
414414
/// on c-variadic foreign functions.
415-
(unstable, c_variadic_naked_functions, "CURRENT_RUSTC_VERSION", Some(148767)),
415+
(unstable, c_variadic_naked_functions, "1.93.0", Some(148767)),
416416
/// Allows the use of `#[cfg(contract_checks)` to check if contract checks are enabled.
417417
(unstable, cfg_contract_checks, "1.86.0", Some(128044)),
418418
/// Allows the use of `#[cfg(overflow_checks)` to check if integer overflow behaviour.
@@ -486,7 +486,7 @@ declare_features! (
486486
/// Allows deriving the From trait on single-field structs.
487487
(unstable, derive_from, "1.91.0", Some(144889)),
488488
/// Allows giving non-const impls custom diagnostic messages if attempted to be used as const
489-
(unstable, diagnostic_on_const, "CURRENT_RUSTC_VERSION", Some(143874)),
489+
(unstable, diagnostic_on_const, "1.93.0", Some(143874)),
490490
/// Allows `#[doc(cfg(...))]`.
491491
(unstable, doc_cfg, "1.21.0", Some(43781)),
492492
/// Allows `#[doc(masked)]`.

compiler/rustc_hir/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/hir.html
44
55
// tidy-alphabetical-start
6-
#![cfg_attr(bootstrap, feature(debug_closure_helpers))]
76
#![feature(associated_type_defaults)]
87
#![feature(closure_track_caller)]
98
#![feature(const_default)]

compiler/rustc_hir_analysis/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ This API is completely unstable and subject to change.
5858
// tidy-alphabetical-start
5959
#![allow(rustc::diagnostic_outside_of_impl)]
6060
#![allow(rustc::untranslatable_diagnostic)]
61-
#![cfg_attr(bootstrap, feature(debug_closure_helpers))]
6261
#![feature(assert_matches)]
6362
#![feature(gen_blocks)]
6463
#![feature(if_let_guard)]

compiler/rustc_lint/src/builtin.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2683,7 +2683,6 @@ declare_lint! {
26832683
///
26842684
/// ```rust,compile_fail
26852685
/// # #![allow(unused)]
2686-
/// # #![cfg_attr(bootstrap, deny(deref_nullptr))]
26872686
/// use std::ptr;
26882687
/// unsafe {
26892688
/// let x = &*ptr::null::<i32>();

compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,8 +2346,7 @@ declare_lint! {
23462346
/// [sanitize]: https://doc.rust-lang.org/nightly/unstable-book/language-features/no-sanitize.html
23472347
/// ### Example
23482348
///
2349-
#[cfg_attr(bootstrap, doc = "```ignore")]
2350-
#[cfg_attr(not(bootstrap), doc = "```rust,no_run")]
2349+
/// ```rust,no_run
23512350
/// #![feature(sanitize)]
23522351
///
23532352
/// #[sanitize(realtime = "nonblocking")]
@@ -2356,8 +2355,7 @@ declare_lint! {
23562355
/// fn main() {
23572356
/// x();
23582357
/// }
2359-
#[cfg_attr(bootstrap, doc = "```")]
2360-
#[cfg_attr(not(bootstrap), doc = "```")]
2358+
/// ```
23612359
///
23622360
/// {{produces}}
23632361
///
@@ -4907,8 +4905,7 @@ declare_lint! {
49074905
///
49084906
/// ### Example
49094907
///
4910-
#[cfg_attr(bootstrap, doc = "```ignore")]
4911-
#[cfg_attr(not(bootstrap), doc = "```rust,compile_fail")]
4908+
/// ```rust,compile_fail
49124909
/// #![feature(supertrait_item_shadowing)]
49134910
/// #![deny(resolving_to_items_shadowing_supertrait_items)]
49144911
///
@@ -4924,8 +4921,7 @@ declare_lint! {
49244921
///
49254922
/// struct MyType;
49264923
/// MyType.hello();
4927-
#[cfg_attr(bootstrap, doc = "```")]
4928-
#[cfg_attr(not(bootstrap), doc = "```")]
4924+
/// ```
49294925
///
49304926
/// {{produces}}
49314927
///
@@ -4951,8 +4947,7 @@ declare_lint! {
49514947
///
49524948
/// ### Example
49534949
///
4954-
#[cfg_attr(bootstrap, doc = "```ignore")]
4955-
#[cfg_attr(not(bootstrap), doc = "```rust,compile_fail")]
4950+
/// ```rust,compile_fail
49564951
/// #![feature(supertrait_item_shadowing)]
49574952
/// #![deny(shadowing_supertrait_items)]
49584953
///
@@ -4965,8 +4960,7 @@ declare_lint! {
49654960
/// fn hello(&self) {}
49664961
/// }
49674962
/// impl<T> Downstream for T {}
4968-
#[cfg_attr(bootstrap, doc = "```")]
4969-
#[cfg_attr(not(bootstrap), doc = "```")]
4963+
/// ```
49704964
///
49714965
/// {{produces}}
49724966
///

0 commit comments

Comments
 (0)