about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/mir-opt/const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir6
-rw-r--r--tests/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff6
-rw-r--r--tests/ui/associated-inherent-types/bugs/ice-substitution.stderr2
-rw-r--r--tests/ui/borrowck/bindings-after-at-or-patterns-slice-patterns-box-patterns.stderr32
-rw-r--r--tests/ui/closures/2229_closure_analysis/match/pattern-matching-should-fail.stderr28
-rw-r--r--tests/ui/lint/lint-uppercase-variables.stderr12
-rw-r--r--tests/ui/lint/rfc-2383-lint-reason/expect_nested_lint_levels.stderr24
-rw-r--r--tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.stderr12
-rw-r--r--tests/ui/lint/unused/lint-unused-variables.stderr12
-rw-r--r--tests/ui/liveness/liveness-consts.stderr53
-rw-r--r--tests/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr16
-rw-r--r--tests/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr144
-rw-r--r--tests/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr84
-rw-r--r--tests/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr82
-rw-r--r--tests/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.stderr88
-rw-r--r--tests/ui/privacy/privacy2.stderr8
-rw-r--r--tests/ui/privacy/privacy3.stderr8
-rw-r--r--tests/ui/rfc-2565-param-attrs/param-attrs-cfg.stderr12
18 files changed, 309 insertions, 320 deletions
diff --git a/tests/mir-opt/const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir b/tests/mir-opt/const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir
index 19daae86589..41657b53fc1 100644
--- a/tests/mir-opt/const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir
+++ b/tests/mir-opt/const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir
@@ -7,10 +7,10 @@ promoted[0] in FOO: &[&i32; 1] = {
     let mut _3: *const i32;              // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:42: +0:43
 
     bb0: {
-        _3 = const {alloc2: *const i32}; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:42: +0:43
+        _3 = const {alloc3: *const i32}; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:42: +0:43
                                          // mir::Constant
                                          // + span: $DIR/const_promotion_extern_static.rs:13:42: 13:43
-                                         // + literal: Const { ty: *const i32, val: Value(Scalar(alloc2)) }
+                                         // + literal: Const { ty: *const i32, val: Value(Scalar(alloc3)) }
         _2 = &(*_3);                     // scope 0 at $DIR/const_promotion_extern_static.rs:+0:41: +0:43
         _1 = [move _2];                  // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:46
         _0 = &_1;                        // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
@@ -18,4 +18,4 @@ promoted[0] in FOO: &[&i32; 1] = {
     }
 }
 
-alloc2 (extern static: X)
+alloc3 (extern static: X)
diff --git a/tests/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff b/tests/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff
index 5b13d60052f..25ba0face6b 100644
--- a/tests/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff
+++ b/tests/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff
@@ -18,11 +18,11 @@
 -         StorageLive(_3);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:46
 -         StorageLive(_4);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:32: +0:45
 -         StorageLive(_5);                 // scope 1 at $DIR/const_promotion_extern_static.rs:+0:42: +0:43
--         _5 = const {alloc2: *const i32}; // scope 1 at $DIR/const_promotion_extern_static.rs:+0:42: +0:43
+-         _5 = const {alloc3: *const i32}; // scope 1 at $DIR/const_promotion_extern_static.rs:+0:42: +0:43
 +         _6 = const _;                    // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
                                            // mir::Constant
 -                                          // + span: $DIR/const_promotion_extern_static.rs:13:42: 13:43
--                                          // + literal: Const { ty: *const i32, val: Value(Scalar(alloc2)) }
+-                                          // + literal: Const { ty: *const i32, val: Value(Scalar(alloc3)) }
 -         _4 = &(*_5);                     // scope 1 at $DIR/const_promotion_extern_static.rs:+0:41: +0:43
 -         _3 = [move _4];                  // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:46
 -         _2 = &_3;                        // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
@@ -50,5 +50,5 @@
       }
   }
 - 
-- alloc2 (extern static: X)
+- alloc3 (extern static: X)
   
diff --git a/tests/ui/associated-inherent-types/bugs/ice-substitution.stderr b/tests/ui/associated-inherent-types/bugs/ice-substitution.stderr
index 7b0d1c50516..1648cfb266b 100644
--- a/tests/ui/associated-inherent-types/bugs/ice-substitution.stderr
+++ b/tests/ui/associated-inherent-types/bugs/ice-substitution.stderr
@@ -2,5 +2,5 @@ error: the compiler unexpectedly panicked. this is a bug.
 
 query stack during panic:
 #0 [typeck] type-checking `weird`
-#1 [typeck_item_bodies] type-checking all item bodies
+#1 [used_trait_imports] finding used_trait_imports `weird`
 end of query stack
