Skip to content

Commit a4dbb0a

Browse files
authored
Unrolled build for rust-lang#127769
Rollup merge of rust-lang#127769 - compiler-errors:ed-2024-dep, r=oli-obk Don't use implicit features in `Cargo.toml` in `compiler/` Fixes compiler crates to stop using implicit features (rust-lang/cargo#12826) which are denied in in edition 2024.
2 parents fcc325f + 7e1c4af commit a4dbb0a

File tree

13 files changed

+42
-33
lines changed

13 files changed

+42
-33
lines changed

compiler/rustc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ features = ['unprefixed_malloc_on_supported_platforms']
2727

2828
[features]
2929
# tidy-alphabetical-start
30-
jemalloc = ['jemalloc-sys']
30+
jemalloc = ['dep:jemalloc-sys']
3131
llvm = ['rustc_driver_impl/llvm']
3232
max_level_info = ['rustc_driver_impl/max_level_info']
3333
rustc_use_parallel_compiler = ['rustc_driver_impl/rustc_use_parallel_compiler']

compiler/rustc/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
fn main() {
3636
// See the comment at the top of this file for an explanation of this.
37-
#[cfg(feature = "jemalloc-sys")]
37+
#[cfg(feature = "jemalloc")]
3838
{
3939
use std::os::raw::{c_int, c_void};
4040

compiler/rustc_abi/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ default = ["nightly", "randomize"]
2121
# rust-analyzer depends on this crate and we therefore require it to built on a stable toolchain
2222
# without depending on rustc_data_structures, rustc_macros and rustc_serialize
2323
nightly = [
24-
"rustc_data_structures",
24+
"dep:rustc_data_structures",
25+
"dep:rustc_macros",
26+
"dep:rustc_serialize",
2527
"rustc_index/nightly",
26-
"rustc_macros",
27-
"rustc_serialize",
2828
]
29-
randomize = ["rand", "rand_xoshiro", "nightly"]
29+
randomize = ["dep:rand", "dep:rand_xoshiro", "nightly"]
3030
# tidy-alphabetical-end

compiler/rustc_ast_ir/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ rustc_span = { path = "../rustc_span", optional = true }
1414
[features]
1515
default = ["nightly"]
1616
nightly = [
17-
"rustc_serialize",
18-
"rustc_data_structures",
19-
"rustc_macros",
20-
"rustc_span",
17+
"dep:rustc_serialize",
18+
"dep:rustc_data_structures",
19+
"dep:rustc_macros",
20+
"dep:rustc_span",
2121
]

compiler/rustc_data_structures/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ portable-atomic = "1.5.1"
5656

5757
[features]
5858
# tidy-alphabetical-start
59-
rustc_use_parallel_compiler = ["indexmap/rustc-rayon", "rustc-rayon"]
59+
rustc_use_parallel_compiler = ["indexmap/rustc-rayon", "dep:rustc-rayon"]
6060
# tidy-alphabetical-end

compiler/rustc_index/Cargo.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,9 @@ smallvec = "1.8.1"
1515
[features]
1616
# tidy-alphabetical-start
1717
default = ["nightly"]
18-
nightly = ["rustc_serialize", "rustc_macros", "rustc_index_macros/nightly"]
18+
nightly = [
19+
"dep:rustc_serialize",
20+
"dep:rustc_macros",
21+
"rustc_index_macros/nightly",
22+
]
1923
# tidy-alphabetical-end

compiler/rustc_index/src/vec.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#[cfg(feature = "rustc_serialize")]
1+
#[cfg(feature = "nightly")]
22
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
33

44
use std::borrow::{Borrow, BorrowMut};
@@ -322,14 +322,14 @@ impl<I: Idx, T, const N: usize> From<[T; N]> for IndexVec<I, T> {
322322
}
323323
}
324324

325-
#[cfg(feature = "rustc_serialize")]
325+
#[cfg(feature = "nightly")]
326326
impl<S: Encoder, I: Idx, T: Encodable<S>> Encodable<S> for IndexVec<I, T> {
327327
fn encode(&self, s: &mut S) {
328328
Encodable::encode(&self.raw, s);
329329
}
330330
}
331331

332-
#[cfg(feature = "rustc_serialize")]
332+
#[cfg(feature = "nightly")]
333333
impl<D: Decoder, I: Idx, T: Decodable<D>> Decodable<D> for IndexVec<I, T> {
334334
fn decode(d: &mut D) -> Self {
335335
IndexVec::from_raw(Vec::<T>::decode(d))

compiler/rustc_interface/Cargo.toml

+7-2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ tracing = "0.1"
5353

5454
[features]
5555
# tidy-alphabetical-start
56-
llvm = ['rustc_codegen_llvm']
57-
rustc_use_parallel_compiler = ['rustc-rayon', 'rustc-rayon-core', 'rustc_query_impl/rustc_use_parallel_compiler', 'rustc_errors/rustc_use_parallel_compiler']
56+
llvm = ['dep:rustc_codegen_llvm']
57+
rustc_use_parallel_compiler = [
58+
'dep:rustc-rayon',
59+
'dep:rustc-rayon-core',
60+
'rustc_query_impl/rustc_use_parallel_compiler',
61+
'rustc_errors/rustc_use_parallel_compiler'
62+
]
5863
# tidy-alphabetical-end

compiler/rustc_middle/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ tracing = "0.1"
4040

4141
[features]
4242
# tidy-alphabetical-start
43-
rustc_use_parallel_compiler = ["rustc-rayon-core"]
43+
rustc_use_parallel_compiler = ["dep:rustc-rayon-core"]
4444
# tidy-alphabetical-end

compiler/rustc_next_trait_solver/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ tracing = "0.1"
2020
[features]
2121
default = ["nightly"]
2222
nightly = [
23+
"dep:rustc_data_structures",
24+
"dep:rustc_macros",
25+
"dep:rustc_serialize",
2326
"rustc_ast_ir/nightly",
24-
"rustc_data_structures",
2527
"rustc_index/nightly",
26-
"rustc_macros",
27-
"rustc_serialize",
2828
"rustc_type_ir/nightly",
2929
]

compiler/rustc_query_system/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ tracing = "0.1"
2626

2727
[features]
2828
# tidy-alphabetical-start
29-
rustc_use_parallel_compiler = ["rustc-rayon-core"]
29+
rustc_use_parallel_compiler = ["dep:rustc-rayon-core"]
3030
# tidy-alphabetical-end

compiler/rustc_transmute/Cargo.toml

+7-7
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ tracing = "0.1"
1818

1919
[features]
2020
rustc = [
21-
"rustc_hir",
22-
"rustc_infer",
23-
"rustc_macros",
24-
"rustc_middle",
25-
"rustc_span",
26-
"rustc_target",
27-
"rustc_ast_ir",
21+
"dep:rustc_hir",
22+
"dep:rustc_infer",
23+
"dep:rustc_macros",
24+
"dep:rustc_middle",
25+
"dep:rustc_span",
26+
"dep:rustc_target",
27+
"dep:rustc_ast_ir",
2828
]
2929

3030
[dev-dependencies]

compiler/rustc_type_ir/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ tracing = "0.1"
2222
[features]
2323
default = ["nightly"]
2424
nightly = [
25+
"dep:rustc_serialize",
26+
"dep:rustc_span",
27+
"dep:rustc_data_structures",
28+
"dep:rustc_macros",
2529
"smallvec/may_dangle",
2630
"smallvec/union",
2731
"rustc_index/nightly",
28-
"rustc_serialize",
29-
"rustc_span",
30-
"rustc_data_structures",
31-
"rustc_macros",
3232
"rustc_ast_ir/nightly"
3333
]

0 commit comments

Comments
 (0)