Skip to content

Commit 22c3a71

Browse files
Switch bootstrap cfgs
1 parent ea65f50 commit 22c3a71

File tree

56 files changed

+64
-147
lines changed

Some content is hidden

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

56 files changed

+64
-147
lines changed

compiler/rustc_ast_lowering/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#![feature(let_else)]
3636
#![feature(never_type)]
3737
#![recursion_limit = "256"]
38-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
38+
#![allow(rustc::potential_query_instability)]
3939

4040
use rustc_ast::token::{self, Token};
4141
use rustc_ast::tokenstream::{CanSynthesizeMissingTokens, TokenStream, TokenTree};

compiler/rustc_ast_passes/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#![feature(box_patterns)]
99
#![feature(let_else)]
1010
#![recursion_limit = "256"]
11-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
11+
#![allow(rustc::potential_query_instability)]
1212

1313
pub mod ast_validation;
1414
pub mod feature_gate;

compiler/rustc_borrowck/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#![feature(trusted_step)]
1010
#![feature(try_blocks)]
1111
#![recursion_limit = "256"]
12-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
12+
#![allow(rustc::potential_query_instability)]
1313

1414
#[macro_use]
1515
extern crate rustc_middle;

compiler/rustc_builtin_macros/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#![feature(proc_macro_internals)]
1414
#![feature(proc_macro_quote)]
1515
#![recursion_limit = "256"]
16-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
16+
#![allow(rustc::potential_query_instability)]
1717

1818
extern crate proc_macro;
1919

compiler/rustc_codegen_llvm/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#![feature(extern_types)]
1212
#![feature(nll)]
1313
#![recursion_limit = "256"]
14-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
14+
#![allow(rustc::potential_query_instability)]
1515

1616
use back::write::{create_informational_target_machine, create_target_machine};
1717

compiler/rustc_codegen_ssa/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#![feature(nll)]
88
#![feature(associated_type_bounds)]
99
#![recursion_limit = "256"]
10-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
10+
#![allow(rustc::potential_query_instability)]
1111

1212
//! This crate contains codegen code that is used by all codegen backends (LLVM and others).
1313
//! The backend-agnostic functions of this crate use functions defined in various traits that

compiler/rustc_const_eval/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Rust MIR: a lowered representation of Rust.
2222
#![feature(trusted_step)]
2323
#![feature(try_blocks)]
2424
#![recursion_limit = "256"]
25-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
25+
#![allow(rustc::potential_query_instability)]
2626

2727
#[macro_use]
2828
extern crate tracing;

compiler/rustc_data_structures/src/intern.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ mod private {
2020
/// but you can only construct a `Interned` with `new_unchecked`, and not
2121
/// directly.
2222
#[derive(Debug)]
23-
#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
23+
#[rustc_pass_by_value]
2424
pub struct Interned<'a, T>(pub &'a T, pub private::PrivateZst);
2525