diff --git a/tests/ui/borrowck/bindings-after-at-or-patterns-slice-patterns-box-patterns.stderr b/tests/ui/borrowck/bindings-after-at-or-patterns-slice-patterns-box-patterns.stderr
index 0ca14c3f3bc..047175626e3 100644
--- a/tests/ui/borrowck/bindings-after-at-or-patterns-slice-patterns-box-patterns.stderr
+++ b/tests/ui/borrowck/bindings-after-at-or-patterns-slice-patterns-box-patterns.stderr
@@ -1,19 +1,3 @@
-error: cannot borrow value as mutable because it is also borrowed as immutable
-  --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:36:9
-   |
-LL |         ref foo @ [.., ref mut bar] => (),
-   |         ^^^^^^^        ----------- value is mutably borrowed by `bar` here
-   |         |
-   |         value is borrowed by `foo` here
-
-error: cannot borrow value as mutable because it is also borrowed as immutable
-  --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:120:9
-   |
-LL |         ref foo @ Some(box ref mut s) => (),
-   |         ^^^^^^^            --------- value is mutably borrowed by `s` here
-   |         |
-   |         value is borrowed by `foo` here
-
 error[E0382]: borrow of moved value: `x`
   --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:18:5
    |
@@ -43,6 +27,14 @@ LL |     &x;
 LL |     drop(r);
    |          - mutable borrow later used here
 
+error: cannot borrow value as mutable because it is also borrowed as immutable
+  --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:36:9
+   |
+LL |         ref foo @ [.., ref mut bar] => (),
+   |         ^^^^^^^        ----------- value is mutably borrowed by `bar` here
+   |         |
+   |         value is borrowed by `foo` here
+
 error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
   --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:50:5
    |
@@ -120,6 +112,14 @@ LL |     &mut x;
 LL |     drop(r);
    |          - immutable borrow later used here
 
+error: cannot borrow value as mutable because it is also borrowed as immutable
+  --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:120:9
+   |
+LL |         ref foo @ Some(box ref mut s) => (),
+   |         ^^^^^^^            --------- value is mutably borrowed by `s` here
+   |         |
+   |         value is borrowed by `foo` here
+
 error[E0382]: borrow of moved value: `x`
   --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:134:5
    |
diff --git a/tests/ui/closures/2229_closure_analysis/match/pattern-matching-should-fail.stderr b/tests/ui/closures/2229_closure_analysis/match/pattern-matching-should-fail.stderr
index ad061d93cb2..8a32f0d99e7 100644
--- a/tests/ui/closures/2229_closure_analysis/match/pattern-matching-should-fail.stderr
+++ b/tests/ui/closures/2229_closure_analysis/match/pattern-matching-should-fail.stderr
@@ -1,17 +1,3 @@
-error[E0004]: non-exhaustive patterns: type `u8` is non-empty
-  --> $DIR/pattern-matching-should-fail.rs:67:23
-   |
-LL |     let c1 = || match x { };
-   |                       ^
-   |
-   = note: the matched value is of type `u8`
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
-   |
-LL ~     let c1 = || match x {
-LL +         _ => todo!(),
-LL ~     };
-   |
-
 error[E0381]: used binding `x` isn't initialized
   --> $DIR/pattern-matching-should-fail.rs:8:23
    |
@@ -69,6 +55,20 @@ LL |     let t: !;
 LL |             match t { };
    |                   ^ `t` used here but it isn't initialized
 
+error[E0004]: non-exhaustive patterns: type `u8` is non-empty
+  --> $DIR/pattern-matching-should-fail.rs:67:23
+   |
+LL |     let c1 = || match x { };
+   |                       ^
+   |
+   = note: the matched value is of type `u8`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
+   |
+LL ~     let c1 = || match x {
+LL +         _ => todo!(),
+LL ~     };
+   |
+
 error[E0381]: used binding `x` isn't initialized
   --> $DIR/pattern-matching-should-fail.rs:67:23
    |
diff --git a/tests/ui/lint/lint-uppercase-variables.stderr b/tests/ui/lint/lint-uppercase-variables.stderr
index 42ec9364bc6..9220828014f 100644
--- a/tests/ui/lint/lint-uppercase-variables.stderr
+++ b/tests/ui/lint/lint-uppercase-variables.stderr
@@ -12,12 +12,6 @@ error[E0170]: pattern binding `Foo` is named the same as one of the variants of
 LL |     let Foo = foo::Foo::Foo;
    |         ^^^ help: to match on the variant, qualify the path: `foo::Foo::Foo`
 
