about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorflip1995 <hello@philkrones.com>2019-03-21 17:10:25 +0100
committerflip1995 <hello@philkrones.com>2019-04-03 18:22:19 +0200
commit2045dfed248d179c94d58eed7ca2922010b0fffc (patch)
tree8b0e0d8de89ee37586c5037bffbfb6913cf2da23 /src/test
parent28a5c414c34b524fa8a264d2ec86bc31b7474105 (diff)
downloadrust-2045dfed248d179c94d58eed7ca2922010b0fffc.tar.gz
rust-2045dfed248d179c94d58eed7ca2922010b0fffc.zip
Update tests
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui-fulldeps/internal-lints/default_hash_types.rs4
-rw-r--r--src/test/ui-fulldeps/internal-lints/default_hash_types.stderr27
-rw-r--r--src/test/ui-fulldeps/internal-lints/ty_tykind_usage.rs2
-rw-r--r--src/test/ui-fulldeps/internal-lints/ty_tykind_usage.stderr62
4 files changed, 38 insertions, 57 deletions
diff --git a/src/test/ui-fulldeps/internal-lints/default_hash_types.rs b/src/test/ui-fulldeps/internal-lints/default_hash_types.rs
index a6b0dbafbeb..3264099c876 100644
--- a/src/test/ui-fulldeps/internal-lints/default_hash_types.rs
+++ b/src/test/ui-fulldeps/internal-lints/default_hash_types.rs
@@ -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() {
diff --git a/src/test/ui-fulldeps/internal-lints/default_hash_types.stderr b/src/test/ui-fulldeps/internal-lints/default_hash_types.stderr
index 323a3880d1c..64f322cb0c1 100644
--- a/src/test/ui-fulldeps/internal-lints/default_hash_types.stderr
+++ b/src/test/ui-fulldeps/internal-lints/default_hash_types.stderr
@@ -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`
diff --git a/src/test/ui-fulldeps/internal-lints/ty_tykind_usage.rs b/src/test/ui-fulldeps/internal-lints/ty_tykind_usage.rs
index a1e08cd3b95..dba0db69b7f 100644
--- a/src/test/ui-fulldeps/internal-lints/ty_tykind_usage.rs
+++ b/src/test/ui-fulldeps/internal-lints/ty_tykind_usage.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Z internal-lints
+// compile-flags: -Z unstable-options
 
 #![feature(rustc_private)]
 
diff --git a/src/test/ui-fulldeps/internal-lints/ty_tykind_usage.stderr b/src/test/ui-fulldeps/internal-lints/ty_tykind_usage.stderr
index d3ad5e1264a..4e94af12453 100644
--- a/src/test/ui-fulldeps/internal-lints/ty_tykind_usage.stderr
+++ b/src/test/ui-fulldeps/internal-lints/ty_tykind_usage.stderr
@@ -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