Skip to content

Commit 4afa3a8

Browse files
committed
Auto merge of #85984 - JohnTitor:rollup-rq0g9ph, r=JohnTitor
Rollup of 8 pull requests Successful merges: - #85717 (Document `From` impls for cow.rs) - #85850 (Remove unused feature gates) - #85888 (Fix typo in internal documentation for `TrustedRandomAccess`) - #85889 (Restoring the `num_def_ids` function in the CStore API ) - #85899 (jsondocck small cleanup) - #85937 (Fix bad suggestions for code from proc_macro) - #85963 (Show `::{{constructor}}` in std::any::type_name().) - #85977 (Fix linkcheck script from getting out of sync.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 1c82bb2 + edb8f65 commit 4afa3a8

File tree

38 files changed

+161
-120
lines changed

38 files changed

+161
-120
lines changed

Cargo.lock

+3-10
Original file line numberDiff line numberDiff line change
@@ -1749,11 +1749,10 @@ dependencies = [
17491749
"fs-err",
17501750
"getopts",
17511751
"jsonpath_lib",
1752-
"lazy_static",
1752+
"once_cell",
17531753
"regex",
1754-
"serde",
17551754
"serde_json",
1756-
"shlex 0.1.1",
1755+
"shlex",
17571756
]
17581757

17591758
[[package]]
@@ -2134,7 +2133,7 @@ dependencies = [
21342133
"serde",
21352134
"serde_derive",
21362135
"serde_json",
2137-
"shlex 1.0.0",
2136+
"shlex",
21382137
"tempfile",
21392138
"toml",
21402139
]
@@ -4809,12 +4808,6 @@ version = "0.1.5"
48094808
source = "registry+https://github.com/rust-lang/crates.io-index"
48104809
checksum = "45bb67a18fa91266cc7807181f62f9178a6873bfad7dc788c42e6430db40184f"
48114810

4812-
[[package]]
4813-
name = "shlex"
4814-
version = "0.1.1"
4815-
source = "registry+https://github.com/rust-lang/crates.io-index"
4816-
checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2"
4817-
48184811
[[package]]
48194812
name = "shlex"
48204813
version = "1.0.0"

compiler/rustc_ast/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@
1212
#![feature(box_patterns)]
1313
#![cfg_attr(bootstrap, feature(const_fn_unsize))]
1414
#![feature(const_fn_transmute)]
15-
#![feature(const_panic)]
1615
#![feature(crate_visibility_modifier)]
1716
#![feature(iter_zip)]
1817
#![feature(label_break_value)]
1918
#![feature(nll)]
2019
#![feature(min_specialization)]
21-
#![feature(trusted_step)]
2220
#![recursion_limit = "256"]
2321

2422
#[macro_use]

compiler/rustc_ast_passes/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
77
#![feature(bindings_after_at)]
88
#![feature(iter_is_partitioned)]
9-
#![feature(box_syntax)]
109
#![feature(box_patterns)]
1110
#![recursion_limit = "256"]
1211

compiler/rustc_codegen_ssa/src/lib.rs

-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
2-
#![feature(assert_matches)]
32
#![feature(bool_to_option)]
43
#![feature(box_patterns)]
5-
#![feature(drain_filter)]
64
#![feature(try_blocks)]
75
#![feature(in_band_lifetimes)]
86
#![feature(nll)]
97
#![feature(associated_type_bounds)]
10-
#![feature(iter_zip)]
118
#![recursion_limit = "256"]
12-
#![feature(box_syntax)]
139

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

compiler/rustc_data_structures/src/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@
1010
#![feature(array_windows)]
1111
#![feature(control_flow_enum)]
1212
#![feature(in_band_lifetimes)]
13-
#![feature(unboxed_closures)]
1413
#![feature(generator_trait)]
15-
#![feature(fn_traits)]
1614
#![feature(min_specialization)]
1715
#![feature(auto_traits)]
1816
#![feature(nll)]
1917
#![feature(allow_internal_unstable)]
2018
#![feature(hash_raw_entry)]
21-
#![feature(stmt_expr_attributes)]
2219
#![feature(core_intrinsics)]
2320
#![feature(test)]
2421
#![feature(associated_type_bounds)]

