Skip to content

Commit 5a24b27

Browse files
committed
update cfg(bootstrap)
1 parent 9d8e50d commit 5a24b27

File tree

73 files changed

+216
-452
lines changed

Some content is hidden

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

73 files changed

+216
-452
lines changed

compiler/rustc_ast/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
77
// tidy-alphabetical-start
88
#![allow(internal_features)]
9-
#![cfg_attr(bootstrap, feature(let_chains))]
109
#![doc(
1110
html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/",
1211
test(attr(deny(warnings)))

compiler/rustc_ast_lowering/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
3333
// tidy-alphabetical-start
3434
#![allow(internal_features)]
35-
#![cfg_attr(bootstrap, feature(let_chains))]
3635
#![doc(rust_logo)]
3736
#![feature(assert_matches)]
3837
#![feature(box_patterns)]

compiler/rustc_ast_passes/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
55
// tidy-alphabetical-start
66
#![allow(internal_features)]
7-
#![cfg_attr(bootstrap, feature(let_chains))]
87
#![doc(rust_logo)]
98
#![feature(box_patterns)]
109
#![feature(if_let_guard)]

compiler/rustc_attr_data_structures/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// tidy-alphabetical-start
22
#![allow(internal_features)]
3-
#![cfg_attr(bootstrap, feature(let_chains))]
43
#![doc(rust_logo)]
54
#![feature(rustdoc_internals)]
65
// tidy-alphabetical-end

compiler/rustc_attr_parsing/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
7878
// tidy-alphabetical-start
7979
#![allow(internal_features)]
80-
#![cfg_attr(bootstrap, feature(let_chains))]
8180
#![doc(rust_logo)]
8281
#![feature(rustdoc_internals)]
8382
#![recursion_limit = "256"]

compiler/rustc_borrowck/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
33
// tidy-alphabetical-start
44
#![allow(internal_features)]
5-
#![cfg_attr(bootstrap, feature(let_chains))]
65
#![doc(rust_logo)]
76
#![feature(assert_matches)]
87
#![feature(box_patterns)]

compiler/rustc_builtin_macros/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![allow(internal_features)]
66
#![allow(rustc::diagnostic_outside_of_impl)]
77
#![allow(rustc::untranslatable_diagnostic)]
8-
#![cfg_attr(bootstrap, feature(let_chains))]
98
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
109
#![doc(rust_logo)]
1110
#![feature(assert_matches)]

compiler/rustc_codegen_llvm/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
77
// tidy-alphabetical-start
88
#![allow(internal_features)]
9-
#![cfg_attr(bootstrap, feature(let_chains))]
109
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1110
#![doc(rust_logo)]
1211
#![feature(assert_matches)]

compiler/rustc_codegen_ssa/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![allow(internal_features)]
33
#![allow(rustc::diagnostic_outside_of_impl)]
44
#![allow(rustc::untranslatable_diagnostic)]
5-
#![cfg_attr(bootstrap, feature(let_chains))]
65
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
76
#![doc(rust_logo)]
87
#![feature(assert_matches)]

compiler/rustc_const_eval/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// tidy-alphabetical-start
22
#![allow(internal_features)]
33
#![allow(rustc::diagnostic_outside_of_impl)]
4-
#![cfg_attr(bootstrap, feature(let_chains))]
54
#![doc(rust_logo)]
65
#![feature(assert_matches)]
76
#![feature(box_patterns)]

compiler/rustc_driver_impl/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
// tidy-alphabetical-start
88
#![allow(internal_features)]
99
#![allow(rustc::untranslatable_diagnostic)] // FIXME: make this translatable
10-
#![cfg_attr(bootstrap, feature(let_chains))]
1110
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1211
#![doc(rust_logo)]
1312
#![feature(decl_macro)]

compiler/rustc_errors/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#![allow(internal_features)]
88
#![allow(rustc::diagnostic_outside_of_impl)]
99
#![allow(rustc::untranslatable_diagnostic)]
10-
#![cfg_attr(bootstrap, feature(let_chains))]
1110
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1211
#![doc(rust_logo)]
1312
#![feature(array_windows)]

