Skip to content

Commit 8d1e320

Browse files
Rollup merge of rust-lang#142974 - cuviper:stage0-bump, r=Mark-Simulacrum
Update stage0 to 1.89.0-beta.1 - Update version placeholders - Update stage0 to 1.89.0-beta.1 - Update `STAGE0_MISSING_TARGETS` - Update `cfg(bootstrap)` r? ``@Mark-Simulacrum``
2 parents ce858dd + 6cacbc7 commit 8d1e320

File tree

52 files changed

+555
-653
lines changed

Some content is hidden

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

52 files changed

+555
-653
lines changed

compiler/rustc_builtin_macros/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
#![allow(internal_features)]
66
#![allow(rustc::diagnostic_outside_of_impl)]
77
#![allow(rustc::untranslatable_diagnostic)]
8-
#![cfg_attr(not(bootstrap), feature(autodiff))]
98
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
109
#![doc(rust_logo)]
1110
#![feature(assert_matches)]
11+
#![feature(autodiff)]
1212
#![feature(box_patterns)]
1313
#![feature(decl_macro)]
1414
#![feature(if_let_guard)]

compiler/rustc_data_structures/src/aligned.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
use std::marker::PointeeSized;
12
use std::ptr::Alignment;
23

3-
use rustc_serialize::PointeeSized;
4-
54
/// Returns the ABI-required minimum alignment of a type in bytes.
65
///
76
/// This is equivalent to [`align_of`], but also works for some unsized

