Update tests
This commit is contained in:
parent
28a5c414c3
commit
2045dfed24
4 changed files with 38 additions and 57 deletions
|
@ -1,4 +1,4 @@
|
|||
// compile-flags: -Z internal-lints
|
||||
// compile-flags: -Z unstable-options
|
||||
|
||||
#![feature(rustc_private)]
|
||||
|
||||
|
@ -6,8 +6,6 @@ extern crate rustc_data_structures;
|
|||
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
//~^ WARNING Prefer FxHashMap over HashMap, it has better performance
|
||||
//~^^ WARNING Prefer FxHashSet over HashSet, it has better performance
|
||||
|
||||
#[deny(default_hash_types)]
|
||||
fn main() {
|
||||
|
|
|
@ -1,35 +1,18 @@
|
|||
warning: Prefer FxHashMap over HashMap, it has better performance
|
||||
--> $DIR/default_hash_types.rs:8:24
|
||||
|
|
||||
LL | use std::collections::{HashMap, HashSet};
|
||||
| ^^^^^^^ help: use: `FxHashMap`
|
||||
|
|
||||
= note: #[warn(default_hash_types)] on by default
|
||||
= note: a `use rustc_data_structures::fx::FxHashMap` may be necessary
|
||||
|
||||
warning: Prefer FxHashSet over HashSet, it has better performance
|
||||
--> $DIR/default_hash_types.rs:8:33
|
||||
|
|
||||
LL | use std::collections::{HashMap, HashSet};
|
||||
| ^^^^^^^ help: use: `FxHashSet`
|
||||
|
|
||||
= note: a `use rustc_data_structures::fx::FxHashSet` may be necessary
|
||||
|
||||
error: Prefer FxHashMap over HashMap, it has better performance
|
||||
--> $DIR/default_hash_types.rs:14:15
|
||||
--> $DIR/default_hash_types.rs:12:15
|
||||
|
|
||||
LL | let _map: HashMap<String, String> = HashMap::default();
|
||||
| ^^^^^^^ help: use: `FxHashMap`
|
||||
|
|
||||
note: lint level defined here
|
||||
--> $DIR/default_hash_types.rs:12:8
|
||||
--> $DIR/default_hash_types.rs:10:8
|
||||
|
|
||||
LL | #[deny(default_hash_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
= note: a `use rustc_data_structures::fx::FxHashMap` may be necessary
|
||||
|
||||
error: Prefer FxHashMap over HashMap, it has better performance
|
||||
--> $DIR/default_hash_types.rs:14:41
|
||||
--> $DIR/default_hash_types.rs:12:41
|
||||
|
|
||||
LL | let _map: HashMap<String, String> = HashMap::default();
|
||||
| ^^^^^^^ help: use: `FxHashMap`
|
||||
|
@ -37,7 +20,7 @@ LL | let _map: HashMap<String, String> = HashMap::default();
|
|||
= note: a `use rustc_data_structures::fx::FxHashMap` may be necessary
|
||||
|
||||
error: Prefer FxHashSet over HashSet, it has better performance
|
||||
--> $DIR/default_hash_types.rs:17:15
|
||||
--> $DIR/default_hash_types.rs:15:15
|
||||
|
|
||||
LL | let _set: HashSet<String> = HashSet::default();
|
||||
| ^^^^^^^ help: use: `FxHashSet`
|
||||
|
@ -45,7 +28,7 @@ LL | let _set: HashSet<String> = HashSet::default();
|
|||
= note: a `use rustc_data_structures::fx::FxHashSet` may be necessary
|
||||
|
||||
error: Prefer FxHashSet over HashSet, it has better performance
|
||||
--> $DIR/default_hash_types.rs:17:33
|
||||
--> $DIR/default_hash_types.rs:15:33
|
||||
|
|
||||
LL | let _set: HashSet<String> = HashSet::default();
|
||||
| ^^^^^^^ help: use: `FxHashSet`
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// compile-flags: -Z internal-lints
|
||||
// compile-flags: -Z unstable-options
|
||||
|
||||
#![feature(rustc_private)]
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:11:15
|
||||
|
|
||||
LL | let sty = TyKind::Bool; //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | let sty = TyKind::Bool;
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
|
||||
note: lint level defined here
|
||||
|
@ -13,181 +13,181 @@ LL | #[deny(usage_of_ty_tykind)]
|
|||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:14:9
|
||||
|
|
||||
LL | TyKind::Bool => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Bool => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:15:9
|
||||
|
|
||||
LL | TyKind::Char => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Char => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:16:9
|
||||
|
|
||||
LL | TyKind::Int(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Int(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:17:9
|
||||
|
|
||||
LL | TyKind::Uint(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Uint(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:18:9
|
||||
|
|
||||
LL | TyKind::Float(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Float(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:19:9
|
||||
|
|
||||
LL | TyKind::Adt(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Adt(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:20:9
|
||||
|
|
||||
LL | TyKind::Foreign(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Foreign(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:21:9
|
||||
|
|
||||
LL | TyKind::Str => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Str => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:22:9
|
||||
|
|
||||
LL | TyKind::Array(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Array(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:23:9
|
||||
|
|
||||
LL | TyKind::Slice(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Slice(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:24:9
|
||||
|
|
||||
LL | TyKind::RawPtr(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::RawPtr(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:25:9
|
||||
|
|
||||
LL | TyKind::Ref(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Ref(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:26:9
|
||||
|
|
||||
LL | TyKind::FnDef(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::FnDef(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:27:9
|
||||
|
|
||||
LL | TyKind::FnPtr(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::FnPtr(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:28:9
|
||||
|
|
||||
LL | TyKind::Dynamic(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Dynamic(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:29:9
|
||||
|
|
||||
LL | TyKind::Closure(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Closure(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:30:9
|
||||
|
|
||||
LL | TyKind::Generator(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Generator(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:31:9
|
||||
|
|
||||
LL | TyKind::GeneratorWitness(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::GeneratorWitness(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:32:9
|
||||
|
|
||||
LL | TyKind::Never => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Never => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:33:9
|
||||
|
|
||||
LL | TyKind::Tuple(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Tuple(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:34:9
|
||||
|
|
||||
LL | TyKind::Projection(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Projection(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:35:9
|
||||
|
|
||||
LL | TyKind::UnnormalizedProjection(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::UnnormalizedProjection(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:36:9
|
||||
|
|
||||
LL | TyKind::Opaque(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Opaque(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:37:9
|
||||
|
|
||||
LL | TyKind::Param(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Param(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:38:9
|
||||
|
|
||||
LL | TyKind::Bound(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Bound(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:39:9
|
||||
|
|
||||
LL | TyKind::Placeholder(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Placeholder(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:40:9
|
||||
|
|
||||
LL | TyKind::Infer(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Infer(..) => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:41:9
|
||||
|
|
||||
LL | TyKind::Error => (), //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | TyKind::Error => (),
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind::<kind>`
|
||||
--> $DIR/ty_tykind_usage.rs:46:12
|
||||
|
|
||||
LL | if let TyKind::Int(int_ty) = sty {} //~ ERROR usage of `ty::TyKind::<kind>`
|
||||
LL | if let TyKind::Int(int_ty) = sty {}
|
||||
| ^^^^^^ help: try using ty::<kind> directly: `ty`
|
||||
|
||||
error: usage of `ty::TyKind`
|
||||
--> $DIR/ty_tykind_usage.rs:48:24
|
||||
|
|
||||
LL | fn ty_kind(ty_bad: TyKind<'_>, ty_good: Ty<'_>) {} //~ ERROR usage of `ty::TyKind`
|
||||
LL | fn ty_kind(ty_bad: TyKind<'_>, ty_good: Ty<'_>) {}
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
= help: try using `ty::Ty` instead
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue