diff options
| author | bors <bors@rust-lang.org> | 2021-09-26 02:31:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-09-26 02:31:12 +0000 |
| commit | 4da89a180facdecf168cbe0ddbc6bfbdd9f6e696 (patch) | |
| tree | 6ca1cabca774e0b9e29a500cc78dfcc979fa9bc6 /compiler | |
| parent | addb4da686a97da46159f0123cb6cdc2ce3d7fdb (diff) | |
| parent | 7d9a0e5da9a9a4afc3082bff06cf8618da4dabcb (diff) | |
| download | rust-4da89a180facdecf168cbe0ddbc6bfbdd9f6e696.tar.gz rust-4da89a180facdecf168cbe0ddbc6bfbdd9f6e696.zip | |
Auto merge of #89262 - Manishearth:rollup-vtkbetm, r=Manishearth
Rollup of 7 pull requests Successful merges: - #88895 (rustdoc: Cleanup `clean` part 2) - #88973 (Expose the std_detect env_override feature) - #89010 (Add some intra doc links) - #89198 (rustdoc: Don't show hidden trait methods) - #89216 (Consistent big O notation) - #89224 (Change the order of imports suggestions) - #89256 (Fix typo in release notes) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_data_structures/src/graph/scc/mod.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_data_structures/src/sorted_map.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/diagnostics.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 1 |
4 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_data_structures/src/graph/scc/mod.rs b/compiler/rustc_data_structures/src/graph/scc/mod.rs index e2cbb09ce5e..d8ac815a158 100644 --- a/compiler/rustc_data_structures/src/graph/scc/mod.rs +++ b/compiler/rustc_data_structures/src/graph/scc/mod.rs @@ -3,7 +3,7 @@ //! Also computes as the resulting DAG if each SCC is replaced with a //! node in the graph. This uses [Tarjan's algorithm]( //! https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm) -//! that completes in *O(n)* time. +//! that completes in *O*(*n*) time. use crate::fx::FxHashSet; use crate::graph::vec_graph::VecGraph; diff --git a/compiler/rustc_data_structures/src/sorted_map.rs b/compiler/rustc_data_structures/src/sorted_map.rs index 9a28f8f4e21..20e2a3b9696 100644 --- a/compiler/rustc_data_structures/src/sorted_map.rs +++ b/compiler/rustc_data_structures/src/sorted_map.rs @@ -9,7 +9,7 @@ mod index_map; pub use index_map::SortedIndexMultiMap; /// `SortedMap` is a data structure with similar characteristics as BTreeMap but -/// slightly different trade-offs: lookup, insertion, and removal are O(log(N)) +/// slightly different trade-offs: lookup, insertion, and removal are *O*(log(*n*)) /// and elements can be iterated in order cheaply. /// /// `SortedMap` can be faster than a `BTreeMap` for small sizes (<50) since it diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index 435c79d2daf..d6ff5a7e90b 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -1706,6 +1706,9 @@ crate fn show_candidates( candidates.iter().map(|c| path_names_to_string(&c.path)).collect(); path_strings.sort(); + let core_path_strings = + path_strings.drain_filter(|p| p.starts_with("core::")).collect::<Vec<String>>(); + path_strings.extend(core_path_strings); path_strings.dedup(); let (determiner, kind) = if candidates.len() == 1 { diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 68db06370ff..1cbe8f41d92 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -10,6 +10,7 @@ #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] #![feature(box_patterns)] +#![feature(drain_filter)] #![feature(bool_to_option)] #![feature(crate_visibility_modifier)] #![feature(format_args_capture)] |