compiler/rustc_expand/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// tidy-alphabetical-start
22
#![allow(internal_features)]
33
#![allow(rustc::diagnostic_outside_of_impl)]
4-
#![cfg_attr(bootstrap, feature(let_chains))]
54
#![doc(rust_logo)]
65
#![feature(array_windows)]
76
#![feature(associated_type_defaults)]

compiler/rustc_fluent_macro/src/fluent.rs

-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ fn invocation_relative_path_to_absolute(span: Span, path: &str) -> PathBuf {
2525
path.to_path_buf()
2626
} else {
2727
// `/a/b/c/foo/bar.rs` contains the current macro invocation
28-
#[cfg(bootstrap)]
29-
let mut source_file_path = span.source_file().path();
30-
#[cfg(not(bootstrap))]
3128
let mut source_file_path = span.local_file().unwrap();
3229
// `/a/b/c/foo/`
3330
source_file_path.pop();

compiler/rustc_hir/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
55
// tidy-alphabetical-start
66
#![allow(internal_features)]
7-
#![cfg_attr(bootstrap, feature(let_chains))]
87
#![feature(associated_type_defaults)]
98
#![feature(box_patterns)]
109
#![feature(closure_track_caller)]

compiler/rustc_hir_analysis/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ This API is completely unstable and subject to change.
5959
#![allow(internal_features)]
6060
#![allow(rustc::diagnostic_outside_of_impl)]
6161
#![allow(rustc::untranslatable_diagnostic)]
62-
#![cfg_attr(bootstrap, feature(let_chains))]
6362
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
6463
#![doc(rust_logo)]
6564
#![feature(assert_matches)]

compiler/rustc_hir_pretty/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
//! the definitions in this file have equivalents in `rustc_ast_pretty`.
33
44
// tidy-alphabetical-start
5-
#![cfg_attr(bootstrap, feature(let_chains))]
65
#![recursion_limit = "256"]
76
// tidy-alphabetical-end
87

compiler/rustc_hir_typeck/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// tidy-alphabetical-start
22
#![allow(rustc::diagnostic_outside_of_impl)]
33
#![allow(rustc::untranslatable_diagnostic)]
4-
#![cfg_attr(bootstrap, feature(let_chains))]
54
#![feature(array_windows)]
65
#![feature(box_patterns)]
76
#![feature(if_let_guard)]

compiler/rustc_infer/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#![allow(internal_features)]
1717
#![allow(rustc::diagnostic_outside_of_impl)]
1818
#![allow(rustc::untranslatable_diagnostic)]
19-
#![cfg_attr(bootstrap, feature(let_chains))]
2019
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
2120
#![doc(rust_logo)]
2221
#![feature(assert_matches)]

compiler/rustc_interface/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tidy-alphabetical-start
2-
#![cfg_attr(bootstrap, feature(let_chains))]
32
#![feature(decl_macro)]
43
#![feature(file_buffered)]
54
#![feature(iter_intersperse)]

compiler/rustc_lint/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
2222
// tidy-alphabetical-start
2323
#![allow(internal_features)]
24-
#![cfg_attr(bootstrap, feature(let_chains))]
2524
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
2625
#![doc(rust_logo)]
2726
#![feature(array_windows)]

compiler/rustc_macros/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// tidy-alphabetical-start
22
#![allow(rustc::default_hash_types)]
3-
#![cfg_attr(bootstrap, feature(let_chains))]
43
#![feature(if_let_guard)]
54
#![feature(never_type)]
65
#![feature(proc_macro_diagnostic)]

compiler/rustc_metadata/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// tidy-alphabetical-start
22
#![allow(internal_features)]
3-
#![cfg_attr(bootstrap, feature(let_chains))]
43
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
54
#![doc(rust_logo)]
65
#![feature(coroutines)]

compiler/rustc_middle/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#![allow(internal_features)]
2929
#![allow(rustc::diagnostic_outside_of_impl)]
3030
#![allow(rustc::untranslatable_diagnostic)]
31-
#![cfg_attr(bootstrap, feature(let_chains))]
3231
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
3332
#![doc(rust_logo)]
3433
#![feature(allocator_api)]

compiler/rustc_mir_build/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// tidy-alphabetical-start
44
#![allow(rustc::diagnostic_outside_of_impl)]
55
#![allow(rustc::untranslatable_diagnostic)]
6-
#![cfg_attr(bootstrap, feature(let_chains))]
76
#![feature(assert_matches)]
87
#![feature(box_patterns)]
98
#![feature(if_let_guard)]

compiler/rustc_mir_dataflow/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tidy-alphabetical-start
2-
#![cfg_attr(bootstrap, feature(let_chains))]
32
#![feature(assert_matches)]
43
#![feature(associated_type_defaults)]
54
#![feature(box_patterns)]

compiler/rustc_mir_transform/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tidy-alphabetical-start
2-
#![cfg_attr(bootstrap, feature(let_chains))]
32
#![feature(array_windows)]
43
#![feature(assert_matches)]
54
#![feature(box_patterns)]

compiler/rustc_monomorphize/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tidy-alphabetical-start
2-
#![cfg_attr(bootstrap, feature(let_chains))]
32
#![feature(array_windows)]
43
#![feature(file_buffered)]
54
#![feature(if_let_guard)]

compiler/rustc_parse/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#![allow(internal_features)]
55
#![allow(rustc::diagnostic_outside_of_impl)]
66
#![allow(rustc::untranslatable_diagnostic)]
7-
#![cfg_attr(bootstrap, feature(let_chains))]
87
#![feature(assert_matches)]
98
#![feature(box_patterns)]
109
#![feature(debug_closure_helpers)]

compiler/rustc_passes/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
77
// tidy-alphabetical-start
88
#![allow(internal_features)]
9-
#![cfg_attr(bootstrap, feature(let_chains))]
109
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1110
#![doc(rust_logo)]
1211
#![feature(box_patterns)]

compiler/rustc_privacy/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// tidy-alphabetical-start
22
#![allow(internal_features)]
3-
#![cfg_attr(bootstrap, feature(let_chains))]
43
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
54
#![doc(rust_logo)]
65
#![feature(associated_type_defaults)]

compiler/rustc_query_system/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// tidy-alphabetical-start
22
#![allow(rustc::potential_query_instability, internal_features)]
3-
#![cfg_attr(bootstrap, feature(let_chains))]
43
#![feature(assert_matches)]
54
#![feature(core_intrinsics)]
65
#![feature(dropck_eyepatch)]

compiler/rustc_resolve/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#![allow(internal_features)]
1111
#![allow(rustc::diagnostic_outside_of_impl)]
1212
#![allow(rustc::untranslatable_diagnostic)]
13-
#![cfg_attr(bootstrap, feature(let_chains))]
1413
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1514
#![doc(rust_logo)]
1615
#![feature(assert_matches)]

compiler/rustc_sanitizers/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
//! compiler.
55
66
// tidy-alphabetical-start
7-
#![cfg_attr(bootstrap, feature(let_chains))]
87
// tidy-alphabetical-end
98

109
pub mod cfi;

compiler/rustc_session/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// tidy-alphabetical-start
22
#![allow(internal_features)]
3-
#![cfg_attr(bootstrap, feature(let_chains))]
43
#![feature(default_field_values)]
54
#![feature(iter_intersperse)]
65
#![feature(rustc_attrs)]

compiler/rustc_span/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
1818
// tidy-alphabetical-start
1919
#![allow(internal_features)]
20-
#![cfg_attr(bootstrap, feature(let_chains))]
2120
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
2221
#![doc(rust_logo)]
2322
#![feature(array_windows)]

compiler/rustc_symbol_mangling/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
9090
// tidy-alphabetical-start
9191
#![allow(internal_features)]
92-
#![cfg_attr(bootstrap, feature(let_chains))]
9392
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
9493
#![doc(rust_logo)]
9594
#![feature(assert_matches)]

compiler/rustc_target/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
1010
// tidy-alphabetical-start
1111
#![allow(internal_features)]
12-
#![cfg_attr(bootstrap, feature(let_chains))]
1312
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1413
#![doc(rust_logo)]
1514
#![feature(assert_matches)]

compiler/rustc_trait_selection/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#![allow(internal_features)]
1515
#![allow(rustc::diagnostic_outside_of_impl)]
1616
#![allow(rustc::untranslatable_diagnostic)]
17-
#![cfg_attr(bootstrap, feature(let_chains))]
1817
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1918
#![doc(rust_logo)]
2019
#![feature(assert_matches)]

compiler/rustc_ty_utils/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
77
// tidy-alphabetical-start
88
#![allow(internal_features)]
9-
#![cfg_attr(bootstrap, feature(let_chains))]
109
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1110
#![doc(rust_logo)]
1211
#![feature(assert_matches)]

library/alloc/src/string.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1832,7 +1832,7 @@ impl String {
18321832
#[stable(feature = "rust1", since = "1.0.0")]
18331833
#[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")]
18341834
#[rustc_confusables("length", "size")]
1835-
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
1835+
#[rustc_no_implicit_autorefs]
18361836
pub const fn len(&self) -> usize {
18371837
self.vec.len()
18381838
}
@@ -1852,7 +1852,7 @@ impl String {
18521852
#[must_use]
18531853
#[stable(feature = "rust1", since = "1.0.0")]
18541854
#[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")]
1855-
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
1855+
#[rustc_no_implicit_autorefs]
18561856
pub const fn is_empty(&self) -> bool {
18571857
self.len() == 0
18581858
}

library/alloctests/tests/fmt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![deny(warnings)]
22
// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint
33
#![allow(static_mut_refs)]
4-
#![cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
4+
#![allow(unnecessary_transmutes)]
55

66
use std::cell::RefCell;
77
use std::fmt::{self, Write};

library/core/src/char/convert.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub(super) const fn from_u32(i: u32) -> Option<char> {
2121
/// Converts a `u32` to a `char`, ignoring validity. See [`char::from_u32_unchecked`].
2222
#[inline]
2323
#[must_use]
24-
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
24+
#[allow(unnecessary_transmutes)]
2525
pub(super) const unsafe fn from_u32_unchecked(i: u32) -> char {
2626
// SAFETY: the caller must guarantee that `i` is a valid char value.
2727
unsafe {
@@ -222,7 +222,7 @@ impl FromStr for char {
222222
}
223223

224224
#[inline]
225-
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
225+
#[allow(unnecessary_transmutes)]
226226
const fn char_try_from_u32(i: u32) -> Result<char, CharTryFromError> {
227227
// This is an optimized version of the check
228228
// (i > MAX as u32) || (i >= 0xD800 && i <= 0xDFFF),

library/core/src/fmt/rt.rs

-8
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@ pub struct Placeholder {
1919
pub width: Count,
2020
}
2121

22-
#[cfg(bootstrap)]
23-
impl Placeholder {
24-
#[inline]
25-
pub const fn new(position: usize, flags: u32, precision: Count, width: Count) -> Self {
26-
Self { position, flags, precision, width }
27-
}
28-
}
29-
3022
/// Used by [width](https://doc.rust-lang.org/std/fmt/#width)
3123
/// and [precision](https://doc.rust-lang.org/std/fmt/#precision) specifiers.
3224
#[lang = "format_count"]

library/core/src/future/async_drop.rs

-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use crate::task::{Context, Poll};
2424
/// are `Copy` get implicitly duplicated by the compiler, making it very
2525
/// hard to predict when, and how often destructors will be executed. As such,
2626
/// these types cannot have destructors.
27-
#[cfg(not(bootstrap))]
2827
#[unstable(feature = "async_drop", issue = "126482")]
2928
#[lang = "async_drop"]
3029
pub trait AsyncDrop {
@@ -42,7 +41,6 @@ pub trait AsyncDrop {
4241
}
4342

4443
/// Async drop.
45-
#[cfg(not(bootstrap))]
4644
#[unstable(feature = "async_drop", issue = "126482")]
4745
#[lang = "async_drop_in_place"]
4846
pub async unsafe fn async_drop_in_place<T: ?Sized>(_to_drop: *mut T) {

library/core/src/future/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ mod pending;
2020
mod poll_fn;
2121
mod ready;
2222

23-
#[cfg(not(bootstrap))]
2423
#[unstable(feature = "async_drop", issue = "126482")]
2524
pub use async_drop::{AsyncDrop, async_drop_in_place};
2625
#[stable(feature = "into_future", since = "1.64.0")]

0 commit comments

Comments
 (0)