about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-06-03 01:00:39 +0000
committerbors <bors@rust-lang.org>2020-06-03 01:00:39 +0000
commit680a4b2fbdca0dc6c5ceec826a8dbeabe28f305d (patch)
tree200cca83afffab0ecf5dc1427de7b8169069ad7f /src/test
parentfe10f1a49f5ca46e57261b95f46f519523f418fe (diff)
parentba3d98250f886279e204f6e650666df6818777e2 (diff)
downloadrust-680a4b2fbdca0dc6c5ceec826a8dbeabe28f305d.tar.gz
rust-680a4b2fbdca0dc6c5ceec826a8dbeabe28f305d.zip
Auto merge of #72935 - Dylan-DPC:rollup-60g3ab6, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #72704 (Remote testing fixes)
 - #72820 (InstCombine: Don't optimize `&mut *x` into `x`)
 - #72848 (Correct generic parameter ordering in error note for E0747)
 - #72902 (Add a test to ensure Fuse stays covariant)
 - #72921 (Add assert to Vec with_capacity docs)

Failed merges:

r? @ghost
Diffstat (limited to 'src/test')
-rw-r--r--src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.a.Inline.after.mir6
-rw-r--r--src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.b.Inline.after.mir8
-rw-r--r--src/test/mir-opt/nrvo-simple/rustc.nrvo.RenameReturnPlace.diff7
-rw-r--r--src/test/ui-fulldeps/compiler-calls.rs1
-rw-r--r--src/test/ui-fulldeps/mod_dir_path_canonicalized.rs1
-rw-r--r--src/test/ui/suggestions/suggest-move-types.stderr4
-rw-r--r--src/test/ui/variance-iterators-in-libcore.rs5
7 files changed, 24 insertions, 8 deletions
diff --git a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.a.Inline.after.mir b/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.a.Inline.after.mir
index 8751469d265..44f412c2e26 100644
--- a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.a.Inline.after.mir
+++ b/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.a.Inline.after.mir
@@ -8,6 +8,7 @@ fn a(_1: &mut [T]) -> &mut [T] {
     let mut _4: &mut [T];                // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:6
     scope 1 {
         debug self => _4;                // in scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
+        let mut _5: &mut [T];            // in scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15
     }
 
     bb0: {
@@ -15,7 +16,10 @@ fn a(_1: &mut [T]) -> &mut [T] {
         StorageLive(_3);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15
         StorageLive(_4);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:6
         _4 = &mut (*_1);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:6
-        _3 = move _4;                    // scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
+        StorageLive(_5);                 // scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
+        _5 = &mut (*_4);                 // scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
+        _3 = &mut (*_5);                 // scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
+        StorageDead(_5);                 // scope 1 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
         _2 = &mut (*_3);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15
         StorageDead(_4);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:14: 3:15
         _0 = &mut (*_2);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15
diff --git a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.b.Inline.after.mir b/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.b.Inline.after.mir
index 743da27a049..48e48f989bd 100644
--- a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.b.Inline.after.mir
+++ b/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut/rustc.b.Inline.after.mir
@@ -9,6 +9,7 @@ fn b(_1: &mut std::boxed::Box<T>) -> &mut T {
     scope 1 {
         debug self => _4;                // in scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
         let mut _5: &mut T;              // in scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15
+        let mut _6: &mut T;              // in scope 1 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15
     }
 
     bb0: {
@@ -17,8 +18,11 @@ fn b(_1: &mut std::boxed::Box<T>) -> &mut T {
         StorageLive(_4);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:6
         _4 = &mut (*_1);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:6
         StorageLive(_5);                 // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
-        _5 = &mut (*(*_4));              // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
-        _3 = move _5;                    // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
+        StorageLive(_6);                 // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
+        _6 = &mut (*(*_4));              // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
+        _5 = &mut (*_6);                 // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
+        _3 = &mut (*_5);                 // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
+        StorageDead(_6);                 // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
         StorageDead(_5);                 // scope 1 at $SRC_DIR/liballoc/boxed.rs:LL:COL
         _2 = &mut (*_3);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15
         StorageDead(_4);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:14: 8:15
diff --git a/src/test/mir-opt/nrvo-simple/rustc.nrvo.RenameReturnPlace.diff b/src/test/mir-opt/nrvo-simple/rustc.nrvo.RenameReturnPlace.diff
index 79d92897cb5..4511470f3a5 100644
--- a/src/test/mir-opt/nrvo-simple/rustc.nrvo.RenameReturnPlace.diff
+++ b/src/test/mir-opt/nrvo-simple/rustc.nrvo.RenameReturnPlace.diff
@@ -26,12 +26,17 @@
                                            // + span: $DIR/nrvo-simple.rs:3:20: 3:21
                                            // + literal: Const { ty: u8, val: Value(Scalar(0x00)) }
           StorageLive(_3);                 // scope 1 at $DIR/nrvo-simple.rs:4:5: 4:19
+          StorageLive(_5);                 // scope 1 at $DIR/nrvo-simple.rs:4:10: 4:18
+          StorageLive(_6);                 // scope 1 at $DIR/nrvo-simple.rs:4:10: 4:18
 -         _6 = &mut _2;                    // scope 1 at $DIR/nrvo-simple.rs:4:10: 4:18
 +         _6 = &mut _0;                    // scope 1 at $DIR/nrvo-simple.rs:4:10: 4:18
-          _3 = move _1(move _6) -> bb1;    // scope 1 at $DIR/nrvo-simple.rs:4:5: 4:19
+          _5 = &mut (*_6);                 // scope 1 at $DIR/nrvo-simple.rs:4:10: 4:18
+          _3 = move _1(move _5) -> bb1;    // scope 1 at $DIR/nrvo-simple.rs:4:5: 4:19
       }
   
       bb1: {
+          StorageDead(_5);                 // scope 1 at $DIR/nrvo-simple.rs:4:18: 4:19
+          StorageDead(_6);                 // scope 1 at $DIR/nrvo-simple.rs:4:19: 4:20
           StorageDead(_3);                 // scope 1 at $DIR/nrvo-simple.rs:4:19: 4:20
 -         _0 = _2;                         // scope 1 at $DIR/nrvo-simple.rs:5:5: 5:8
 -         StorageDead(_2);                 // scope 0 at $DIR/nrvo-simple.rs:6:1: 6:2
diff --git a/src/test/ui-fulldeps/compiler-calls.rs b/src/test/ui-fulldeps/compiler-calls.rs
index bd9113c7079..e97dcab6ae5 100644
--- a/src/test/ui-fulldeps/compiler-calls.rs
+++ b/src/test/ui-fulldeps/compiler-calls.rs
@@ -3,6 +3,7 @@
 
 // ignore-cross-compile
 // ignore-stage1
+// ignore-remote
 
 #![feature(rustc_private)]
 
diff --git a/src/test/ui-fulldeps/mod_dir_path_canonicalized.rs b/src/test/ui-fulldeps/mod_dir_path_canonicalized.rs
index 3c5738f574c..ff7bbafe7c2 100644
--- a/src/test/ui-fulldeps/mod_dir_path_canonicalized.rs
+++ b/src/test/ui-fulldeps/mod_dir_path_canonicalized.rs
@@ -1,6 +1,7 @@
 // run-pass
 // Testing that a librustc_ast can parse modules with canonicalized base path
 // ignore-cross-compile
+// ignore-remote
 
 #![feature(rustc_private)]
 
diff --git a/src/test/ui/suggestions/suggest-move-types.stderr b/src/test/ui/suggestions/suggest-move-types.stderr
index 3bb6fd6e4f4..96f1656bae4 100644
--- a/src/test/ui/suggestions/suggest-move-types.stderr
+++ b/src/test/ui/suggestions/suggest-move-types.stderr
@@ -124,7 +124,7 @@ error[E0747]: lifetime provided when a type was expected
 LL | struct Cl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<T, 'a, A=(), B=(), C=(), U, 'b, V, 'c>> {
    |                                                        ^^
    |
-   = note: type arguments must be provided before lifetime arguments
+   = note: lifetime arguments must be provided before type arguments
 
 error[E0747]: lifetime provided when a type was expected
   --> $DIR/suggest-move-types.rs:82:56
@@ -132,7 +132,7 @@ error[E0747]: lifetime provided when a type was expected
 LL | struct Dl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<T, 'a, A=(), B=(), U, 'b, C=(), V, 'c>> {
    |                                                        ^^
    |
-   = note: type arguments must be provided before lifetime arguments
+   = note: lifetime arguments must be provided before type arguments
 
 error: aborting due to 12 previous errors
 
diff --git a/src/test/ui/variance-iterators-in-libcore.rs b/src/test/ui/variance-iterators-in-libcore.rs
index 2ab3a8ab5c1..a542e44d517 100644
--- a/src/test/ui/variance-iterators-in-libcore.rs
+++ b/src/test/ui/variance-iterators-in-libcore.rs
@@ -1,9 +1,10 @@
 // run-pass
 
-#![allow(warnings)]
+#![allow(dead_code)]
 
-use std::iter::Zip;
+use std::iter::{Fuse, Zip};
 
+fn fuse_covariant<'a, I>(iter: Fuse<&'static I>) -> Fuse<&'a I> { iter }
 fn zip_covariant<'a, A, B>(iter: Zip<&'static A, &'static B>) -> Zip<&'a A, &'a B> { iter }
 
 fn main() { }