Skip to content

Commit 90af723

Browse files
committed
Make diagnostic ordering deterministic
1 parent 91cec5b commit 90af723

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

src/librustc/diagnostics.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ register_diagnostics! {
7777
E0138,
7878
E0139,
7979
E0152,
80-
E0153,
81-
E0157,
8280
E0158,
8381
E0161,
8482
E0162,

src/libsyntax/diagnostics/plugin.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
use std::cell::RefCell;
12-
use std::collections::HashMap;
12+
use std::collections::BTreeMap;
1313
use ast;
1414
use ast::{Ident, Name, TokenTree};
1515
use codemap::Span;
@@ -19,26 +19,26 @@ use parse::token;
1919
use ptr::P;
2020

2121
thread_local! {
22-
static REGISTERED_DIAGNOSTICS: RefCell<HashMap<Name, Option<Name>>> = {
23-
RefCell::new(HashMap::new())
22+
static REGISTERED_DIAGNOSTICS: RefCell<BTreeMap<Name, Option<Name>>> = {
23+
RefCell::new(BTreeMap::new())
2424
}
2525
}
2626
thread_local! {
27-
static USED_DIAGNOSTICS: RefCell<HashMap<Name, Span>> = {
28-
RefCell::new(HashMap::new())
27+
static USED_DIAGNOSTICS: RefCell<BTreeMap<Name, Span>> = {
28+
RefCell::new(BTreeMap::new())
2929
}
3030
}
3131

3232
fn with_registered_diagnostics<T, F>(f: F) -> T where
33-
F: FnOnce(&mut HashMap<Name, Option<Name>>) -> T,
33+
F: FnOnce(&mut BTreeMap<Name, Option<Name>>) -> T,
3434
{
3535
REGISTERED_DIAGNOSTICS.with(move |slot| {
3636
f(&mut *slot.borrow_mut())
3737
})
3838
}
3939

4040
fn with_used_diagnostics<T, F>(f: F) -> T where
41-
F: FnOnce(&mut HashMap<Name, Span>) -> T,
41+
F: FnOnce(&mut BTreeMap<Name, Span>) -> T,
4242
{
4343
USED_DIAGNOSTICS.with(move |slot| {
4444
f(&mut *slot.borrow_mut())

src/test/debuginfo/vec-slices.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// ignore-android: FIXME(#10381)
12+
// ignore-windows
1213
// min-lldb-version: 310
1314

1415
// compile-flags:-g

src/test/run-pass/issue-20797.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-android
12+
// ignore-windows
13+
1114
// Regression test for #20797.
1215

1316
use std::default::Default;

0 commit comments

Comments
 (0)