4 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,9 @@ fn all_diagnostic_items(tcx: TyCtxt<'_>, (): ()) -> DiagnosticItems {
83
83
84
84
// Collect diagnostic items in other crates.
85
85
for & cnum in tcx. crates ( ( ) ) . iter ( ) . chain ( std:: iter:: once ( & LOCAL_CRATE ) ) {
86
+ // We are collecting many DiagnosticItems hash maps into one
87
+ // DiagnosticItems hash map. The iteration order does not matter.
88
+ #[ allow( rustc:: potential_query_instability) ]
86
89
for ( & name, & def_id) in & tcx. diagnostic_items ( cnum) . name_to_id {
87
90
collect_item ( tcx, & mut items, name, def_id) ;
88
91
}
Original file line number Diff line number Diff line change @@ -121,6 +121,8 @@ impl<'k> StatCollector<'k> {
121
121
}
122
122
123
123
fn print ( & self , title : & str , prefix : & str ) {
124
+ // We will soon sort, so the initial order does not matter.
125
+ #[ allow( rustc:: potential_query_instability) ]
124
126
let mut nodes: Vec < _ > = self . nodes . iter ( ) . collect ( ) ;
125
127
nodes. sort_by_key ( |( _, node) | node. stats . count * node. stats . size ) ;
126
128
@@ -147,6 +149,8 @@ impl<'k> StatCollector<'k> {
147
149
to_readable_str( node. stats. size)
148
150
) ;
149
151
if !node. subnodes . is_empty ( ) {
152
+ // We will soon sort, so the initial order does not matter.
153
+ #[ allow( rustc:: potential_query_instability) ]
150
154
let mut subnodes: Vec < _ > = node. subnodes . iter ( ) . collect ( ) ;
151
155
subnodes. sort_by_key ( |( _, subnode) | subnode. count * subnode. size ) ;
152
156
Original file line number Diff line number Diff line change 4
4
//!
5
5
//! This API is completely unstable and subject to change.
6
6
7
- #![ allow( rustc:: potential_query_instability) ]
8
7
#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
9
8
#![ doc( rust_logo) ]
10
9
#![ feature( rustdoc_internals) ]
Original file line number Diff line number Diff line change @@ -1048,6 +1048,9 @@ pub fn check_unused_or_stable_features(tcx: TyCtxt<'_>) {
1048
1048
tcx. sess . emit_err ( errors:: UnknownFeature { span, feature : * feature } ) ;
1049
1049
}
1050
1050
1051
+ // We only use the hash map contents to emit errors, and the order of
1052
+ // emitted errors do not affect query stability.
1053
+ #[ allow( rustc:: potential_query_instability) ]
1051
1054
for ( implied_by, feature) in remaining_implications {
1052
1055
let local_defined_features = tcx. lib_features ( LOCAL_CRATE ) ;
1053
1056
let span = local_defined_features
0 commit comments