diff options
| author | bors <bors@rust-lang.org> | 2020-03-27 12:58:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-03-27 12:58:34 +0000 |
| commit | 0a2df620735134d5907e4d4e25241a64cec2ceac (patch) | |
| tree | f2b2003d172a1b7b290c69afd98c378be34cfd64 /src/librustc_data_structures | |
| parent | 697d6b3f3fa1f163acb5ae0911d7df7f02a54444 (diff) | |
| parent | c9a5a03ffda14aaf505015b3b866c5a9f3cc6bf4 (diff) | |
Auto merge of #69916 - oli-obk:mir_bless, r=eddyb
Enable blessing of mir opt tests cc @rust-lang/wg-mir-opt cc @RalfJung Long overdue, but now you can finally just add a ```rust // EMIT_MIR rustc.function_name.MirPassName.before.mir ``` (or `after.mir` since most of the time you want to know the MIR after a pass). A `--bless` invocation will automatically create the files for you. I suggest we do this for all mir opt tests that have all of the MIR in their source anyway If you use `rustc.function.MirPass.diff` you only get the diff that the MIR pass causes on the MIR. Fixes #67865
Diffstat (limited to 'src/librustc_data_structures')
| -rw-r--r-- | src/librustc_data_structures/sorted_map.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_data_structures/sorted_map.rs b/src/librustc_data_structures/sorted_map.rs index 8c42b74b85a..652268dcee8 100644 --- a/src/librustc_data_structures/sorted_map.rs +++ b/src/librustc_data_structures/sorted_map.rs @@ -110,13 +110,13 @@ impl<K: Ord, V> SortedMap<K, V> { /// Iterate over the keys, sorted #[inline] - pub fn keys(&self) -> impl Iterator<Item = &K> + ExactSizeIterator { + pub fn keys(&self) -> impl Iterator<Item = &K> + ExactSizeIterator + DoubleEndedIterator { self.data.iter().map(|&(ref k, _)| k) } /// Iterate over values, sorted by key #[inline] - pub fn values(&self) -> impl Iterator<Item = &V> + ExactSizeIterator { + pub fn values(&self) -> impl Iterator<Item = &V> + ExactSizeIterator + DoubleEndedIterator { self.data.iter().map(|&(_, ref v)| v) } |
