Skip to content

Commit 2045dfe

Browse files
committed
Update tests
1 parent 28a5c41 commit 2045dfe

File tree

4 files changed

+38
-57
lines changed

4 files changed

+38
-57
lines changed

src/test/ui-fulldeps/internal-lints/default_hash_types.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
// compile-flags: -Z internal-lints
1+
// compile-flags: -Z unstable-options
22

33
#![feature(rustc_private)]
44

55
extern crate rustc_data_structures;
66

77
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
88
use std::collections::{HashMap, HashSet};
9-
//~^ WARNING Prefer FxHashMap over HashMap, it has better performance
10-
//~^^ WARNING Prefer FxHashSet over HashSet, it has better performance
119

1210
#[deny(default_hash_types)]
1311
fn main() {

src/test/ui-fulldeps/internal-lints/default_hash_types.stderr

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,34 @@
1-
warning: Prefer FxHashMap over HashMap, it has better performance
2-
--> $DIR/default_hash_types.rs:8:24
3-
|
4-
LL | use std::collections::{HashMap, HashSet};
5-
| ^^^^^^^ help: use: `FxHashMap`
6-
|
7-
= note: #[warn(default_hash_types)] on by default
8-
= note: a `use rustc_data_structures::fx::FxHashMap` may be necessary
9-
10-
warning: Prefer FxHashSet over HashSet, it has better performance
11-
--> $DIR/default_hash_types.rs:8:33
12-
|
13-
LL | use std::collections::{HashMap, HashSet};
14-
| ^^^^^^^ help: use: `FxHashSet`
15-
|
16-
= note: a `use rustc_data_structures::fx::FxHashSet` may be necessary
17-
181
error: Prefer FxHashMap over HashMap, it has better performance
19-
--> $DIR/default_hash_types.rs:14:15
2+
--> $DIR/default_hash_types.rs:12:15
203
|
214
LL | let _map: HashMap<String, String> = HashMap::default();
225
| ^^^^^^^ help: use: `FxHashMap`
236
|
247
note: lint level defined here
25-
--> $DIR/default_hash_types.rs:12:8
8+
--> $DIR/default_hash_types.rs:10:8
269
|
2710
LL | #[deny(default_hash_types)]
2811
| ^^^^^^^^^^^^^^^^^^
2912
= note: a `use rustc_data_structures::fx::FxHashMap` may be necessary
3013

3114
error: Prefer FxHashMap over HashMap, it has better performance
32-
--> $DIR/default_hash_types.rs:14:41
15+
--> $DIR/default_hash_types.rs:12:41
3316
|
3417
LL | let _map: HashMap<String, String> = HashMap::default();
3518
| ^^^^^^^ help: use: `FxHashMap`
3619
|
3720
= note: a `use rustc_data_structures::fx::FxHashMap` may be necessary
3821

3922
error: Prefer FxHashSet over HashSet, it has better performance
40-
--> $DIR/default_hash_types.rs:17:15
23+
--> $DIR/default_hash_types.rs:15:15
4124
|
4225
LL | let _set: HashSet<String> = HashSet::default();
4326
| ^^^^^^^ help: use: `FxHashSet`
4427
|
4528
= note: a `use rustc_data_structures::fx::FxHashSet` may be necessary
4629

4730
error: Prefer FxHashSet over HashSet, it has better performance
48-
--> $DIR/default_hash_types.rs:17:33
31+
--> $DIR/default_hash_types.rs:15:33
4932
|
5033
LL | let _set: HashSet<String> = HashSet::default();
5134
| ^^^^^^^ help: use: `FxHashSet`

src/test/ui-fulldeps/internal-lints/ty_tykind_usage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z internal-lints
1+
// compile-flags: -Z unstable-options
22

33
#![feature(rustc_private)]
44

src/test/ui-fulldeps/internal-lints/ty_tykind_usage.stderr

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error: usage of `ty::TyKind::<kind>`
22
--> $DIR/ty_tykind_usage.rs:11:15
33
|
4-
LL | let sty = TyKind::Bool; //~ ERROR usage of `ty::TyKind::<kind>`
4+
LL | let sty = TyKind::Bool;
55
| ^^^^^^ help: try using ty::<kind> directly: `ty`
66
|
77
note: lint level defined here
@@ -13,181 +13,181 @@ LL | #[deny(usage_of_ty_tykind)]
1313
error: usage of `ty::TyKind::<kind>`
1414
--> $DIR/ty_tykind_usage.rs:14:9
1515
|
16-
LL | TyKind::Bool => (), //~ ERROR usage of `ty::TyKind::<kind>`
16+
LL | TyKind::Bool => (),
1717
| ^^^^^^ help: try using ty::<kind> directly: `ty`
1818

1919
error: usage of `ty::TyKind::<kind>`
2020
--> $DIR/ty_tykind_usage.rs:15:9
2121
|
22-
LL | TyKind::Char => (), //~ ERROR usage of `ty::TyKind::<kind>`
22+
LL | TyKind::Char => (),
2323
| ^^^^^^ help: try using ty::<kind> directly: `ty`
2424

2525
error: usage of `ty::TyKind::<kind>`
2626
--> $DIR/ty_tykind_usage.rs:16:9
2727
|
28-
LL | TyKind::Int(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
28+
LL | TyKind::Int(..) => (),
2929
| ^^^^^^ help: try using ty::<kind> directly: `ty`
3030

3131
error: usage of `ty::TyKind::<kind>`
3232
--> $DIR/ty_tykind_usage.rs:17:9
3333
|
34-
LL | TyKind::Uint(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
34+
LL | TyKind::Uint(..) => (),
3535
| ^^^^^^ help: try using ty::<kind> directly: `ty`
3636

3737
error: usage of `ty::TyKind::<kind>`
3838
--> $DIR/ty_tykind_usage.rs:18:9
3939
|
40-
LL | TyKind::Float(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
40+
LL | TyKind::Float(..) => (),
4141
| ^^^^^^ help: try using ty::<kind> directly: `ty`
4242

4343
error: usage of `ty::TyKind::<kind>`
4444
--> $DIR/ty_tykind_usage.rs:19:9
4545
|
46-
LL | TyKind::Adt(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
46+
LL | TyKind::Adt(..) => (),
4747
| ^^^^^^ help: try using ty::<kind> directly: `ty`
4848

4949
error: usage of `ty::TyKind::<kind>`
5050
--> $DIR/ty_tykind_usage.rs:20:9
5151
|
52-
LL | TyKind::Foreign(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
52+
LL | TyKind::Foreign(..) => (),
5353
| ^^^^^^ help: try using ty::<kind> directly: `ty`
5454

5555
error: usage of `ty::TyKind::<kind>`
5656
--> $DIR/ty_tykind_usage.rs:21:9
5757
|
58-
LL | TyKind::Str => (), //~ ERROR usage of `ty::TyKind::<kind>`
58+
LL | TyKind::Str => (),
5959
| ^^^^^^ help: try using ty::<kind> directly: `ty`
6060

6161
error: usage of `ty::TyKind::<kind>`
6262
--> $DIR/ty_tykind_usage.rs:22:9
6363
|
64-
LL | TyKind::Array(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
64+
LL | TyKind::Array(..) => (),
6565
| ^^^^^^ help: try using ty::<kind> directly: `ty`
6666

6767
error: usage of `ty::TyKind::<kind>`
6868
--> $DIR/ty_tykind_usage.rs:23:9
6969
|
70-
LL | TyKind::Slice(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
70+
LL | TyKind::Slice(..) => (),
7171
| ^^^^^^ help: try using ty::<kind> directly: `ty`
7272

7373
error: usage of `ty::TyKind::<kind>`
7474
--> $DIR/ty_tykind_usage.rs:24:9
7575
|
76-
LL | TyKind::RawPtr(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
76+
LL | TyKind::RawPtr(..) => (),
7777
| ^^^^^^ help: try using ty::<kind> directly: `ty`
7878

7979
error: usage of `ty::TyKind::<kind>`
8080
--> $DIR/ty_tykind_usage.rs:25:9
8181
|
82-
LL | TyKind::Ref(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
82+
LL | TyKind::Ref(..) => (),
8383
| ^^^^^^ help: try using ty::<kind> directly: `ty`
8484

8585
error: usage of `ty::TyKind::<kind>`
8686
--> $DIR/ty_tykind_usage.rs:26:9
8787
|
88-
LL | TyKind::FnDef(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
88+
LL | TyKind::FnDef(..) => (),
8989
| ^^^^^^ help: try using ty::<kind> directly: `ty`
9090

9191
error: usage of `ty::TyKind::<kind>`
9292
--> $DIR/ty_tykind_usage.rs:27:9
9393
|
94-
LL | TyKind::FnPtr(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
94+
LL | TyKind::FnPtr(..) => (),
9595
| ^^^^^^ help: try using ty::<kind> directly: `ty`
9696

9797
error: usage of `ty::TyKind::<kind>`
9898
--> $DIR/ty_tykind_usage.rs:28:9
9999
|
100-
LL | TyKind::Dynamic(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
100+
LL | TyKind::Dynamic(..) => (),
101101
| ^^^^^^ help: try using ty::<kind> directly: `ty`
102102

103103
error: usage of `ty::TyKind::<kind>`
104104
--> $DIR/ty_tykind_usage.rs:29:9
105105
|
106-
LL | TyKind::Closure(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
106+
LL | TyKind::Closure(..) => (),
107107
| ^^^^^^ help: try using ty::<kind> directly: `ty`
108108

109109
error: usage of `ty::TyKind::<kind>`
110110
--> $DIR/ty_tykind_usage.rs:30:9
111111
|
112-
LL | TyKind::Generator(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
112+
LL | TyKind::Generator(..) => (),
113113
| ^^^^^^ help: try using ty::<kind> directly: `ty`
114114

115115
error: usage of `ty::TyKind::<kind>`
116116
--> $DIR/ty_tykind_usage.rs:31:9
117117
|
118-
LL | TyKind::GeneratorWitness(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
118+
LL | TyKind::GeneratorWitness(..) => (),
119119
| ^^^^^^ help: try using ty::<kind> directly: `ty`
120120

121121
error: usage of `ty::TyKind::<kind>`
122122
--> $DIR/ty_tykind_usage.rs:32:9
123123
|
124-
LL | TyKind::Never => (), //~ ERROR usage of `ty::TyKind::<kind>`
124+
LL | TyKind::Never => (),
125125
| ^^^^^^ help: try using ty::<kind> directly: `ty`
126126

127127
error: usage of `ty::TyKind::<kind>`
128128
--> $DIR/ty_tykind_usage.rs:33:9
129129
|
130-
LL | TyKind::Tuple(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
130+
LL | TyKind::Tuple(..) => (),
131131
| ^^^^^^ help: try using ty::<kind> directly: `ty`
132132

133133
error: usage of `ty::TyKind::<kind>`
134134
--> $DIR/ty_tykind_usage.rs:34:9
135135
|
136-
LL | TyKind::Projection(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
136+
LL | TyKind::Projection(..) => (),
137137
| ^^^^^^ help: try using ty::<kind> directly: `ty`
138138

139139
error: usage of `ty::TyKind::<kind>`
140140
--> $DIR/ty_tykind_usage.rs:35:9
141141
|
142-
LL | TyKind::UnnormalizedProjection(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
142+
LL | TyKind::UnnormalizedProjection(..) => (),
143143
| ^^^^^^ help: try using ty::<kind> directly: `ty`
144144

145145
error: usage of `ty::TyKind::<kind>`
146146
--> $DIR/ty_tykind_usage.rs:36:9
147147
|
148-
LL | TyKind::Opaque(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
148+
LL | TyKind::Opaque(..) => (),
149149
| ^^^^^^ help: try using ty::<kind> directly: `ty`
150150

151151
error: usage of `ty::TyKind::<kind>`
152152
--> $DIR/ty_tykind_usage.rs:37:9
153153
|
154-
LL | TyKind::Param(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
154+
LL | TyKind::Param(..) => (),
155155
| ^^^^^^ help: try using ty::<kind> directly: `ty`
156156

157157
error: usage of `ty::TyKind::<kind>`
158158
--> $DIR/ty_tykind_usage.rs:38:9
159159
|
160-
LL | TyKind::Bound(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
160+
LL | TyKind::Bound(..) => (),
161161
| ^^^^^^ help: try using ty::<kind> directly: `ty`
162162

163163
error: usage of `ty::TyKind::<kind>`
164164
--> $DIR/ty_tykind_usage.rs:39:9
165165
|
166-
LL | TyKind::Placeholder(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
166+
LL | TyKind::Placeholder(..) => (),
167167
| ^^^^^^ help: try using ty::<kind> directly: `ty`
168168

169169
error: usage of `ty::TyKind::<kind>`
170170
--> $DIR/ty_tykind_usage.rs:40:9
171171
|
172-
LL | TyKind::Infer(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
172+
LL | TyKind::Infer(..) => (),
173173
| ^^^^^^ help: try using ty::<kind> directly: `ty`
174174

175175
error: usage of `ty::TyKind::<kind>`
176176
--> $DIR/ty_tykind_usage.rs:41:9
177177
|
178-
LL | TyKind::Error => (), //~ ERROR usage of `ty::TyKind::<kind>`
178+
LL | TyKind::Error => (),
179179
| ^^^^^^ help: try using ty::<kind> directly: `ty`
180180

181181
error: usage of `ty::TyKind::<kind>`
182182
--> $DIR/ty_tykind_usage.rs:46:12
183183
|
184-
LL | if let TyKind::Int(int_ty) = sty {} //~ ERROR usage of `ty::TyKind::<kind>`
184+
LL | if let TyKind::Int(int_ty) = sty {}
185185
| ^^^^^^ help: try using ty::<kind> directly: `ty`
186186

187187
error: usage of `ty::TyKind`
188188
--> $DIR/ty_tykind_usage.rs:48:24
189189
|
190-
LL | fn ty_kind(ty_bad: TyKind<'_>, ty_good: Ty<'_>) {} //~ ERROR usage of `ty::TyKind`
190+
LL | fn ty_kind(ty_bad: TyKind<'_>, ty_good: Ty<'_>) {}
191191
| ^^^^^^^^^^
192192
|
193193
= help: try using `ty::Ty` instead

0 commit comments

Comments
 (0)