compiler/rustc_data_structures/src/obligation_forest/mod.rs

+1-18
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ impl<O: ForestObligation> ObligationForest<O> {
597597
Some(rpos) => {
598598
// Cycle detected.
599599
processor.process_backedge(
600-
stack[rpos..].iter().map(GetObligation(&self.nodes)),
600+
stack[rpos..].iter().map(|&i| &self.nodes[i].obligation),
601601
PhantomData,
602602
);
603603
}
@@ -705,20 +705,3 @@ impl<O: ForestObligation> ObligationForest<O> {
705705
});
706706
}
707707
}
708-
709-
// I need a Clone closure.
710-
#[derive(Clone)]
711-
struct GetObligation<'a, O>(&'a [Node<O>]);
712-
713-
impl<'a, 'b, O> FnOnce<(&'b usize,)> for GetObligation<'a, O> {
714-
type Output = &'a O;
715-
extern "rust-call" fn call_once(self, args: (&'b usize,)) -> &'a O {
716-
&self.0[*args.0].obligation
717-
}
718-
}
719-
720-
impl<'a, 'b, O> FnMut<(&'b usize,)> for GetObligation<'a, O> {
721-
extern "rust-call" fn call_mut(&mut self, args: (&'b usize,)) -> &'a O {
722-
&self.0[*args.0].obligation
723-
}
724-
}

compiler/rustc_expand/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![feature(bool_to_option)]
21
#![feature(crate_visibility_modifier)]
32
#![feature(decl_macro)]
43
#![feature(destructuring_assignment)]

compiler/rustc_hir/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/hir.html
44
55
#![feature(crate_visibility_modifier)]
6-
#![feature(const_panic)]
76
#![cfg_attr(bootstrap, feature(extended_key_value_attributes))]
87
#![feature(in_band_lifetimes)]
98
#![feature(once_cell)]
109
#![feature(min_specialization)]
11-
#![feature(trusted_step)]
1210
#![recursion_limit = "256"]
1311

1412
#[macro_use]

compiler/rustc_index/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
#![feature(allow_internal_unstable)]
22
#![feature(bench_black_box)]
3-
#![feature(const_panic)]
43
#![feature(extend_one)]
54
#![feature(iter_zip)]
65
#![feature(unboxed_closures)]
76
#![feature(test)]
87
#![feature(fn_traits)]
9-
#![feature(trusted_step)]
108

119
pub mod bit_set;
1210
pub mod vec;

compiler/rustc_index/src/vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl Idx for u32 {
6565
/// `u32::MAX`. You can also customize things like the `Debug` impl,
6666
/// what traits are derived, and so forth via the macro.
6767
#[macro_export]
68-
#[allow_internal_unstable(step_trait, rustc_attrs)]
68+
#[allow_internal_unstable(step_trait, rustc_attrs, trusted_step)]
6969
macro_rules! newtype_index {
7070
// ---- public rules ----
7171

compiler/rustc_infer/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@
1616
#![feature(bool_to_option)]
1717
#![feature(box_patterns)]
1818
#![feature(box_syntax)]
19-
#![feature(const_panic)]
2019
#![feature(extend_one)]
2120
#![feature(iter_zip)]
2221
#![feature(never_type)]
2322
#![feature(in_band_lifetimes)]
2423
#![feature(control_flow_enum)]
2524
#![feature(min_specialization)]
26-
#![feature(trusted_step)]
2725
#![recursion_limit = "512"] // For rustdoc
2826

2927
#[macro_use]

compiler/rustc_interface/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![feature(bool_to_option)]
22
#![feature(box_patterns)]
3-
#![feature(box_syntax)]
43
#![feature(internal_output_capture)]
54
#![feature(nll)]
65
#![feature(generator_trait)]

compiler/rustc_lint/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@
3636
#![feature(iter_zip)]
3737
#![feature(never_type)]
3838
#![feature(nll)]
39-
#![feature(half_open_range_patterns)]
40-
#![feature(exclusive_range_pattern)]
4139
#![feature(control_flow_enum)]
4240
#![recursion_limit = "256"]
4341

compiler/rustc_metadata/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
2-
#![feature(core_intrinsics)]
32
#![feature(crate_visibility_modifier)]
43
#![feature(drain_filter)]
54
#![feature(in_band_lifetimes)]
65
#![feature(nll)]
76
#![feature(once_cell)]
87
#![feature(proc_macro_internals)]
98
#![feature(min_specialization)]
10-
#![feature(stmt_expr_attributes)]
119
#![feature(try_blocks)]
1210
#![feature(never_type)]
1311
#![recursion_limit = "256"]

compiler/rustc_metadata/src/rmeta/decoder.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1931,6 +1931,10 @@ impl CrateMetadata {
19311931
self.root.hash
19321932
}
19331933

1934+
fn num_def_ids(&self) -> usize {
1935+
self.root.tables.def_keys.size()
1936+
}
1937+
19341938
fn local_def_id(&self, index: DefIndex) -> DefId {
19351939
DefId { krate: self.cnum, index }
19361940
}

compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs

+7
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,13 @@ impl CStore {
458458
self.get_crate_data(def_id.krate).module_expansion(def_id.index, sess)
459459
}
460460

461+
/// Only public-facing way to traverse all the definitions in a non-local crate.
462+
/// Critically useful for this third-party project: <https://github.com/hacspec/hacspec>.
463+
/// See <https://github.com/rust-lang/rust/pull/85889> for context.
464+
pub fn num_def_ids_untracked(&self, cnum: CrateNum) -> usize {
465+
self.get_crate_data(cnum).num_def_ids()
466+
}
467+
461468
pub fn item_attrs(&self, def_id: DefId, sess: &Session) -> Vec<ast::Attribute> {
462469
self.get_crate_data(def_id.krate).get_item_attrs(def_id.index, sess).collect()
463470
}

compiler/rustc_middle/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#![feature(bool_to_option)]
3030
#![feature(box_patterns)]
3131
#![feature(box_syntax)]
32-
#![feature(const_panic)]
3332
#![feature(core_intrinsics)]
3433
#![feature(discriminant_kind)]
3534
#![feature(never_type)]
@@ -50,7 +49,6 @@
5049
#![feature(associated_type_defaults)]
5150
#![feature(iter_zip)]
5251
#![feature(thread_local_const_init)]
53-
#![feature(trusted_step)]
5452
#![recursion_limit = "512"]
5553

5654
#[macro_use]

compiler/rustc_mir/src/interpret/intrinsics/type_name.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use rustc_hir::def_id::CrateNum;
2-
use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData};
2+
use rustc_hir::definitions::DisambiguatedDefPathData;
33
use rustc_middle::mir::interpret::Allocation;
44
use rustc_middle::ty::{
55
self,
@@ -127,11 +127,6 @@ impl<'tcx> Printer<'tcx> for AbsolutePathPrinter<'tcx> {
127127
) -> Result<Self::Path, Self::Error> {
128128
self = print_prefix(self)?;
129129

130-
// Skip `::{{constructor}}` on tuple/unit structs.
131-
if disambiguated_data.data == DefPathData::Ctor {
132-
return Ok(self);
133-
}
134-
135130
write!(self.path, "::{}", disambiguated_data.data).unwrap();
136131

137132
Ok(self)

compiler/rustc_mir/src/lib.rs

-4
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@ Rust MIR: a lowered representation of Rust.
1212
#![feature(bool_to_option)]
1313
#![feature(box_patterns)]
1414
#![feature(box_syntax)]
15-
#![feature(const_panic)]
1615
#![feature(crate_visibility_modifier)]
1716
#![feature(decl_macro)]
1817
#![feature(exact_size_is_empty)]
19-
#![feature(exhaustive_patterns)]
2018
#![feature(iter_zip)]
2119
#![feature(never_type)]
2220
#![feature(map_try_insert)]
2321
#![feature(min_specialization)]
24-
#![feature(slice_ptr_len)]
2522
#![feature(slice_ptr_get)]
2623
#![feature(trusted_len)]
2724
#![feature(try_blocks)]
@@ -31,7 +28,6 @@ Rust MIR: a lowered representation of Rust.
3128
#![feature(option_get_or_insert_default)]
3229
#![feature(once_cell)]
3330
#![feature(control_flow_enum)]
34-
#![feature(trusted_step)]
3531
#![recursion_limit = "256"]
3632

3733
#[macro_use]

compiler/rustc_mir_build/src/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
//! Construction of MIR from HIR.
22
//!
33
//! This crate also contains the match exhaustiveness and usefulness checking.
4-
#![feature(array_windows)]
54
#![feature(box_patterns)]
65
#![feature(box_syntax)]
7-
#![feature(const_panic)]
86
#![feature(control_flow_enum)]
97
#![feature(crate_visibility_modifier)]
108
#![feature(bool_to_option)]
119
#![feature(iter_zip)]
1210
#![feature(once_cell)]
1311
#![feature(min_specialization)]
14-
#![feature(trusted_step)]
1512
#![recursion_limit = "256"]
1613

1714
#[macro_use]

compiler/rustc_parse/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#![feature(array_windows)]
44
#![feature(crate_visibility_modifier)]
55
#![feature(bindings_after_at)]
6-
#![feature(iter_order_by)]
76
#![feature(box_syntax)]
87
#![feature(box_patterns)]
98
#![recursion_limit = "256"]

compiler/rustc_passes/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@
55
//! This API is completely unstable and subject to change.
66
77
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
8-
#![feature(const_panic)]
98
#![feature(crate_visibility_modifier)]
109
#![feature(in_band_lifetimes)]
1110
#![feature(iter_zip)]
1211
#![feature(nll)]
1312
#![feature(min_specialization)]
14-
#![feature(trusted_step)]
1513
#![recursion_limit = "256"]
1614

1715
#[macro_use]

compiler/rustc_query_impl/src/lib.rs

-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22
33
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
44
#![feature(in_band_lifetimes)]
5-
#![feature(exhaustive_patterns)]
65
#![feature(nll)]
76
#![feature(min_specialization)]
8-
#![feature(crate_visibility_modifier)]
9-
#![feature(once_cell)]
107
#![feature(rustc_attrs)]
11-
#![feature(never_type)]
128
#![recursion_limit = "256"]
139

1410
#[macro_use]

compiler/rustc_query_system/src/lib.rs

-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
#![feature(bool_to_option)]
2-
#![feature(const_panic)]
32
#![feature(core_intrinsics)]
4-
#![feature(drain_filter)]
53
#![feature(hash_raw_entry)]
64
#![feature(iter_zip)]
75
#![feature(min_specialization)]
8-
#![feature(stmt_expr_attributes)]
9-
#![feature(trusted_step)]
106

117
#[macro_use]
128
extern crate tracing;

compiler/rustc_serialize/src/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ Core encoding and decoding interfaces.
1414
#![feature(nll)]
1515
#![feature(associated_type_bounds)]
1616
#![feature(min_specialization)]
17-
#![feature(vec_spare_capacity)]
1817
#![feature(core_intrinsics)]
19-
#![feature(maybe_uninit_array_assume_init)]
20-
#![feature(maybe_uninit_uninit_array)]
2118
#![feature(maybe_uninit_slice)]
2219
#![feature(new_uninit)]
2320
#![cfg_attr(test, feature(test))]

compiler/rustc_span/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1717
#![feature(array_windows)]
1818
#![feature(crate_visibility_modifier)]
19-
#![feature(const_panic)]
2019
#![feature(negative_impls)]
2120
#![feature(nll)]
2221
#![feature(min_specialization)]
2322
#![feature(thread_local_const_init)]
24-
#![feature(trusted_step)]
2523

2624
#[macro_use]
2725
extern crate rustc_macros;

compiler/rustc_target/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@
99
1010
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1111
#![feature(bool_to_option)]
12-
#![feature(const_panic)]
1312
#![feature(nll)]
1413
#![feature(never_type)]
1514
#![feature(associated_type_bounds)]
1615
#![feature(exhaustive_patterns)]
1716
#![feature(min_specialization)]
18-
#![feature(trusted_step)]
1917

2018
use std::path::{Path, PathBuf};
2119

0 commit comments

Comments
 (0)