2626
impl<'a, T> Interned<'a, T> {

compiler/rustc_data_structures/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#![feature(vec_into_raw_parts)]
2929
#![allow(rustc::default_hash_types)]
3030
#![deny(unaligned_references)]
31-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
31+
#![allow(rustc::potential_query_instability)]
3232

3333
#[macro_use]
3434
extern crate tracing;

compiler/rustc_driver/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#![feature(let_else)]
1010
#![feature(once_cell)]
1111
#![recursion_limit = "256"]
12-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
12+
#![allow(rustc::potential_query_instability)]
1313

1414
#[macro_use]
1515
extern crate tracing;

compiler/rustc_errors/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#![feature(if_let_guard)]
99
#![feature(let_else)]
1010
#![feature(nll)]
11-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
1211
#![feature(adt_const_params)]
1312
#![allow(incomplete_features)]
13+
#![allow(rustc::potential_query_instability)]
1414

1515
#[macro_use]
1616
extern crate rustc_macros;

compiler/rustc_expand/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#![feature(proc_macro_span)]
1010
#![feature(try_blocks)]
1111
#![recursion_limit = "256"]
12-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
12+
#![allow(rustc::potential_query_instability)]
1313

1414
#[macro_use]
1515
extern crate rustc_macros;

compiler/rustc_incremental/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#![feature(let_else)]
66
#![feature(nll)]
77
#![recursion_limit = "256"]
8-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
8+
#![allow(rustc::potential_query_instability)]
99

1010
#[macro_use]
1111
extern crate rustc_middle;

compiler/rustc_infer/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#![feature(min_specialization)]
2424
#![feature(label_break_value)]
2525
#![recursion_limit = "512"] // For rustdoc
26-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
26+
#![allow(rustc::potential_query_instability)]
2727

2828
#[macro_use]
2929
extern crate rustc_macros;

compiler/rustc_interface/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![feature(nll)]
77
#![feature(once_cell)]
88
#![recursion_limit = "256"]
9-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
9+
#![allow(rustc::potential_query_instability)]
1010

1111
mod callbacks;
1212
pub mod interface;

compiler/rustc_lint/src/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl LintStore {
147147
&'t self,
148148
) -> impl Iterator<Item = (&'static str, Vec<LintId>, bool)> + 't {
149149
// This function is not used in a way which observes the order of lints.
150-
#[cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
150+
#[allow(rustc::potential_query_instability)]
151151
self.lint_groups
152152
.iter()
153153
.filter(|(_, LintGroup { depr, .. })| {

compiler/rustc_lint/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#![feature(nll)]
3939
#![feature(control_flow_enum)]
4040
#![recursion_limit = "256"]
41-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
41+
#![allow(rustc::potential_query_instability)]
4242

4343
#[macro_use]
4444
extern crate rustc_middle;

compiler/rustc_metadata/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#![feature(try_blocks)]
1010
#![feature(never_type)]
1111
#![recursion_limit = "256"]
12-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
12+
#![allow(rustc::potential_query_instability)]
1313

1414
extern crate proc_macro;
1515

compiler/rustc_middle/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
#![feature(unwrap_infallible)]
5858
#![feature(decl_macro)]
5959
#![recursion_limit = "512"]
60-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
60+
#![allow(rustc::potential_query_instability)]
6161

6262
#[macro_use]
6363
extern crate bitflags;

compiler/rustc_middle/src/ty/consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub use valtree::*;
2121

2222
/// Use this rather than `ConstS`, whenever possible.
2323
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, HashStable)]
24-
#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
24+
#[rustc_pass_by_value]
2525
pub struct Const<'tcx>(pub Interned<'tcx, ConstS<'tcx>>);
2626

2727
impl<'tcx> fmt::Debug for Const<'tcx> {

compiler/rustc_middle/src/ty/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ pub struct FreeRegionInfo {
970970
/// [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/ty.html
971971
#[derive(Copy, Clone)]
972972
#[rustc_diagnostic_item = "TyCtxt"]
973-
#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
973+
#[rustc_pass_by_value]
974974
pub struct TyCtxt<'tcx> {
975975
gcx: &'tcx GlobalCtxt<'tcx>,
976976
}

compiler/rustc_middle/src/ty/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ static_assert_size!(TyS<'_>, 40);
433433
/// Use this rather than `TyS`, whenever possible.
434434
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
435435
#[rustc_diagnostic_item = "Ty"]
436-
#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
436+
#[rustc_pass_by_value]
437437
pub struct Ty<'tcx>(Interned<'tcx, TyS<'tcx>>);
438438

439439
// Statics only used for internal testing.
@@ -486,7 +486,7 @@ static_assert_size!(PredicateS<'_>, 56);
486486

487487
/// Use this rather than `PredicateS`, whenever possible.
488488
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
489-
#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
489+
#[rustc_pass_by_value]
490490
pub struct Predicate<'tcx>(Interned<'tcx, PredicateS<'tcx>>);
491491

492492
impl<'tcx> Predicate<'tcx> {

compiler/rustc_middle/src/ty/sty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1396,7 +1396,7 @@ impl ParamConst {
13961396

13971397
/// Use this rather than `TyKind`, whenever possible.
13981398
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, HashStable)]
1399-
#[cfg_attr(not(bootstrap), rustc_pass_by_value)]
1399+
#[rustc_pass_by_value]
14001400
pub struct Region<'tcx>(pub Interned<'tcx, RegionKind>);
14011401

14021402
impl<'tcx> Deref for Region<'tcx> {

compiler/rustc_mir_build/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#![feature(once_cell)]
1010
#![feature(min_specialization)]
1111
#![recursion_limit = "256"]
12-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
12+
#![allow(rustc::potential_query_instability)]
1313

1414
#[macro_use]
1515
extern crate tracing;

compiler/rustc_mir_transform/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#![feature(trusted_step)]
1111
#![feature(try_blocks)]
1212
#![recursion_limit = "256"]
13-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
13+
#![allow(rustc::potential_query_instability)]
1414

1515
#[macro_use]
1616
extern crate tracing;

compiler/rustc_monomorphize/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![feature(control_flow_enum)]
55
#![feature(let_else)]
66
#![recursion_limit = "256"]
7-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
7+
#![allow(rustc::potential_query_instability)]
88

99
#[macro_use]
1010
extern crate tracing;

compiler/rustc_passes/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#![feature(nll)]
1414
#![feature(try_blocks)]
1515
#![recursion_limit = "256"]
16-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
16+
#![allow(rustc::potential_query_instability)]
1717

1818
#[macro_use]
1919
extern crate rustc_middle;

compiler/rustc_privacy/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![feature(try_blocks)]
55
#![feature(associated_type_defaults)]
66
#![recursion_limit = "256"]
7-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
7+
#![allow(rustc::potential_query_instability)]
88

99
use rustc_ast::MacroDef;
1010
use rustc_attr as attr;

compiler/rustc_query_impl/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#![feature(once_cell)]
88
#![feature(rustc_attrs)]
99
#![recursion_limit = "256"]
10-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
10+
#![allow(rustc::potential_query_instability)]
1111

1212
#[macro_use]
1313
extern crate rustc_macros;

compiler/rustc_query_system/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#![feature(let_else)]
66
#![feature(min_specialization)]
77
#![feature(extern_types)]
8-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
8+
#![allow(rustc::potential_query_instability)]
99

1010
#[macro_use]
1111
extern crate tracing;

compiler/rustc_resolve/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#![feature(nll)]
1919
#![recursion_limit = "256"]
2020
#![allow(rustdoc::private_intra_doc_links)]
21-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
21+
#![allow(rustc::potential_query_instability)]
2222

2323
#[macro_use]
2424
extern crate tracing;

compiler/rustc_save_analysis/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#![feature(nll)]
44
#![feature(let_else)]
55
#![recursion_limit = "256"]
6-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
6+
#![allow(rustc::potential_query_instability)]
77

88
mod dump_visitor;
99
mod dumper;

compiler/rustc_session/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![feature(min_specialization)]
55
#![feature(once_cell)]
66
#![recursion_limit = "256"]
7-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
7+
#![allow(rustc::potential_query_instability)]
88

99
#[macro_use]
1010
extern crate rustc_macros;

compiler/rustc_span/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#![feature(negative_impls)]
2323
#![feature(nll)]
2424
#![feature(min_specialization)]
25-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
25+
#![allow(rustc::potential_query_instability)]
2626

2727
#[macro_use]
2828
extern crate rustc_macros;

compiler/rustc_span/src/span_encoding.rs

+2-9
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,8 @@ use rustc_data_structures::fx::FxIndexSet;
6161
/// using the callback `SPAN_TRACK` to access the query engine.
6262
///
6363
#[derive(Clone, Copy, Eq, PartialEq, Hash)]
64-
// FIXME(@lcnr): Enable this attribute once the bootstrap
65-
// compiler knows of `rustc_pass_by_value`.
66-
//
67-
// Right now, this lint would only trigger when compiling the
68-
// stage 2 compiler, which is fairly annoying as there are
69-
// a lot of places using `&Span` right now. After the next bootstrap bump,
70-
// the lint will already trigger when using stage 1, which is a lot less annoying.
71-
//
72-
// #[cfg_attr(not(bootstrap), rustc_pass_by_value)]
64+
// FIXME: Enable this in the bootstrap bump, but separate commit.
65+
// #[rustc_pass_by_value]
7366
pub struct Span {
7467
base_or_index: u32,
7568
len_or_tag: u16,

compiler/rustc_symbol_mangling/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
#![feature(never_type)]
9292
#![feature(nll)]
9393
#![recursion_limit = "256"]
94-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
94+
#![allow(rustc::potential_query_instability)]
9595

9696
#[macro_use]
9797
extern crate rustc_middle;

compiler/rustc_trait_selection/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#![feature(crate_visibility_modifier)]
2323
#![feature(control_flow_enum)]
2424
#![recursion_limit = "512"] // For rustdoc
25-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
25+
#![allow(rustc::potential_query_instability)]
2626

2727
#[macro_use]
2828
extern crate rustc_macros;

compiler/rustc_typeck/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ This API is completely unstable and subject to change.
6969
#![feature(control_flow_enum)]
7070
#![feature(hash_drain_filter)]
7171
#![recursion_limit = "256"]
72-
#![cfg_attr(not(bootstrap), allow(rustc::potential_query_instability))]
72+
#![allow(rustc::potential_query_instability)]
7373

7474
#[macro_use]
7575
extern crate tracing;

library/alloc/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@
139139
#![feature(associated_type_bounds)]
140140
#![feature(box_syntax)]
141141
#![feature(cfg_sanitize)]
142-
#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
143142
#![feature(const_deref)]
144143
#![feature(const_fn_trait_bound)]
145144
#![feature(const_mut_refs)]

library/core/src/intrinsics.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,6 @@ extern "rust-intrinsic" {
19361936
/// - If the `ptr` is created in an another const, this intrinsic doesn't deallocate it.
19371937
/// - If the `ptr` is pointing to a local variable, this intrinsic doesn't deallocate it.
19381938
#[rustc_const_unstable(feature = "const_heap", issue = "79597")]
1939-
#[cfg(not(bootstrap))]
19401939
pub fn const_deallocate(ptr: *mut u8, size: usize, align: usize);
19411940

19421941
/// Determines whether the raw bytes of the two values are equal.

library/core/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
#![feature(associated_type_bounds)]
157157
#![feature(auto_traits)]
158158
#![feature(cfg_target_has_atomic)]
159-
#![cfg_attr(not(bootstrap), feature(cfg_target_has_atomic_equal_alignment))]
159+
#![feature(cfg_target_has_atomic_equal_alignment)]
160160
#![feature(const_fn_floating_point_arithmetic)]
161161
#![feature(const_fn_fn_ptr_basics)]
162162
#![feature(const_fn_trait_bound)]

0 commit comments

Comments
 (0)