-error[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `foo::Foo`
-  --> $DIR/lint-uppercase-variables.rs:33:17
-   |
-LL |     fn in_param(Foo: foo::Foo) {}
-   |                 ^^^ help: to match on the variant, qualify the path: `foo::Foo::Foo`
-
 warning: unused variable: `Foo`
   --> $DIR/lint-uppercase-variables.rs:22:9
    |
@@ -37,6 +31,12 @@ warning: unused variable: `Foo`
 LL |     let Foo = foo::Foo::Foo;
    |         ^^^ help: if this is intentional, prefix it with an underscore: `_Foo`
 
+error[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `foo::Foo`
+  --> $DIR/lint-uppercase-variables.rs:33:17
+   |
+LL |     fn in_param(Foo: foo::Foo) {}
+   |                 ^^^ help: to match on the variant, qualify the path: `foo::Foo::Foo`
+
 warning: unused variable: `Foo`
   --> $DIR/lint-uppercase-variables.rs:33:17
    |
diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_nested_lint_levels.stderr b/tests/ui/lint/rfc-2383-lint-reason/expect_nested_lint_levels.stderr
index 2c35647b8a3..4852c331396 100644
--- a/tests/ui/lint/rfc-2383-lint-reason/expect_nested_lint_levels.stderr
+++ b/tests/ui/lint/rfc-2383-lint-reason/expect_nested_lint_levels.stderr
@@ -1,15 +1,3 @@
-error: unused variable: `this_is_my_function`
-  --> $DIR/expect_nested_lint_levels.rs:48:9
-   |
-LL |     let this_is_my_function = 3;
-   |         ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_this_is_my_function`
-   |
-note: the lint level is defined here
-  --> $DIR/expect_nested_lint_levels.rs:45:10
-   |
-LL | #[forbid(unused_variables)]
-   |          ^^^^^^^^^^^^^^^^
-
 warning: variable does not need to be mutable
   --> $DIR/expect_nested_lint_levels.rs:36:13
    |
@@ -25,6 +13,18 @@ note: the lint level is defined here
 LL |         unused_mut,
    |         ^^^^^^^^^^
 
+error: unused variable: `this_is_my_function`
+  --> $DIR/expect_nested_lint_levels.rs:48:9
+   |
+LL |     let this_is_my_function = 3;
+   |         ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_this_is_my_function`
+   |
+note: the lint level is defined here
+  --> $DIR/expect_nested_lint_levels.rs:45:10
+   |
+LL | #[forbid(unused_variables)]
+   |          ^^^^^^^^^^^^^^^^
+
 warning: this lint expectation is unfulfilled
   --> $DIR/expect_nested_lint_levels.rs:7:5
    |
diff --git a/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.stderr b/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.stderr
index 5942fa8aeb4..169f03aed94 100644
--- a/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.stderr
+++ b/tests/ui/lint/rfc-2383-lint-reason/force_warn_expected_lints_fulfilled.stderr
@@ -12,12 +12,6 @@ warning: unused variable: `fox_name`
 LL |     let fox_name = "Sir Nibbles";
    |         ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_fox_name`
 
-warning: unused variable: `this_should_fulfill_the_expectation`
-  --> $DIR/force_warn_expected_lints_fulfilled.rs:43:9
-   |
-LL |     let this_should_fulfill_the_expectation = "The `#[allow]` has no power here";
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_this_should_fulfill_the_expectation`
-
 warning: variable does not need to be mutable
   --> $DIR/force_warn_expected_lints_fulfilled.rs:32:9
    |
@@ -28,6 +22,12 @@ LL |     let mut what_does_the_fox_say = "*ding* *deng* *dung*";
    |
    = note: requested on the command line with `--force-warn unused-mut`
 
+warning: unused variable: `this_should_fulfill_the_expectation`
+  --> $DIR/force_warn_expected_lints_fulfilled.rs:43:9
+   |
+LL |     let this_should_fulfill_the_expectation = "The `#[allow]` has no power here";
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_this_should_fulfill_the_expectation`
+
 warning: denote infinite loops with `loop { ... }`
   --> $DIR/force_warn_expected_lints_fulfilled.rs:10:5
    |
diff --git a/tests/ui/lint/unused/lint-unused-variables.stderr b/tests/ui/lint/unused/lint-unused-variables.stderr
index fd9a5bcbfc4..09729eeba79 100644
--- a/tests/ui/lint/unused/lint-unused-variables.stderr
+++ b/tests/ui/lint/unused/lint-unused-variables.stderr
@@ -10,12 +10,6 @@ note: the lint level is defined here
 LL | #![deny(unused_variables)]
    |         ^^^^^^^^^^^^^^^^
 
-error: unused variable: `b`
-  --> $DIR/lint-unused-variables.rs:14:5
-   |
-LL |     b: i32,
-   |     ^ help: if this is intentional, prefix it with an underscore: `_b`
-
 error: unused variable: `a`
   --> $DIR/lint-unused-variables.rs:22:9
    |
@@ -23,6 +17,12 @@ LL |         a: i32,
    |         ^ help: if this is intentional, prefix it with an underscore: `_a`
 
 error: unused variable: `b`
+  --> $DIR/lint-unused-variables.rs:14:5
+   |
+LL |     b: i32,
+   |     ^ help: if this is intentional, prefix it with an underscore: `_b`
+
+error: unused variable: `b`
   --> $DIR/lint-unused-variables.rs:29:9
    |
 LL |         b: i32,
diff --git a/tests/ui/liveness/liveness-consts.stderr b/tests/ui/liveness/liveness-consts.stderr
index 6199ea96c98..016debdd396 100644
--- a/tests/ui/liveness/liveness-consts.stderr
+++ b/tests/ui/liveness/liveness-consts.stderr
@@ -1,10 +1,9 @@
-warning: variable `a` is assigned to, but never used
-  --> $DIR/liveness-consts.rs:7:13
+warning: unused variable: `e`
+  --> $DIR/liveness-consts.rs:24:13
    |
-LL |     let mut a = 0;
-   |             ^
+LL |         let e = 1;
+   |             ^ help: if this is intentional, prefix it with an underscore: `_e`
    |
-   = note: consider using `_a` instead
 note: the lint level is defined here
   --> $DIR/liveness-consts.rs:2:9
    |
@@ -12,21 +11,6 @@ LL | #![warn(unused)]
    |         ^^^^^^
    = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
 
-warning: value assigned to `b` is never read
-  --> $DIR/liveness-consts.rs:17:5
-   |
-LL |     b += 1;
-   |     ^
-   |
-   = help: maybe it is overwritten before being read?
-   = note: `#[warn(unused_assignments)]` implied by `#[warn(unused)]`
-
-warning: unused variable: `e`
-  --> $DIR/liveness-consts.rs:24:13
-   |
-LL |         let e = 1;
-   |             ^ help: if this is intentional, prefix it with an underscore: `_e`
-
 warning: unused variable: `s`
   --> $DIR/liveness-consts.rs:33:24
    |
@@ -39,6 +23,29 @@ warning: unused variable: `z`
 LL | pub fn f(x: [u8; { let s = 17; 100 }]) -> [u8;  { let z = 18; 100 }] {
    |                                                       ^ help: if this is intentional, prefix it with an underscore: `_z`
 
+warning: unused variable: `z`
+  --> $DIR/liveness-consts.rs:60:13
+   |
+LL |         let z = 42;
+   |             ^ help: if this is intentional, prefix it with an underscore: `_z`
+
+warning: variable `a` is assigned to, but never used
+  --> $DIR/liveness-consts.rs:7:13
+   |
+LL |     let mut a = 0;
+   |             ^
+   |
+   = note: consider using `_a` instead
+
+warning: value assigned to `b` is never read
+  --> $DIR/liveness-consts.rs:17:5
+   |
+LL |     b += 1;
+   |     ^
+   |
+   = help: maybe it is overwritten before being read?
+   = note: `#[warn(unused_assignments)]` implied by `#[warn(unused)]`
+
 warning: value assigned to `t` is never read
   --> $DIR/liveness-consts.rs:42:9
    |
@@ -53,11 +60,5 @@ warning: unused variable: `w`
 LL |         let w = 10;
    |             ^ help: if this is intentional, prefix it with an underscore: `_w`
 
-warning: unused variable: `z`
-  --> $DIR/liveness-consts.rs:60:13
-   |
-LL |         let z = 42;
-   |             ^ help: if this is intentional, prefix it with an underscore: `_z`
-
 warning: 8 warnings emitted
 
diff --git a/tests/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr b/tests/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr
index 9305facc406..3ce48b1a72f 100644
--- a/tests/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr
+++ b/tests/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr
@@ -54,14 +54,6 @@ LL |         ref mut a @ box ref b => {
    |         |
    |         value is mutably borrowed by `a` here
 
-error: cannot borrow value as immutable because it is also borrowed as mutable
-  --> $DIR/borrowck-pat-at-and-box.rs:54:11
-   |
-LL |     fn f5(ref mut a @ box ref b: Box<NC>) {
-   |           ^^^^^^^^^       ----- value is borrowed by `b` here
-   |           |
-   |           value is mutably borrowed by `a` here
-
 error[E0382]: borrow of moved value
   --> $DIR/borrowck-pat-at-and-box.rs:31:9
    |
@@ -120,6 +112,14 @@ LL |         ref mut a @ box ref b => {
 LL |             drop(b);
    |                  - immutable borrow later used here
 
+error: cannot borrow value as immutable because it is also borrowed as mutable
+  --> $DIR/borrowck-pat-at-and-box.rs:54:11
+   |
+LL |     fn f5(ref mut a @ box ref b: Box<NC>) {
+   |           ^^^^^^^^^       ----- value is borrowed by `b` here
+   |           |
+   |           value is mutably borrowed by `a` here
+
 error[E0502]: cannot borrow value as mutable because it is also borrowed as immutable
   --> $DIR/borrowck-pat-at-and-box.rs:54:11
    |
diff --git a/tests/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr b/tests/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr
index 13989ebadcb..1ed019f0a69 100644
--- a/tests/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr
+++ b/tests/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr
@@ -286,78 +286,6 @@ help: borrow this binding in the pattern to avoid moving the value
 LL |         ref mut a @ Some([ref b, ref mut c]) => {}
    |         +++
 
-error: borrow of moved value
-  --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:11:11
-   |
-LL |     fn f1(a @ ref b: U) {}
-   |           ^   ----- value borrowed here after move
-   |           |
-   |           value moved into `a` here
-   |           move occurs because `a` has type `U` which does not implement the `Copy` trait
-   |
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |     fn f1(ref a @ ref b: U) {}
-   |           +++
-
-error: borrow of moved value
-  --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:11
-   |
-LL |     fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
-   |           ^^^^^        -----          ----- value borrowed here after move
-   |           |            |
-   |           |            value borrowed here after move
-   |           value moved into `a` here
-   |           move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait
-   |
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |     fn f2(ref mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
-   |           +++
-
-error: borrow of moved value
-  --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:20
-   |
-LL |     fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
-   |                    ^   ----- value borrowed here after move
-   |                    |
-   |                    value moved into `b` here
-   |                    move occurs because `b` has type `U` which does not implement the `Copy` trait
-   |
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |     fn f2(mut a @ (ref b @ ref c, mut d @ ref e): (U, U)) {}
-   |                    +++
-
-error: borrow of moved value
-  --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:31
-   |
-LL |     fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
-   |                               ^^^^^   ----- value borrowed here after move
-   |                               |
-   |                               value moved into `d` here
-   |                               move occurs because `d` has type `U` which does not implement the `Copy` trait
-   |
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |     fn f2(mut a @ (b @ ref c, ref mut d @ ref e): (U, U)) {}
-   |                               +++
-
-error: borrow of moved value
-  --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:19:11
-   |
-LL |     fn f3(a @ [ref mut b, ref c]: [U; 2]) {}
-   |           ^    ---------  ----- value borrowed here after move
-   |           |    |
-   |           |    value borrowed here after move
-   |           value moved into `a` here
-   |           move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait
-   |
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |     fn f3(ref a @ [ref mut b, ref c]: [U; 2]) {}
-   |           +++
-
 error[E0382]: use of partially moved value
   --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:9
    |
@@ -447,6 +375,63 @@ LL |         mut a @ Some([ref b, ref mut c]) => {}
    |         |
    |         value moved here
 
+error: borrow of moved value
+  --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:11:11
+   |
+LL |     fn f1(a @ ref b: U) {}
+   |           ^   ----- value borrowed here after move
+   |           |
+   |           value moved into `a` here
+   |           move occurs because `a` has type `U` which does not implement the `Copy` trait
+   |
+help: borrow this binding in the pattern to avoid moving the value
+   |
+LL |     fn f1(ref a @ ref b: U) {}
+   |           +++
+
+error: borrow of moved value
+  --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:11
+   |
+LL |     fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
+   |           ^^^^^        -----          ----- value borrowed here after move
+   |           |            |
+   |           |            value borrowed here after move
+   |           value moved into `a` here
+   |           move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait
+   |
+help: borrow this binding in the pattern to avoid moving the value
+   |
+LL |     fn f2(ref mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
+   |           +++
+
+error: borrow of moved value
+  --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:20
+   |
+LL |     fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
+   |                    ^   ----- value borrowed here after move
+   |                    |
+   |                    value moved into `b` here
+   |                    move occurs because `b` has type `U` which does not implement the `Copy` trait
+   |
+help: borrow this binding in the pattern to avoid moving the value
+   |
+LL |     fn f2(mut a @ (ref b @ ref c, mut d @ ref e): (U, U)) {}
+   |                    +++
+
+error: borrow of moved value
+  --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:31
+   |
+LL |     fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
+   |                               ^^^^^   ----- value borrowed here after move
+   |                               |
+   |                               value moved into `d` here
+   |                               move occurs because `d` has type `U` which does not implement the `Copy` trait
+   |
+help: borrow this binding in the pattern to avoid moving the value
+   |
+LL |     fn f2(mut a @ (b @ ref c, ref mut d @ ref e): (U, U)) {}
+   |                               +++
+
 error[E0382]: use of partially moved value
   --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:11
    |
@@ -457,6 +442,21 @@ LL |     fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {}
    |
    = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait
 
+error: borrow of moved value
+  --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:19:11
+   |
+LL |     fn f3(a @ [ref mut b, ref c]: [U; 2]) {}
+   |           ^    ---------  ----- value borrowed here after move
+   |           |    |
+   |           |    value borrowed here after move
+   |           value moved into `a` here
+   |           move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait
+   |
+help: borrow this binding in the pattern to avoid moving the value
+   |
+LL |     fn f3(ref a @ [ref mut b, ref c]: [U; 2]) {}
+   |           +++
+
 error: aborting due to 33 previous errors
 
 For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr b/tests/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr
index 00593b2a98f..c8c4d9b8fdb 100644
--- a/tests/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr
+++ b/tests/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref.stderr
@@ -166,48 +166,6 @@ LL |         ref mut a @ Some([b, mut c]) => {}
    |         |                 value is moved into `b` here
    |         value is mutably borrowed by `a` here
 
-error: cannot move out of value because it is borrowed
-  --> $DIR/borrowck-pat-by-move-and-ref.rs:11:11
-   |
-LL |     fn f1(ref a @ b: U) {}
-   |           ^^^^^   - value is moved into `b` here
-   |           |
-   |           value is borrowed by `a` here
-
-error: cannot move out of value because it is borrowed
-  --> $DIR/borrowck-pat-by-move-and-ref.rs:14:11
-   |
-LL |     fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {}
-   |           ^^^^^            -----          - value is moved into `e` here
-   |           |                |
-   |           |                value is moved into `c` here
-   |           value is borrowed by `a` here
-
-error: cannot move out of value because it is borrowed
-  --> $DIR/borrowck-pat-by-move-and-ref.rs:14:20
-   |
-LL |     fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {}
-   |                    ^^^^^   ----- value is moved into `c` here
-   |                    |
-   |                    value is borrowed by `b` here
-
-error: cannot move out of value because it is borrowed
-  --> $DIR/borrowck-pat-by-move-and-ref.rs:14:35
-   |
-LL |     fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {}
-   |                                   ^^^^^   - value is moved into `e` here
-   |                                   |
-   |                                   value is borrowed by `d` here
-
-error: cannot move out of value because it is borrowed
-  --> $DIR/borrowck-pat-by-move-and-ref.rs:20:11
-   |
-LL |     fn f3(ref mut a @ [b, mut c]: [U; 2]) {}
-   |           ^^^^^^^^^    -  ----- value is moved into `c` here
-   |           |            |
-   |           |            value is moved into `b` here
-   |           value is mutably borrowed by `a` here
-
 error[E0382]: borrow of partially moved value
   --> $DIR/borrowck-pat-by-move-and-ref.rs:30:9
    |
@@ -306,6 +264,14 @@ help: borrow this binding in the pattern to avoid moving the value
 LL |         ref a @ Some((ref b @ mut c, ref d @ ref e)) => {}
    |                                              +++
 
+error: cannot move out of value because it is borrowed
+  --> $DIR/borrowck-pat-by-move-and-ref.rs:11:11
+   |
+LL |     fn f1(ref a @ b: U) {}
+   |           ^^^^^   - value is moved into `b` here
+   |           |
+   |           value is borrowed by `a` here
+
 error[E0382]: borrow of moved value
   --> $DIR/borrowck-pat-by-move-and-ref.rs:11:11
    |
@@ -315,6 +281,31 @@ LL |     fn f1(ref a @ b: U) {}
    |           value borrowed here after move
    |           move occurs because value has type `U`, which does not implement the `Copy` trait
 
+error: cannot move out of value because it is borrowed
+  --> $DIR/borrowck-pat-by-move-and-ref.rs:14:11
+   |
+LL |     fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {}
+   |           ^^^^^            -----          - value is moved into `e` here
+   |           |                |
+   |           |                value is moved into `c` here
+   |           value is borrowed by `a` here
+
+error: cannot move out of value because it is borrowed
+  --> $DIR/borrowck-pat-by-move-and-ref.rs:14:20
+   |
+LL |     fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {}
+   |                    ^^^^^   ----- value is moved into `c` here
+   |                    |
+   |                    value is borrowed by `b` here
+
+error: cannot move out of value because it is borrowed
+  --> $DIR/borrowck-pat-by-move-and-ref.rs:14:35
+   |
+LL |     fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {}
+   |                                   ^^^^^   - value is moved into `e` here
+   |                                   |
+   |                                   value is borrowed by `d` here
+
 error[E0382]: borrow of moved value
   --> $DIR/borrowck-pat-by-move-and-ref.rs:14:20
    |
@@ -335,6 +326,15 @@ LL |     fn f2(ref a @ (ref b @ mut c, ref d @ e): (U, U)) {}
    |
    = note: move occurs because value has type `U`, which does not implement the `Copy` trait
 
+error: cannot move out of value because it is borrowed
+  --> $DIR/borrowck-pat-by-move-and-ref.rs:20:11
+   |
+LL |     fn f3(ref mut a @ [b, mut c]: [U; 2]) {}
+   |           ^^^^^^^^^    -  ----- value is moved into `c` here
+   |           |            |
+   |           |            value is moved into `b` here
+   |           value is mutably borrowed by `a` here
+
 error[E0382]: borrow of partially moved value
   --> $DIR/borrowck-pat-by-move-and-ref.rs:20:11
    |
diff --git a/tests/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr b/tests/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr
index d6409d1b643..c0a6558a1bf 100644
--- a/tests/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr
+++ b/tests/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr
@@ -221,47 +221,6 @@ LL |     let ref mut a @ (ref b, ref c) = (U, U);
    |         |            value is borrowed by `b` here
    |         value is mutably borrowed by `a` here
 
-error: cannot borrow value as mutable because it is also borrowed as immutable
-  --> $DIR/borrowck-pat-ref-mut-and-ref.rs:22:11
-   |
-LL |     fn f1(ref a @ ref mut b: U) {}
-   |           ^^^^^   --------- value is mutably borrowed by `b` here
-   |           |
-   |           value is borrowed by `a` here
-
-error: cannot borrow value as immutable because it is also borrowed as mutable
-  --> $DIR/borrowck-pat-ref-mut-and-ref.rs:24:11
-   |
-LL |     fn f2(ref mut a @ ref b: U) {}
-   |           ^^^^^^^^^   ----- value is borrowed by `b` here
-   |           |
-   |           value is mutably borrowed by `a` here
-
-error: cannot borrow value as mutable because it is also borrowed as immutable
-  --> $DIR/borrowck-pat-ref-mut-and-ref.rs:26:11
-   |
-LL |     fn f3(ref a @ [ref b, ref mut mid @ .., ref c]: [U; 4]) {}
-   |           ^^^^^           ----------- value is mutably borrowed by `mid` here
-   |           |
-   |           value is borrowed by `a` here
-
-error: cannot borrow value as mutable because it is also borrowed as immutable
-  --> $DIR/borrowck-pat-ref-mut-and-ref.rs:28:22
-   |
-LL |     fn f4_also_moved(ref a @ ref mut b @ c: U) {}
-   |                      ^^^^^   ---------   - value is moved into `c` here
-   |                      |       |
-   |                      |       value is mutably borrowed by `b` here
-   |                      value is borrowed by `a` here
-
-error: cannot move out of value because it is borrowed
-  --> $DIR/borrowck-pat-ref-mut-and-ref.rs:28:30
-   |
-LL |     fn f4_also_moved(ref a @ ref mut b @ c: U) {}
-   |                              ^^^^^^^^^   - value is moved into `c` here
-   |                              |
-   |                              value is mutably borrowed by `b` here
-
 error[E0502]: cannot borrow value as immutable because it is also borrowed as mutable
   --> $DIR/borrowck-pat-ref-mut-and-ref.rs:8:31
    |
@@ -398,6 +357,47 @@ LL |
 LL |     *b = U;
    |     ------ mutable borrow later used here
 
+error: cannot borrow value as mutable because it is also borrowed as immutable
+  --> $DIR/borrowck-pat-ref-mut-and-ref.rs:22:11
+   |
+LL |     fn f1(ref a @ ref mut b: U) {}
+   |           ^^^^^   --------- value is mutably borrowed by `b` here
+   |           |
+   |           value is borrowed by `a` here
+
+error: cannot borrow value as immutable because it is also borrowed as mutable
+  --> $DIR/borrowck-pat-ref-mut-and-ref.rs:24:11
+   |
+LL |     fn f2(ref mut a @ ref b: U) {}
+   |           ^^^^^^^^^   ----- value is borrowed by `b` here
+   |           |
+   |           value is mutably borrowed by `a` here
+
+error: cannot borrow value as mutable because it is also borrowed as immutable
+  --> $DIR/borrowck-pat-ref-mut-and-ref.rs:26:11
+   |
+LL |     fn f3(ref a @ [ref b, ref mut mid @ .., ref c]: [U; 4]) {}
+   |           ^^^^^           ----------- value is mutably borrowed by `mid` here
+   |           |
+   |           value is borrowed by `a` here
+
+error: cannot borrow value as mutable because it is also borrowed as immutable
+  --> $DIR/borrowck-pat-ref-mut-and-ref.rs:28:22
+   |
+LL |     fn f4_also_moved(ref a @ ref mut b @ c: U) {}
+   |                      ^^^^^   ---------   - value is moved into `c` here
+   |                      |       |
+   |                      |       value is mutably borrowed by `b` here
+   |                      value is borrowed by `a` here
+
+error: cannot move out of value because it is borrowed
+  --> $DIR/borrowck-pat-ref-mut-and-ref.rs:28:30
+   |
+LL |     fn f4_also_moved(ref a @ ref mut b @ c: U) {}
+   |                              ^^^^^^^^^   - value is moved into `c` here
+   |                              |
+   |                              value is mutably borrowed by `b` here
+
 error[E0382]: borrow of moved value
   --> $DIR/borrowck-pat-ref-mut-and-ref.rs:28:30
    |
diff --git a/tests/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.stderr b/tests/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.stderr
index 24189d0615c..c634ea470c5 100644
--- a/tests/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.stderr
+++ b/tests/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.stderr
@@ -194,50 +194,6 @@ LL |         ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => {
    |                                     |
    |                                     value is mutably borrowed by `a` here
 
-error: cannot borrow value as mutable more than once at a time
-  --> $DIR/borrowck-pat-ref-mut-twice.rs:8:11
-   |
-LL |     fn f1(ref mut a @ ref mut b: U) {}
-   |           ^^^^^^^^^   --------- value is mutably borrowed by `b` here
-   |           |
-   |           value is mutably borrowed by `a` here
-
-error: cannot borrow value as mutable more than once at a time
-  --> $DIR/borrowck-pat-ref-mut-twice.rs:10:11
-   |
-LL |     fn f2(ref mut a @ ref mut b: U) {}
-   |           ^^^^^^^^^   --------- value is mutably borrowed by `b` here
-   |           |
-   |           value is mutably borrowed by `a` here
-
-error: cannot borrow value as mutable more than once at a time
-  --> $DIR/borrowck-pat-ref-mut-twice.rs:13:9
-   |
-LL |         ref mut a @ [
-   |         ^^^^^^^^^ value is mutably borrowed by `a` here
-LL |
-LL |             [ref b @ .., _],
-   |              ----- value is borrowed by `b` here
-LL |             [_, ref mut mid @ ..],
-   |                 ----------- value is mutably borrowed by `mid` here
-
-error: cannot borrow value as mutable more than once at a time
-  --> $DIR/borrowck-pat-ref-mut-twice.rs:21:22
-   |
-LL |     fn f4_also_moved(ref mut a @ ref mut b @ c: U) {}
-   |                      ^^^^^^^^^   ---------   - value is moved into `c` here
-   |                      |           |
-   |                      |           value is mutably borrowed by `b` here
-   |                      value is mutably borrowed by `a` here
-
-error: cannot move out of value because it is borrowed
-  --> $DIR/borrowck-pat-ref-mut-twice.rs:21:34
-   |
-LL |     fn f4_also_moved(ref mut a @ ref mut b @ c: U) {}
-   |                                  ^^^^^^^^^   - value is moved into `c` here
-   |                                  |
-   |                                  value is mutably borrowed by `b` here
-
 error[E0499]: cannot borrow value as mutable more than once at a time
   --> $DIR/borrowck-pat-ref-mut-twice.rs:29:9
    |
@@ -304,6 +260,50 @@ LL |         ref mut a @ Ok(ref mut b) | ref mut a @ Err(ref mut b) => {
 LL |             drop(a);
    |                  - first borrow later used here
 
+error: cannot borrow value as mutable more than once at a time
+  --> $DIR/borrowck-pat-ref-mut-twice.rs:8:11
+   |
+LL |     fn f1(ref mut a @ ref mut b: U) {}
+   |           ^^^^^^^^^   --------- value is mutably borrowed by `b` here
+   |           |
+   |           value is mutably borrowed by `a` here
+
+error: cannot borrow value as mutable more than once at a time
+  --> $DIR/borrowck-pat-ref-mut-twice.rs:10:11
+   |
+LL |     fn f2(ref mut a @ ref mut b: U) {}
+   |           ^^^^^^^^^   --------- value is mutably borrowed by `b` here
+   |           |
+   |           value is mutably borrowed by `a` here
+
+error: cannot borrow value as mutable more than once at a time
+  --> $DIR/borrowck-pat-ref-mut-twice.rs:13:9
+   |
+LL |         ref mut a @ [
+   |         ^^^^^^^^^ value is mutably borrowed by `a` here
+LL |
+LL |             [ref b @ .., _],
+   |              ----- value is borrowed by `b` here
+LL |             [_, ref mut mid @ ..],
+   |                 ----------- value is mutably borrowed by `mid` here
+
+error: cannot borrow value as mutable more than once at a time
+  --> $DIR/borrowck-pat-ref-mut-twice.rs:21:22
+   |
+LL |     fn f4_also_moved(ref mut a @ ref mut b @ c: U) {}
+   |                      ^^^^^^^^^   ---------   - value is moved into `c` here
+   |                      |           |
+   |                      |           value is mutably borrowed by `b` here
+   |                      value is mutably borrowed by `a` here
+
+error: cannot move out of value because it is borrowed
+  --> $DIR/borrowck-pat-ref-mut-twice.rs:21:34
+   |
+LL |     fn f4_also_moved(ref mut a @ ref mut b @ c: U) {}
+   |                                  ^^^^^^^^^   - value is moved into `c` here
+   |                                  |
+   |                                  value is mutably borrowed by `b` here
+
 error[E0382]: borrow of moved value
   --> $DIR/borrowck-pat-ref-mut-twice.rs:21:34
    |
diff --git a/tests/ui/privacy/privacy2.stderr b/tests/ui/privacy/privacy2.stderr
index 882f314655d..c2a33ce1f59 100644
--- a/tests/ui/privacy/privacy2.stderr
+++ b/tests/ui/privacy/privacy2.stderr
@@ -23,13 +23,7 @@ LL | pub fn foo() {}
 
 error: requires `sized` lang_item
 
-error: requires `sized` lang_item
-
-error: requires `sized` lang_item
-
-error: requires `sized` lang_item
-
-error: aborting due to 6 previous errors
+error: aborting due to 3 previous errors
 
 Some errors have detailed explanations: E0432, E0603.
 For more information about an error, try `rustc --explain E0432`.
diff --git a/tests/ui/privacy/privacy3.stderr b/tests/ui/privacy/privacy3.stderr
index 42ce456d962..22c1e48b07d 100644
--- a/tests/ui/privacy/privacy3.stderr
+++ b/tests/ui/privacy/privacy3.stderr
@@ -6,12 +6,6 @@ LL |     use bar::gpriv;
 
 error: requires `sized` lang_item
 
-error: requires `sized` lang_item
-
-error: requires `sized` lang_item
-
-error: requires `sized` lang_item
-
-error: aborting due to 5 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/rfc-2565-param-attrs/param-attrs-cfg.stderr b/tests/ui/rfc-2565-param-attrs/param-attrs-cfg.stderr
index 6d18d295cfc..16e1af46059 100644
--- a/tests/ui/rfc-2565-param-attrs/param-attrs-cfg.stderr
+++ b/tests/ui/rfc-2565-param-attrs/param-attrs-cfg.stderr
@@ -10,6 +10,12 @@ note: the lint level is defined here
 LL | #![deny(unused_variables)]
    |         ^^^^^^^^^^^^^^^^
 
+error: unused variable: `a`
+  --> $DIR/param-attrs-cfg.rs:41:27
+   |
+LL |         #[cfg(something)] a: i32,
+   |                           ^ help: if this is intentional, prefix it with an underscore: `_a`
+
 error: unused variable: `b`
   --> $DIR/param-attrs-cfg.rs:30:23
    |
@@ -22,12 +28,6 @@ error: unused variable: `c`
 LL |     #[cfg_attr(nothing, cfg(nothing))] c: i32,
    |                                        ^ help: if this is intentional, prefix it with an underscore: `_c`
 
-error: unused variable: `a`
-  --> $DIR/param-attrs-cfg.rs:41:27
-   |
-LL |         #[cfg(something)] a: i32,
-   |                           ^ help: if this is intentional, prefix it with an underscore: `_a`
-
 error: unused variable: `b`
   --> $DIR/param-attrs-cfg.rs:48:27
    |