Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 201ec7c

Browse files
committed
Update cfg(bootstrap)
1 parent 315e9d8 commit 201ec7c

File tree

29 files changed

+26
-142
lines changed

29 files changed

+26
-142
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_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

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /