Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 22 pull requests #74403

Closed
wants to merge 92 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
c4b0265
Enable some timeouts in SGX platform
mzohreva Jun 12, 2020
d7dc64b
Handle spurious wakeups in wait_timeout_sgx
mzohreva Jun 12, 2020
c5d1fcd
Allow more ui tests for SGX
mzohreva Jun 12, 2020
3442d23
Improve wait_timeout_sgx, simplify usercalls::wait
mzohreva Jun 18, 2020
fde8d11
Don't pollute docs/suggestions with libstd deps
alexcrichton Jun 17, 2020
99c1513
Small cleanup for E0705 explanation
GuillaumeGomez Jun 27, 2020
582071c
Ignoring test case: [codegen] repr-transparent-aggregates-1.rs for aa…
Jul 1, 2020
c457b67
Remove unnecessary check in SGX wait usercall
mzohreva Jul 1, 2020
69d5fc1
Clean up E0710 explanation
GuillaumeGomez Jun 28, 2020
9b6b400
Remove some `ignore-stage1` annotations.
ehuss Jul 3, 2020
95bf7b7
add regression test for #61216
euclio Jul 3, 2020
b0884c0
Move #[doc(alias)] check in rustc
GuillaumeGomez Jul 8, 2020
24abe16
Disable 44056 test with debug on macos.
ehuss Jul 9, 2020
1acccb0
Make hir ProjectionKind more precise
arora-aman Jul 2, 2020
9f91a95
Ignore changes when debug assertions are enabled.
ehuss Jul 9, 2020
1466598
Address review comments
mzohreva Jul 11, 2020
382d5bb
Focus on the current file in the source file sidebar
GuillaumeGomez Jul 14, 2020
c3ee75d
rustdoc: glue tokens before highlighting
euclio Jun 27, 2020
f970632
Don't render unstable for rustc docs
tesuji Jul 15, 2020
47fea96
Remove unused CSS rules for internal rustc items
tesuji Jul 15, 2020
0f4e4a0
rustdoc: Rename internal API fns to `into_string`
tesuji Jul 15, 2020
a5275ff
Don't run everybody_loops for rustdoc
jyn514 Jun 20, 2020
b3187aa
Don't run analysis pass in rustdoc
jyn514 Jun 20, 2020
1b8accb
Add an option not to report resolution errors for rustdoc
jyn514 Jun 20, 2020
14a8707
Add `rustdoc` tests from #72088
ecstatic-morse Jun 7, 2020
768d6a4
Don't ICE on errors in function returning impl trait
jyn514 Jul 3, 2020
a93bcc9
Recurse into function bodies, but don't typeck closures
jyn514 Jul 9, 2020
d010443
Add test case for #65863
jyn514 Jul 9, 2020
cf844d2
Don't make typeck_tables_of public
jyn514 Jul 10, 2020
0cbc1cd
Avoid unnecessary enum
jyn514 Jul 10, 2020
3576f5d
Address review comments about code style
jyn514 Jul 10, 2020
bbe4971
Don't crash on Vec<DoesNotExist>
jyn514 Jul 10, 2020
2f29e69
Mention `cargo check` in help message
jyn514 Jul 10, 2020
763d373
Use tcx as the only context for visitor
jyn514 Jul 10, 2020
0759a55
Remove unnecessary lifetime parameter
jyn514 Jul 10, 2020
2d0e8e2
--bless
jyn514 Jul 10, 2020
02a24c8
Don't ICE on infinitely recursive types
jyn514 Jul 11, 2020
4c88070
Use mem::replace instead of rewriting it
jyn514 Jul 11, 2020
b2ff0e7
Fix comment
jyn514 Jul 11, 2020
ac9157b
EMPTY_MAP -> EMPTY_SET
jyn514 Jul 12, 2020
6eec9fb
Address review comments
jyn514 Jul 12, 2020
e117b47
Catch errors for any new item, not just trait implementations
jyn514 Jul 15, 2020
281ca13
Use the default providers in rustc_interface instead of adding our own
jyn514 Jul 15, 2020
703f680
Don't panic if the lhs of a div by zero is not statically known
oli-obk Jul 10, 2020
85c25ae
Move usercall_wait_timeout to abi::usercalls::wait_timeout
mzohreva Jul 15, 2020
1813ae7
Add RISC-V GNU/Linux to src/tools/build-manifest as a host platform
msizanoen1 Jul 16, 2020
593c7fe
Fix typo in std::mem::transmute documentation
ColoredCarrot Jul 16, 2020
338a271
forbid generic params in the type of const params
lcnr Jul 8, 2020
14a1031
add self dependent const param test
lcnr Jul 8, 2020
3f55840
relax Node lt bounds
lcnr Jul 9, 2020
6f5d8bf
don't supply generics to AnonConsts in param lists
lcnr Jul 9, 2020
0c511ab
update help message
lcnr Jul 16, 2020
01f5dd3
bless ui tests
lcnr Jul 16, 2020
e009b53
add regression tests for #67144
lcnr Jul 16, 2020
333dce9
add regression test for #68596
lcnr Jul 16, 2020
137ca05
add regression test for #70217
lcnr Jul 16, 2020
eee160c
add regression test for #70586
lcnr Jul 16, 2020
f52039d
add regression test for #71169
lcnr Jul 16, 2020
a2b1827
add regression test for #71348
lcnr Jul 16, 2020
de8d2e8
add regression test for #71805
lcnr Jul 16, 2020
946cb11
add regression test for #73120
lcnr Jul 16, 2020
09ba0bd
add regression test for #73491
lcnr Jul 16, 2020
e230950
add regression test for #73508
lcnr Jul 16, 2020
d187e81
add regression test for #73730
lcnr Jul 16, 2020
8faeb0e
add regression test for #74255
lcnr Jul 16, 2020
ca253ca
Clean up or comment every unwrap in BTreeMap's main code.
ssomers Jul 13, 2020
b82d332
Separate off BTreeMap support functions and loose their irrelevant bo…
ssomers Jul 14, 2020
631b2b9
Remove unused lazy_static
jyn514 Jul 16, 2020
e28c0ea
Fix typo in the latest release note
rhysd Jul 16, 2020
52c65e0
Remove elements iterator clone and only keep first element instead
GuillaumeGomez Jul 16, 2020
7996785
Rollup merge of #73269 - mzohreva:mz/sgx-wait-timeout, r=jethrogb
Manishearth Jul 16, 2020
4c217c5
Rollup merge of #73566 - jyn514:name-resolve-first, r=eddyb
Manishearth Jul 16, 2020
94f035a
Rollup merge of #73771 - alexcrichton:ignore-unstable, r=estebank,Gui…
Manishearth Jul 16, 2020
985cc74
Rollup merge of #73794 - GuillaumeGomez:cleanup-e0705, r=Dylan-DPC
Manishearth Jul 16, 2020
9a8ac00
Rollup merge of #73807 - euclio:rustdoc-highlighting, r=ollie27,Guill…
Manishearth Jul 16, 2020
776499c
Rollup merge of #73835 - GuillaumeGomez:cleanup-e0710, r=Dylan-DPC
Manishearth Jul 16, 2020
a686390
Rollup merge of #73926 - joaopaulocarreiro:github_rust-6, r=nikomatsakis
Manishearth Jul 16, 2020
30a0e10
Rollup merge of #73981 - ehuss:remove-ignore-stage1, r=nikomatsakis
Manishearth Jul 16, 2020
448860b
Rollup merge of #73998 - euclio:search-index-determinism, r=nikomatsakis
Manishearth Jul 16, 2020
ec4f4e1
Rollup merge of #74140 - sexxi-goose:precise_hir_projections, r=nikom…
Manishearth Jul 16, 2020
48794b3
Rollup merge of #74148 - GuillaumeGomez:doc-alias-check, r=Manishearth
Manishearth Jul 16, 2020
e51b3db
Rollup merge of #74159 - lcnr:const-generic-ty-decl, r=varkor
Manishearth Jul 16, 2020
71a4d5e
Rollup merge of #74171 - ehuss:44056-debug-macos, r=nikomatsakis
Manishearth Jul 16, 2020
1ed0b41
Rollup merge of #74221 - oli-obk:const_prop_ice, r=wesleywiser
Manishearth Jul 16, 2020
1c0f58a
Rollup merge of #74325 - GuillaumeGomez:focus-source-file-sidebar, r=…
Manishearth Jul 16, 2020
6acbb12
Rollup merge of #74351 - lzutao:remove-rustc-internal-compiler-warns,…
Manishearth Jul 16, 2020
c3eb4bc
Rollup merge of #74359 - lzutao:rustdoc-tostring, r=GuillaumeGomez
Manishearth Jul 16, 2020
1be5cef
Rollup merge of #74386 - msizanoen1:riscv-add-manifest-host, r=pietro…
Manishearth Jul 16, 2020
d714b16
Rollup merge of #74390 - ColoredCarrot:patch-1, r=lcnr
Manishearth Jul 16, 2020
de757e2
Rollup merge of #74391 - ssomers:btree_refactor, r=Mark-Simulacrum
Manishearth Jul 16, 2020
658d5d0
Rollup merge of #74392 - lcnr:const-generics-update, r=varkor
Manishearth Jul 16, 2020
cabbca7
Rollup merge of #74397 - rhysd:patch-1, r=jonas-schievink
Manishearth Jul 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Libraries
// Prints "abcdefghijklmnopqrstuvwxyz"
```
- [`OsString` now implements `FromStr`.][71662]
- [The `saturating_neg` method as been added to all signed integer primitive
- [The `saturating_neg` method has been added to all signed integer primitive
types, and the `saturating_abs` method has been added for all integer
primitive types.][71886]
- [`Arc<T>`, `Rc<T>` now implement `From<Cow<'_, T>>`, and `Box` now
Expand Down
175 changes: 83 additions & 92 deletions src/liballoc/collections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl<K: Clone, V: Clone> Clone for BTreeMap<K, V> {
let mut out_tree = BTreeMap { root: Some(node::Root::new_leaf()), length: 0 };

{
let root = out_tree.root.as_mut().unwrap();
let root = out_tree.root.as_mut().unwrap(); // unwrap succeeds because we just wrapped
let mut out_node = match root.as_mut().force() {
Leaf(leaf) => leaf,
Internal(_) => unreachable!(),
Expand All @@ -171,14 +171,10 @@ impl<K: Clone, V: Clone> Clone for BTreeMap<K, V> {
}
Internal(internal) => {
let mut out_tree = clone_subtree(internal.first_edge().descend());
out_tree.ensure_root_is_owned();

{
// Ideally we'd use the return of ensure_root_is_owned
// instead of re-unwrapping here but unfortunately that
// borrows all of out_tree and we need access to the
// length below.
let mut out_node = out_tree.root.as_mut().unwrap().push_level();
let out_root = BTreeMap::ensure_is_owned(&mut out_tree.root);
let mut out_node = out_root.push_level();
let mut in_edge = internal.first_edge();
while let Ok(kv) = in_edge.right_kv() {
let (k, v) = kv.into_kv();
Expand Down Expand Up @@ -212,7 +208,7 @@ impl<K: Clone, V: Clone> Clone for BTreeMap<K, V> {
// Ord` constraint, which this method lacks.
BTreeMap { root: None, length: 0 }
} else {
clone_subtree(self.root.as_ref().unwrap().as_ref())
clone_subtree(self.root.as_ref().unwrap().as_ref()) // unwrap succeeds because not empty
}
}
}
Expand Down Expand Up @@ -243,8 +239,8 @@ where
}

fn replace(&mut self, key: K) -> Option<K> {
self.ensure_root_is_owned();
match search::search_tree::<marker::Mut<'_>, K, (), K>(self.root.as_mut()?.as_mut(), &key) {
let root = Self::ensure_is_owned(&mut self.root);
match search::search_tree::<marker::Mut<'_>, K, (), K>(root.as_mut(), &key) {
Found(handle) => Some(mem::replace(handle.into_kv_mut().0, key)),
GoDown(handle) => {
VacantEntry { key, handle, length: &mut self.length, _marker: PhantomData }
Expand Down Expand Up @@ -943,7 +939,6 @@ impl<K: Ord, V> BTreeMap<K, V> {

// Second, we build a tree from the sorted sequence in linear time.
self.from_sorted_iter(iter);
self.fix_right_edge();
}

/// Constructs a double-ended iterator over a sub-range of elements in the map.
Expand Down Expand Up @@ -1058,8 +1053,8 @@ impl<K: Ord, V> BTreeMap<K, V> {
#[stable(feature = "rust1", since = "1.0.0")]
pub fn entry(&mut self, key: K) -> Entry<'_, K, V> {
// FIXME(@porglezomp) Avoid allocating if we don't insert
self.ensure_root_is_owned();
match search::search_tree(self.root.as_mut().unwrap().as_mut(), &key) {
let root = Self::ensure_is_owned(&mut self.root);
match search::search_tree(root.as_mut(), &key) {
Found(handle) => {
Occupied(OccupiedEntry { handle, length: &mut self.length, _marker: PhantomData })
}
Expand All @@ -1070,8 +1065,8 @@ impl<K: Ord, V> BTreeMap<K, V> {
}

fn from_sorted_iter<I: Iterator<Item = (K, V)>>(&mut self, iter: I) {
self.ensure_root_is_owned();
let mut cur_node = self.root.as_mut().unwrap().as_mut().last_leaf_edge().into_node();
let root = Self::ensure_is_owned(&mut self.root);
let mut cur_node = root.as_mut().last_leaf_edge().into_node();
// Iterate through all key-value pairs, pushing them into nodes at the right level.
for (key, value) in iter {
// Try to push key-value pair into the current leaf node.
Expand Down Expand Up @@ -1116,11 +1111,12 @@ impl<K: Ord, V> BTreeMap<K, V> {

self.length += 1;
}
Self::fix_right_edge(root)
}

fn fix_right_edge(&mut self) {
fn fix_right_edge(root: &mut node::Root<K, V>) {
// Handle underfull nodes, start from the top.
let mut cur_node = self.root.as_mut().unwrap().as_mut();
let mut cur_node = root.as_mut();
while let Internal(internal) = cur_node.force() {
// Check if right-most child is underfull.
let mut last_edge = internal.last_edge();
Expand Down Expand Up @@ -1179,16 +1175,17 @@ impl<K: Ord, V> BTreeMap<K, V> {
}

let total_num = self.len();
let left_root = self.root.as_mut().unwrap(); // unwrap succeeds because not empty

let mut right = Self::new();
let right_root = right.ensure_root_is_owned();
for _ in 0..(self.root.as_ref().unwrap().as_ref().height()) {
let right_root = Self::ensure_is_owned(&mut right.root);
for _ in 0..left_root.height() {
right_root.push_level();
}

{
let mut left_node = self.root.as_mut().unwrap().as_mut();
let mut right_node = right.root.as_mut().unwrap().as_mut();
let mut left_node = left_root.as_mut();
let mut right_node = right_root.as_mut();

loop {
let mut split_edge = match search::search_node(left_node, key) {
Expand All @@ -1214,12 +1211,10 @@ impl<K: Ord, V> BTreeMap<K, V> {
}
}

self.fix_right_border();
right.fix_left_border();
left_root.fix_right_border();
right_root.fix_left_border();

if self.root.as_ref().unwrap().as_ref().height()
< right.root.as_ref().unwrap().as_ref().height()
{
if left_root.height() < right_root.height() {
self.recalc_length();
right.length = total_num - self.len();
} else {
Expand Down Expand Up @@ -1301,69 +1296,6 @@ impl<K: Ord, V> BTreeMap<K, V> {

self.length = dfs(self.root.as_ref().unwrap().as_ref());
}

/// Removes empty levels on the top.
fn fix_top(&mut self) {
loop {
{
let node = self.root.as_ref().unwrap().as_ref();
if node.height() == 0 || node.len() > 0 {
break;
}
}
self.root.as_mut().unwrap().pop_level();
}
}

fn fix_right_border(&mut self) {
self.fix_top();

{
let mut cur_node = self.root.as_mut().unwrap().as_mut();

while let Internal(node) = cur_node.force() {
let mut last_kv = node.last_kv();

if last_kv.can_merge() {
cur_node = last_kv.merge().descend();
} else {
let right_len = last_kv.reborrow().right_edge().descend().len();
// `MINLEN + 1` to avoid readjust if merge happens on the next level.
if right_len < node::MIN_LEN + 1 {
last_kv.bulk_steal_left(node::MIN_LEN + 1 - right_len);
}
cur_node = last_kv.right_edge().descend();
}
}
}

self.fix_top();
}

/// The symmetric clone of `fix_right_border`.
fn fix_left_border(&mut self) {
self.fix_top();

{
let mut cur_node = self.root.as_mut().unwrap().as_mut();

while let Internal(node) = cur_node.force() {
let mut first_kv = node.first_kv();

if first_kv.can_merge() {
cur_node = first_kv.merge().descend();
} else {
let left_len = first_kv.reborrow().left_edge().descend().len();
if left_len < node::MIN_LEN + 1 {
first_kv.bulk_steal_right(node::MIN_LEN + 1 - left_len);
}
cur_node = first_kv.left_edge().descend();
}
}
}

self.fix_top();
}
}

#[stable(feature = "rust1", since = "1.0.0")]
Expand Down Expand Up @@ -2321,9 +2253,9 @@ impl<K, V> BTreeMap<K, V> {
}

/// If the root node is the empty (non-allocated) root node, allocate our
/// own node.
fn ensure_root_is_owned(&mut self) -> &mut node::Root<K, V> {
self.root.get_or_insert_with(node::Root::new_leaf)
/// own node. Is an associated function to avoid borrowing the entire BTreeMap.
fn ensure_is_owned(root: &mut Option<node::Root<K, V>>) -> &mut node::Root<K, V> {
root.get_or_insert_with(node::Root::new_leaf)
}
}

Expand Down Expand Up @@ -2825,6 +2757,65 @@ impl<'a, K: 'a, V: 'a> Handle<NodeRef<marker::Mut<'a>, K, V, marker::LeafOrInter
}
}

impl<K, V> node::Root<K, V> {
/// Removes empty levels on the top, but keep an empty leaf if the entire tree is empty.
fn fix_top(&mut self) {
while self.height() > 0 && self.as_ref().len() == 0 {
self.pop_level();
}
}

fn fix_right_border(&mut self) {
self.fix_top();

{
let mut cur_node = self.as_mut();

while let Internal(node) = cur_node.force() {
let mut last_kv = node.last_kv();

if last_kv.can_merge() {
cur_node = last_kv.merge().descend();
} else {
let right_len = last_kv.reborrow().right_edge().descend().len();
// `MINLEN + 1` to avoid readjust if merge happens on the next level.
if right_len < node::MIN_LEN + 1 {
last_kv.bulk_steal_left(node::MIN_LEN + 1 - right_len);
}
cur_node = last_kv.right_edge().descend();
}
}
}

self.fix_top();
}

/// The symmetric clone of `fix_right_border`.
fn fix_left_border(&mut self) {
self.fix_top();

{
let mut cur_node = self.as_mut();

while let Internal(node) = cur_node.force() {
let mut first_kv = node.first_kv();

if first_kv.can_merge() {
cur_node = first_kv.merge().descend();
} else {
let left_len = first_kv.reborrow().left_edge().descend().len();
if left_len < node::MIN_LEN + 1 {
first_kv.bulk_steal_right(node::MIN_LEN + 1 - left_len);
}
cur_node = first_kv.left_edge().descend();
}
}
}

self.fix_top();
}
}

enum UnderflowResult<'a, K, V> {
AtRoot,
Merged(Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::Edge>, bool, usize),
Expand Down
5 changes: 5 additions & 0 deletions src/liballoc/collections/btree/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ unsafe impl<K: Sync, V: Sync> Sync for Root<K, V> {}
unsafe impl<K: Send, V: Send> Send for Root<K, V> {}

impl<K, V> Root<K, V> {
/// Returns the number of levels below the root.
pub fn height(&self) -> usize {
self.height
}

/// Returns a new owned tree, with its own root node that is initially empty.
pub fn new_leaf() -> Self {
Root { node: BoxedNode::from_leaf(Box::new(unsafe { LeafNode::new() })), height: 0 }
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ extern "rust-intrinsic" {
///
/// // use `u32::from_ne_bytes` instead
/// let num = u32::from_ne_bytes(raw_bytes);
/// // or use `u32::from_le_bytes` or `u32::from_ge_bytes` to specify the endianness
/// // or use `u32::from_le_bytes` or `u32::from_be_bytes` to specify the endianness
/// let num = u32::from_le_bytes(raw_bytes);
/// assert_eq!(num, 0x12345678);
/// let num = u32::from_be_bytes(raw_bytes);
Expand Down
1 change: 1 addition & 0 deletions src/librustc_error_codes/error_codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ E0766: include_str!("./error_codes/E0766.md"),
E0767: include_str!("./error_codes/E0767.md"),
E0768: include_str!("./error_codes/E0768.md"),
E0769: include_str!("./error_codes/E0769.md"),
E0770: include_str!("./error_codes/E0770.md"),
;
// E0006, // merged with E0005
// E0008, // cannot bind by-move into a pattern guard
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_error_codes/error_codes/E0671.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Const parameters cannot depend on type parameters.
The following is therefore invalid:

```compile_fail,E0741
```compile_fail,E0770
#![feature(const_generics)]

fn const_id<T, const N: T>() -> T { // error
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_error_codes/error_codes/E0705.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
A `#![feature]` attribute was declared for a feature that is stable in
the current edition, but not in all editions.
A `#![feature]` attribute was declared for a feature that is stable in the
current edition, but not in all editions.

Erroneous code example:

Expand Down
2 changes: 1 addition & 1 deletion src/librustc_error_codes/error_codes/E0710.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
An unknown tool name found in scoped lint
An unknown tool name was found in a scoped lint.

Erroneous code examples:

Expand Down
15 changes: 15 additions & 0 deletions src/librustc_error_codes/error_codes/E0770.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
The type of a const parameter references other generic parameters.

Erroneous code example:

```compile_fail,E0770
#![feature(const_generics)]
fn foo<T, const N: T>() {} // error!
```

To fix this error, use a concrete type for the const parameter:

```
#![feature(const_generics)]
fn foo<T, const N: usize>() {}
```
6 changes: 3 additions & 3 deletions src/librustc_hir/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2687,7 +2687,7 @@ pub enum Node<'hir> {
Crate(&'hir CrateItem<'hir>),
}

impl Node<'_> {
impl<'hir> Node<'hir> {
pub fn ident(&self) -> Option<Ident> {
match self {
Node::TraitItem(TraitItem { ident, .. })
Expand All @@ -2698,7 +2698,7 @@ impl Node<'_> {
}
}

pub fn fn_decl(&self) -> Option<&FnDecl<'_>> {
pub fn fn_decl(&self) -> Option<&FnDecl<'hir>> {
match self {
Node::TraitItem(TraitItem { kind: TraitItemKind::Fn(fn_sig, _), .. })
| Node::ImplItem(ImplItem { kind: ImplItemKind::Fn(fn_sig, _), .. })
Expand All @@ -2722,7 +2722,7 @@ impl Node<'_> {
}
}

pub fn generics(&self) -> Option<&Generics<'_>> {
pub fn generics(&self) -> Option<&'hir Generics<'hir>> {
match self {
Node::TraitItem(TraitItem { generics, .. })
| Node::ImplItem(ImplItem { generics, .. }) => Some(generics),
Expand Down
6 changes: 0 additions & 6 deletions src/librustc_interface/passes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,7 @@ fn configure_and_expand_inner<'a>(
)
});

// If we're actually rustdoc then there's no need to actually compile
// anything, so switch everything to just looping
let mut should_loop = sess.opts.actually_rustdoc;
if let Some(PpMode::PpmSource(PpSourceMode::PpmEveryBodyLoops)) = sess.opts.pretty {
should_loop |= true;
}
if should_loop {
log::debug!("replacing bodies with loop {{}}");
util::ReplaceBodyWithLoop::new(&mut resolver).visit_crate(&mut krate);
}
Expand Down
Loading