Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8462a37
avoid temporary vectors
matthiaskrgr Jul 16, 2021
d05a286
Iterate through impls only when permitted
fee1-dead Jul 19, 2021
4b82bbe
Recognize bounds on impls as const bounds
fee1-dead Jul 19, 2021
7066398
Don't render <table> in items' summary
GuillaumeGomez Jul 19, 2021
d6dc840
Add test to ensure tables are not inside items summary
GuillaumeGomez Jul 19, 2021
76ab8a6
:arrow_up: rust-analyzer
lnicola Jul 19, 2021
2a56a68
Add comments explaining the unix command-line argument support.
sunfishcode Jul 19, 2021
64f4e34
Fix typo in compile.rs
chinmaydd Jul 20, 2021
d56c02d
Allow combining -Cprofile-generate and -Cpanic=unwind when targeting
michaelwoerister Jul 19, 2021
b9b0a5e
Fix VecMap::iter_mut
oli-obk Jul 19, 2021
75d9ed7
Make mir borrowck's use of opaque types independent of the typeck que…
oli-obk Jul 19, 2021
df04b98
Use instrument debugging for more readable logs
oli-obk Jul 20, 2021
1ad1b94
Remove an unnecessary variable
oli-obk Jul 20, 2021
b3594f0
Get back the more precise suggestion spans of old regionck
oli-obk Jul 20, 2021
b3aca47
Resolve nested inference variables.
oli-obk Jul 20, 2021
db0324e
Support HIR wf checking for function signatures
Aaron1011 Jul 18, 2021
713044c
Add a regression test
oli-obk Jul 20, 2021
320d049
Add long explanation for E0722
midgleyc Jul 20, 2021
f4981b4
Update cargo
ehuss Jul 20, 2021
e09d782
add working code example
midgleyc Jul 21, 2021
adc5de6
docs: remove spurious main functions
midgleyc Jul 21, 2021
b24d491
docs: add newline before example
midgleyc Jul 21, 2021
70aa202
Rollup merge of #87206 - matthiaskrgr:clippy_collect, r=davidtwco
Dylan-DPC Jul 21, 2021
0350587
Rollup merge of #87265 - Aaron1011:hir-wf-fn, r=estebank
Dylan-DPC Jul 21, 2021
d1a3b1a
Rollup merge of #87270 - GuillaumeGomez:item-summary-table, r=notriddle
Dylan-DPC Jul 21, 2021
357cd15
Rollup merge of #87273 - fee1-dead:impl-const-impl-bounds, r=oli-obk
Dylan-DPC Jul 21, 2021
480d004
Rollup merge of #87278 - lnicola:rust-analyzer-2021-07-19, r=lnicola
Dylan-DPC Jul 21, 2021
58c0b13
Rollup merge of #87279 - sunfishcode:document-unix-argv, r=RalfJung
Dylan-DPC Jul 21, 2021
8b727eb
Rollup merge of #87287 - oli-obk:fixup_fixup_fixup_opaque_types, r=sp…
Dylan-DPC Jul 21, 2021
8d9cb66
Rollup merge of #87301 - chinmaydd:chinmaydd-patch-1-1, r=jyn514
Dylan-DPC Jul 21, 2021
7eed57b
Rollup merge of #87307 - michaelwoerister:pgo-unwind-msvc, r=nagisa
Dylan-DPC Jul 21, 2021
49e429d
Rollup merge of #87311 - oli-obk:nll_suggestion_span, r=estebank
Dylan-DPC Jul 21, 2021
0366f9a
Rollup merge of #87321 - midgleyc:add-E0722-long, r=GuillaumeGomez
Dylan-DPC Jul 21, 2021
37bb86c
Rollup merge of #87326 - ehuss:update-cargo, r=ehuss
Dylan-DPC Jul 21, 2021
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
Prev Previous commit
Next Next commit
Fix VecMap::iter_mut
It used to allow you to mutate the key, even though that can invalidate the map by creating duplicate keys.
  • Loading branch information
oli-obk committed Jul 20, 2021
commit b9b0a5e05400d61df0f0f8745a9d9e7bf8a85e3e
1 change: 1 addition & 0 deletions compiler/rustc_data_structures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#![feature(new_uninit)]
#![feature(once_cell)]
#![feature(maybe_uninit_uninit_array)]
#![feature(min_type_alias_impl_trait)]
#![allow(rustc::default_hash_types)]
#![deny(unaligned_references)]

Expand Down
10 changes: 5 additions & 5 deletions compiler/rustc_data_structures/src/vec_map.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::borrow::Borrow;
use std::iter::FromIterator;
use std::slice::{Iter, IterMut};
use std::slice::Iter;
use std::vec::IntoIter;

use crate::stable_hasher::{HashStable, StableHasher};
Expand Down Expand Up @@ -67,7 +67,7 @@ where
self.into_iter()
}

pub fn iter_mut(&mut self) -> IterMut<'_, (K, V)> {
pub fn iter_mut(&mut self) -> impl Iterator<Item = (&K, &mut V)> {
self.into_iter()
}
}
Expand Down Expand Up @@ -108,12 +108,12 @@ impl<'a, K, V> IntoIterator for &'a VecMap<K, V> {
}

impl<'a, K, V> IntoIterator for &'a mut VecMap<K, V> {
type Item = &'a mut (K, V);
type IntoIter = IterMut<'a, (K, V)>;
type Item = (&'a K, &'a mut V);
type IntoIter = impl Iterator<Item = Self::Item>;

#[inline]
fn into_iter(self) -> Self::IntoIter {
self.0.iter_mut()
self.0.iter_mut().map(|(k, v)| (&*k, v))
}
}

Expand Down