compiler/rustc_data_structures/src/flock.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,7 @@
44
//! green/native threading. This is just a bare-bones enough solution for
55
//! librustdoc, it is not production quality at all.
66
7-
// cfg(bootstrap)
8-
macro_rules! cfg_select_dispatch {
9-
($($tokens:tt)*) => {
10-
#[cfg(bootstrap)]
11-
cfg_match! { $($tokens)* }
12-
13-
#[cfg(not(bootstrap))]
14-
cfg_select! { $($tokens)* }
15-
};
16-
}
17-
18-
cfg_select_dispatch! {
7+
cfg_select! {
198
target_os = "linux" => {
209
mod linux;
2110
use linux as imp;

compiler/rustc_data_structures/src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
#![allow(internal_features)]
1111
#![allow(rustc::default_hash_types)]
1212
#![allow(rustc::potential_query_instability)]
13-
#![cfg_attr(bootstrap, feature(cfg_match))]
14-
#![cfg_attr(not(bootstrap), feature(cfg_select))]
15-
#![cfg_attr(not(bootstrap), feature(sized_hierarchy))]
1613
#![deny(unsafe_op_in_unsafe_fn)]
1714
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1815
#![doc(rust_logo)]
@@ -22,6 +19,7 @@
2219
#![feature(ascii_char_variants)]
2320
#![feature(assert_matches)]
2421
#![feature(auto_traits)]
22+
#![feature(cfg_select)]
2523
#![feature(core_intrinsics)]
2624
#![feature(dropck_eyepatch)]
2725
#![feature(extend_one)]
@@ -33,6 +31,7 @@
3331
#![feature(ptr_alignment_type)]
3432
#![feature(rustc_attrs)]
3533
#![feature(rustdoc_internals)]
34+
#![feature(sized_hierarchy)]
3635
#![feature(test)]
3736
#![feature(thread_id_value)]
3837
#![feature(type_alias_impl_trait)]
@@ -44,9 +43,6 @@ use std::fmt;
4443
pub use atomic_ref::AtomicRef;
4544
pub use ena::{snapshot_vec, undo_log, unify};
4645
pub use rustc_index::static_assert_size;
47-
// re-exported for `rustc_smir`
48-
// FIXME(sized_hierarchy): remove with `cfg(bootstrap)`, see `rustc_serialize/src/lib.rs`
49-
pub use rustc_serialize::PointeeSized;
5046

5147
pub mod aligned;
5248
pub mod base_n;

compiler/rustc_data_structures/src/marker.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use std::alloc::Allocator;
2-
3-
use rustc_serialize::PointeeSized;
2+
use std::marker::PointeeSized;
43

54
#[diagnostic::on_unimplemented(message = "`{Self}` doesn't implement `DynSend`. \
65
Add it to `rustc_data_structures::marker` or use `IntoDynSyncSend` if it's already `Send`")]

compiler/rustc_data_structures/src/profiling.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -859,19 +859,8 @@ fn get_thread_id() -> u32 {
859859
std::thread::current().id().as_u64().get() as u32
860860
}
861861

862-
// cfg(bootstrap)
863-
macro_rules! cfg_select_dispatch {
864-
($($tokens:tt)*) => {
865-
#[cfg(bootstrap)]
866-
cfg_match! { $($tokens)* }
867-
868-
#[cfg(not(bootstrap))]
869-
cfg_select! { $($tokens)* }
870-
};
871-
}
872-
873862
// Memory reporting
874-
cfg_select_dispatch! {
863+
cfg_select! {
875864
windows => {
876865
pub fn get_resident_set_size() -> Option<usize> {
877866
use windows::{

compiler/rustc_errors/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#![allow(incomplete_features)]
77
#![allow(internal_features)]
88
#![allow(rustc::diagnostic_outside_of_impl)]
9+
#![allow(rustc::direct_use_of_rustc_type_ir)]
910
#![allow(rustc::untranslatable_diagnostic)]
10-
#![cfg_attr(not(bootstrap), allow(rustc::direct_use_of_rustc_type_ir))]
1111
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1212
#![doc(rust_logo)]
1313
#![feature(array_windows)]

compiler/rustc_feature/src/accepted.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ declare_features! (
8383
/// Allows overloading augmented assignment operations like `a += b`.
8484
(accepted, augmented_assignments, "1.8.0", Some(28235)),
8585
/// Allows using `avx512*` target features.
86-
(accepted, avx512_target_feature, "CURRENT_RUSTC_VERSION", Some(44839)),
86+
(accepted, avx512_target_feature, "1.89.0", Some(44839)),
8787
/// Allows mixing bind-by-move in patterns and references to those identifiers in guards.
8888
(accepted, bind_by_move_pattern_guards, "1.39.0", Some(15287)),
8989
/// Allows bindings in the subpattern of a binding pattern.
@@ -221,7 +221,7 @@ declare_features! (
221221
/// Allows capturing variables in scope using format_args!
222222
(accepted, format_args_capture, "1.58.0", Some(67984)),
223223
/// Infer generic args for both consts and types.
224-
(accepted, generic_arg_infer, "CURRENT_RUSTC_VERSION", Some(85077)),
224+
(accepted, generic_arg_infer, "1.89.0", Some(85077)),
225225
/// Allows associated types to be generic, e.g., `type Foo<T>;` (RFC 1598).
226226
(accepted, generic_associated_types, "1.65.0", Some(44265)),
227227
/// Allows attributes on lifetime/type formal parameters in generics (RFC 1327).
@@ -262,7 +262,7 @@ declare_features! (
262262
/// especially around globs and shadowing (RFC 1560).
263263
(accepted, item_like_imports, "1.15.0", Some(35120)),
264264
// Allows using the `kl` and `widekl` target features and the associated intrinsics
265-
(accepted, keylocker_x86, "CURRENT_RUSTC_VERSION", Some(134813)),
265+
(accepted, keylocker_x86, "1.89.0", Some(134813)),
266266
/// Allows `'a: { break 'a; }`.
267267
(accepted, label_break_value, "1.65.0", Some(48594)),
268268
/// Allows `let...else` statements.
@@ -365,7 +365,7 @@ declare_features! (
365365
/// Lessens the requirements for structs to implement `Unsize`.
366366
(accepted, relaxed_struct_unsize, "1.58.0", Some(81793)),
367367
/// Allows the `#[repr(i128)]` attribute for enums.
368-
(accepted, repr128, "CURRENT_RUSTC_VERSION", Some(56071)),
368+
(accepted, repr128, "1.89.0", Some(56071)),
369369
/// Allows `repr(align(16))` struct attribute (RFC 1358).
370370
(accepted, repr_align, "1.25.0", Some(33626)),
371371
/// Allows using `#[repr(align(X))]` on enums with equivalent semantics
@@ -387,7 +387,7 @@ declare_features! (
387387
/// Allows `Self` struct constructor (RFC 2302).
388388
(accepted, self_struct_ctor, "1.32.0", Some(51994)),
389389
/// Allows use of x86 SHA512, SM3 and SM4 target-features and intrinsics
390-
(accepted, sha512_sm_x86, "CURRENT_RUSTC_VERSION", Some(126624)),
390+
(accepted, sha512_sm_x86, "1.89.0", Some(126624)),
391391
/// Shortern the tail expression lifetime
392392
(accepted, shorter_tail_lifetimes, "1.84.0", Some(123739)),
393393
/// Allows using subslice patterns, `[a, .., b]` and `[a, xs @ .., b]`.

compiler/rustc_feature/src/removed.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ declare_features! (
222222
/// Allows exhaustive integer pattern matching with `usize::MAX`/`isize::MIN`/`isize::MAX`.
223223
(removed, precise_pointer_size_matching, "1.76.0", Some(56354),
224224
Some("removed in favor of half-open ranges"), 118598),
225-
(removed, pref_align_of, "CURRENT_RUSTC_VERSION", Some(91971),
225+
(removed, pref_align_of, "1.89.0", Some(91971),
226226
Some("removed due to marginal use and inducing compiler complications")),
227227
(removed, proc_macro_expr, "1.27.0", Some(54727),
228228
Some("subsumed by `#![feature(proc_macro_hygiene)]`"), 52121),
@@ -265,7 +265,7 @@ declare_features! (
265265
(removed, unnamed_fields, "1.83.0", Some(49804), Some("feature needs redesign"), 131045),
266266
(removed, unsafe_no_drop_flag, "1.0.0", None, None),
267267
/// Allows unsized rvalues at arguments and parameters.
268-
(removed, unsized_locals, "CURRENT_RUSTC_VERSION", Some(48055), Some("removed due to implementation concerns; see https://github.com/rust-lang/rust/issues/111942")),
268+
(removed, unsized_locals, "1.89.0", Some(48055), Some("removed due to implementation concerns; see https://github.com/rust-lang/rust/issues/111942")),
269269
(removed, unsized_tuple_coercion, "1.87.0", Some(42877),
270270
Some("The feature restricts possible layouts for tuples, and this restriction is not worth it."), 137728),
271271
/// Allows `union` fields that don't implement `Copy` as long as they don't have any drop glue.

compiler/rustc_feature/src/unstable.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ declare_features! (
238238
/// Allows using `rustc_*` attributes (RFC 572).
239239
(internal, rustc_attrs, "1.0.0", None),
240240
/// Introduces a hierarchy of `Sized` traits (RFC 3729).
241-
(unstable, sized_hierarchy, "CURRENT_RUSTC_VERSION", None),
241+
(unstable, sized_hierarchy, "1.89.0", None),
242242
/// Allows using the `#[stable]` and `#[unstable]` attributes.
243243
(internal, staged_api, "1.0.0", None),
244244
/// Added for testing unstable lints; perma-unstable.
@@ -356,7 +356,7 @@ declare_features! (
356356
/// Allows `extern "cmse-nonsecure-call" fn()`.
357357
(unstable, abi_cmse_nonsecure_call, "CURRENT_RUSTC_VERSION", Some(81391)),
358358
/// Allows `extern "custom" fn()`.
359-
(unstable, abi_custom, "CURRENT_RUSTC_VERSION", Some(140829)),
359+
(unstable, abi_custom, "1.89.0", Some(140829)),
360360
/// Allows `extern "gpu-kernel" fn()`.
361361
(unstable, abi_gpu_kernel, "1.86.0", Some(135467)),
362362
/// Allows `extern "msp430-interrupt" fn()`.
@@ -376,7 +376,7 @@ declare_features! (
376376
/// Allows inherent and trait methods with arbitrary self types that are raw pointers.
377377
(unstable, arbitrary_self_types_pointers, "1.83.0", Some(44874)),
378378
/// Allows #[cfg(...)] on inline assembly templates and operands.
379-
(unstable, asm_cfg, "CURRENT_RUSTC_VERSION", Some(140364)),
379+
(unstable, asm_cfg, "1.89.0", Some(140364)),
380380
/// Enables experimental inline assembly support for additional architectures.
381381
(unstable, asm_experimental_arch, "1.58.0", Some(93335)),
382382
/// Enables experimental register support in inline assembly.

compiler/rustc_infer/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
// tidy-alphabetical-start
1616
#![allow(internal_features)]
1717
#![allow(rustc::diagnostic_outside_of_impl)]
18+
#![allow(rustc::direct_use_of_rustc_type_ir)]
1819
#![allow(rustc::untranslatable_diagnostic)]
19-
#![cfg_attr(not(bootstrap), allow(rustc::direct_use_of_rustc_type_ir))]
2020
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
2121
#![doc(rust_logo)]
2222
#![feature(assert_matches)]

compiler/rustc_middle/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@
2727
// tidy-alphabetical-start
2828
#![allow(internal_features)]
2929
#![allow(rustc::diagnostic_outside_of_impl)]
30+
#![allow(rustc::direct_use_of_rustc_type_ir)]
3031
#![allow(rustc::untranslatable_diagnostic)]
31-
#![cfg_attr(not(bootstrap), allow(rustc::direct_use_of_rustc_type_ir))]
32-
#![cfg_attr(not(bootstrap), feature(sized_hierarchy))]
3332
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
3433
#![doc(rust_logo)]
3534
#![feature(allocator_api)]
@@ -56,6 +55,7 @@
5655
#![feature(round_char_boundary)]
5756
#![feature(rustc_attrs)]
5857
#![feature(rustdoc_internals)]
58+
#![feature(sized_hierarchy)]
5959
#![feature(try_blocks)]
6060
#![feature(try_trait_v2)]
6161
#![feature(try_trait_v2_yeet)]

compiler/rustc_middle/src/ty/codec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
99
use std::hash::Hash;
1010
use std::intrinsics;
11-
use std::marker::DiscriminantKind;
11+
use std::marker::{DiscriminantKind, PointeeSized};
1212

1313
use rustc_abi::{FieldIdx, VariantIdx};
1414
use rustc_data_structures::fx::FxHashMap;
1515
use rustc_hir::def_id::LocalDefId;
16-
use rustc_serialize::{Decodable, Encodable, PointeeSized};
16+
use rustc_serialize::{Decodable, Encodable};
1717
use rustc_span::source_map::Spanned;
1818
use rustc_span::{Span, SpanDecoder, SpanEncoder};
1919

compiler/rustc_middle/src/ty/context.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use std::cmp::Ordering;
1010
use std::env::VarError;
1111
use std::ffi::OsStr;
1212
use std::hash::{Hash, Hasher};
13-
use std::marker::PhantomData;
13+
use std::marker::{PhantomData, PointeeSized};
1414
use std::ops::{Bound, Deref};
1515
use std::sync::{Arc, OnceLock};
1616
use std::{fmt, iter, mem};
@@ -43,7 +43,6 @@ use rustc_macros::{HashStable, TyDecodable, TyEncodable};
4343
use rustc_query_system::cache::WithDepNode;
4444
use rustc_query_system::dep_graph::DepNodeIndex;
4545
use rustc_query_system::ich::StableHashingContext;
46-
use rustc_serialize::PointeeSized;
4746
use rustc_serialize::opaque::{FileEncodeResult, FileEncoder};
4847
use rustc_session::config::CrateType;
4948
use rustc_session::cstore::{CrateStoreDyn, Untracked};

compiler/rustc_next_trait_solver/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
//! So if you got to this crate from the old solver, it's totally normal.
66
77
// tidy-alphabetical-start
8+
#![allow(rustc::direct_use_of_rustc_type_ir)]
89
#![allow(rustc::usage_of_type_ir_inherent)]
910
#![allow(rustc::usage_of_type_ir_traits)]
10-
#![cfg_attr(not(bootstrap), allow(rustc::direct_use_of_rustc_type_ir))]
1111
// tidy-alphabetical-end
1212

1313
pub mod canonicalizer;

compiler/rustc_serialize/src/lib.rs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// tidy-alphabetical-start
44
#![allow(internal_features)]
55
#![allow(rustc::internal)]
6-
#![cfg_attr(not(bootstrap), feature(sized_hierarchy))]
76
#![cfg_attr(test, feature(test))]
87
#![doc(
98
html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/",
@@ -15,6 +14,7 @@
1514
#![feature(min_specialization)]
1615
#![feature(never_type)]
1716
#![feature(rustdoc_internals)]
17+
#![feature(sized_hierarchy)]
1818
// tidy-alphabetical-end
1919

2020
// Allows macros to refer to this crate as `::rustc_serialize`.
@@ -28,19 +28,3 @@ mod serialize;
2828
pub mod int_overflow;
2929
pub mod leb128;
3030
pub mod opaque;
31-
32-
// This has nothing to do with `rustc_serialize` but it is convenient to define it in one place
33-
// for the rest of the compiler so that `cfg(bootstrap)` doesn't need to be littered throughout
34-
// the compiler wherever `PointeeSized` would be used. `rustc_serialize` happens to be the deepest
35-
// crate in the crate graph which uses `PointeeSized`.
36-
//
37-
// When bootstrap bumps, remove both the `cfg(not(bootstrap))` and `cfg(bootstrap)` lines below
38-
// and just import `std::marker::PointeeSized` whereever this item was used.
39-
40-
#[cfg(not(bootstrap))]
41-
pub use std::marker::PointeeSized;
42-
43-
#[cfg(bootstrap)]
44-
pub trait PointeeSized {}
45-
#[cfg(bootstrap)]
46-
impl<T: ?Sized> PointeeSized for T {}

compiler/rustc_serialize/src/serialize.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::borrow::Cow;
44
use std::cell::{Cell, RefCell};
55
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet, VecDeque};
66
use std::hash::{BuildHasher, Hash};
7-
use std::marker::PhantomData;
7+
use std::marker::{PhantomData, PointeeSized};
88
use std::num::NonZero;
99
use std::path;
1010
use std::rc::Rc;
@@ -142,7 +142,7 @@ pub trait Decoder {
142142
/// `rustc_metadata::rmeta::Lazy`.
143143
/// * `TyEncodable` should be used for types that are only serialized in crate
144144
/// metadata or the incremental cache. This is most types in `rustc_middle`.
145-
pub trait Encodable<S: Encoder>: crate::PointeeSized {
145+
pub trait Encodable<S: Encoder>: PointeeSized {
146146
fn encode(&self, s: &mut S);
147147
}
148148

@@ -198,7 +198,7 @@ direct_serialize_impls! {
198198
char emit_char read_char
199199
}
200200

201-
impl<S: Encoder, T: ?Sized + crate::PointeeSized> Encodable<S> for &T
201+
impl<S: Encoder, T: ?Sized + PointeeSized> Encodable<S> for &T
202202
where
203203
T: Encodable<S>,
204204
{

compiler/rustc_smir/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
// tidy-alphabetical-start
1010
#![allow(internal_features)]
1111
#![allow(rustc::usage_of_ty_tykind)]
12-
#![cfg_attr(not(bootstrap), feature(sized_hierarchy))]
1312
#![doc(
1413
html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/",
1514
test(attr(allow(unused_variables), deny(warnings)))
1615
)]
1716
#![doc(rust_logo)]
1817
#![feature(rustdoc_internals)]
18+
#![feature(sized_hierarchy)]
1919
// tidy-alphabetical-end
2020

2121
pub mod rustc_internal;

compiler/rustc_smir/src/rustc_smir/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
//!
88
//! For now, we are developing everything inside `rustc`, thus, we keep this module private.
99
10+
use std::marker::PointeeSized;
1011
use std::ops::RangeInclusive;
1112

12-
use rustc_data_structures::PointeeSized;
1313
use rustc_hir::def::DefKind;
1414
use rustc_middle::mir;
1515
use rustc_middle::mir::interpret::AllocId;

compiler/rustc_span/src/analyze_source_file.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,7 @@ pub(crate) fn analyze_source_file(src: &str) -> (Vec<RelativeBytePos>, Vec<Multi
2929
(lines, multi_byte_chars)
3030
}
3131

32-
// cfg(bootstrap)
33-
macro_rules! cfg_select_dispatch {
34-
($($tokens:tt)*) => {
35-
#[cfg(bootstrap)]
36-
cfg_match! { $($tokens)* }
37-
38-
#[cfg(not(bootstrap))]
39-
cfg_select! { $($tokens)* }
40-
};
41-
}
42-
43-
cfg_select_dispatch! {
32+
cfg_select! {
4433
any(target_arch = "x86", target_arch = "x86_64") => {
4534
fn analyze_source_file_dispatch(
4635
src: &str,

compiler/rustc_span/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@
1717
1818
// tidy-alphabetical-start
1919
#![allow(internal_features)]
20-
#![cfg_attr(bootstrap, feature(cfg_match))]
21-
#![cfg_attr(not(bootstrap), feature(cfg_select))]
2220
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
2321
#![doc(rust_logo)]
2422
#![feature(array_windows)]
23+
#![feature(cfg_select)]
2524
#![feature(core_io_borrowed_buf)]
2625
#![feature(if_let_guard)]
2726
#![feature(map_try_insert)]

0 commit comments

Comments
 (0)