about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-07-22 18:51:46 +0000
committerbors <bors@rust-lang.org>2018-07-22 18:51:46 +0000
commit3b7720399a9006d9d7b89c251fa37ead46f9db7a (patch)
tree893229ffba03c1f5b454d36ae07257ccf1a75d5c /src/test
parent32772fddd52013a38ece584279b6bc422b2d8b9b (diff)
parentb954d4d1b5a97cf9c13929a742e81035f3158440 (diff)
downloadrust-3b7720399a9006d9d7b89c251fa37ead46f9db7a.tar.gz
rust-3b7720399a9006d9d7b89c251fa37ead46f9db7a.zip
Auto merge of #52616 - kennytm:rollup, r=kennytm
Rollup of 11 pull requests

Successful merges:

 - #51807 (Deprecation of str::slice_unchecked(_mut))
 - #52051 (mem::swap the obvious way for types smaller than the SIMD optimization's block size)
 - #52465 (Add CI test harness for `thumb*` targets. [IRR-2018-embedded])
 - #52507 (Reword when `_` couldn't be inferred)
 - #52508 (Document that Unique::empty() and NonNull::dangling() aren't sentinel values)
 - #52521 (Fix links in rustdoc book.)
 - #52581 (Avoid using `#[macro_export]` for documenting builtin macros)
 - #52582 (Typo)
 - #52587 (Add missing backtick in UniversalRegions doc comment)
 - #52594 (Run the error index tool against the sysroot libdir)
 - #52615 (Added new lines to .gitignore.)
Diffstat (limited to 'src/test')
-rw-r--r--src/test/codegen/swap-small-types.rs27
-rw-r--r--src/test/ui/error-codes/E0282.stderr2
-rw-r--r--src/test/ui/issue-12187-1.stderr2
-rw-r--r--src/test/ui/issue-12187-2.stderr2
-rw-r--r--src/test/ui/issue-15965.stderr2
-rw-r--r--src/test/ui/issue-18159.stderr2
-rw-r--r--src/test/ui/issue-20261.stderr2
-rw-r--r--src/test/ui/issue-2151.stderr2
-rw-r--r--src/test/ui/issue-23041.stderr2
-rw-r--r--src/test/ui/issue-24013.stderr2
-rw-r--r--src/test/ui/issue-51116.rs2
-rw-r--r--src/test/ui/issue-51116.stderr2
-rw-r--r--src/test/ui/issue-7813.stderr2
-rw-r--r--src/test/ui/span/issue-42234-unknown-receiver-type.stderr2
-rw-r--r--src/test/ui/span/method-and-field-eager-resolution.stderr4
-rw-r--r--src/test/ui/type-check/cannot_infer_local_or_array.stderr2
16 files changed, 43 insertions, 16 deletions
diff --git a/src/test/codegen/swap-small-types.rs b/src/test/codegen/swap-small-types.rs
new file mode 100644
index 00000000000..46406ee5182
--- /dev/null
+++ b/src/test/codegen/swap-small-types.rs
@@ -0,0 +1,27 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -O
+// only-x86_64
+
+#![crate_type = "lib"]
+
+use std::mem::swap;
+
+type RGB48 = [u16; 3];
+
+// CHECK-LABEL: @swap_rgb48
+#[no_mangle]
+pub fn swap_rgb48(x: &mut RGB48, y: &mut RGB48) {
+// CHECK-NOT: alloca
+// CHECK: load i48
+// CHECK: store i48
+    swap(x, y)
+}
diff --git a/src/test/ui/error-codes/E0282.stderr b/src/test/ui/error-codes/E0282.stderr
index f1319f41395..6862e2d8688 100644
--- a/src/test/ui/error-codes/E0282.stderr
+++ b/src/test/ui/error-codes/E0282.stderr
@@ -4,7 +4,7 @@ error[E0282]: type annotations needed
 LL |     let x = "hello".chars().rev().collect(); //~ ERROR E0282
    |         ^
    |         |
-   |         cannot infer type for `_`
+   |         cannot infer type
    |         consider giving `x` a type
 
 error: aborting due to previous error
diff --git a/src/test/ui/issue-12187-1.stderr b/src/test/ui/issue-12187-1.stderr
index 7d4df2901fe..94afd6aab57 100644
--- a/src/test/ui/issue-12187-1.stderr
+++ b/src/test/ui/issue-12187-1.stderr
@@ -4,7 +4,7 @@ error[E0282]: type annotations needed
 LL |     let &v = new();
    |         -^
    |         ||
-   |         |cannot infer type for `_`
+   |         |cannot infer type
    |         consider giving the pattern a type
 
 error: aborting due to previous error
diff --git a/src/test/ui/issue-12187-2.stderr b/src/test/ui/issue-12187-2.stderr
index f7ecbd44772..90b41e397c6 100644
--- a/src/test/ui/issue-12187-2.stderr
+++ b/src/test/ui/issue-12187-2.stderr
@@ -4,7 +4,7 @@ error[E0282]: type annotations needed
 LL |     let &v = new();
    |         -^
    |         ||
-   |         |cannot infer type for `_`
+   |         |cannot infer type
    |         consider giving the pattern a type
 
 error: aborting due to previous error
diff --git a/src/test/ui/issue-15965.stderr b/src/test/ui/issue-15965.stderr
index 216c6460c77..3162556986e 100644
--- a/src/test/ui/issue-15965.stderr
+++ b/src/test/ui/issue-15965.stderr
@@ -4,7 +4,7 @@ error[E0282]: type annotations needed
 LL | /         { return () }
 LL | | //~^ ERROR type annotations needed [E0282]
 LL | |     ()
-   | |______^ cannot infer type for `_`
+   | |______^ cannot infer type
    |
    = note: type must be known at this point
 
diff --git a/src/test/ui/issue-18159.stderr b/src/test/ui/issue-18159.stderr
index 894660f1ebf..084e859111b 100644
--- a/src/test/ui/issue-18159.stderr
+++ b/src/test/ui/issue-18159.stderr
@@ -4,7 +4,7 @@ error[E0282]: type annotations needed
 LL |     let x; //~ ERROR type annotations needed
    |         ^
    |         |
-   |         cannot infer type for `_`
+   |         cannot infer type
    |         consider giving `x` a type
 
 error: aborting due to previous error
diff --git a/src/test/ui/issue-20261.stderr b/src/test/ui/issue-20261.stderr
index a7a7ea7c69b..6cdddcff929 100644
--- a/src/test/ui/issue-20261.stderr
+++ b/src/test/ui/issue-20261.stderr
@@ -4,7 +4,7 @@ error[E0282]: type annotations needed
 LL |     for (ref i,) in [].iter() {
    |                     --------- the element type for this iterator is not specified
 LL |         i.clone();
-   |           ^^^^^ cannot infer type for `_`
+   |           ^^^^^ cannot infer type
    |
    = note: type must be known at this point
 
diff --git a/src/test/ui/issue-2151.stderr b/src/test/ui/issue-2151.stderr
index 592c4f424b0..516c5287b31 100644
--- a/src/test/ui/issue-2151.stderr
+++ b/src/test/ui/issue-2151.stderr
@@ -4,7 +4,7 @@ error[E0282]: type annotations needed
 LL |     let x = panic!();
    |         - consider giving `x` a type
 LL |     x.clone(); //~ ERROR type annotations needed
-   |     ^ cannot infer type for `_`
+   |     ^ cannot infer type
    |
    = note: type must be known at this point
 
diff --git a/src/test/ui/issue-23041.stderr b/src/test/ui/issue-23041.stderr
index f89bce09c7e..e97a97fec09 100644
--- a/src/test/ui/issue-23041.stderr
+++ b/src/test/ui/issue-23041.stderr
@@ -2,7 +2,7 @@ error[E0282]: type annotations needed
   --> $DIR/issue-23041.rs:16:22
    |
 LL |     b.downcast_ref::<fn(_)->_>(); //~ ERROR E0282
-   |                      ^^^^^^^^ cannot infer type for `_`
+   |                      ^^^^^^^^ cannot infer type
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issue-24013.stderr b/src/test/ui/issue-24013.stderr
index 324e705e5a1..5729bdf2064 100644
--- a/src/test/ui/issue-24013.stderr
+++ b/src/test/ui/issue-24013.stderr
@@ -2,7 +2,7 @@ error[E0282]: type annotations needed
   --> $DIR/issue-24013.rs:15:20
    |
 LL |     unsafe {swap::<&mut _>(transmute(&a), transmute(&b))};
-   |                    ^^^^^^ cannot infer type for `_`
+   |                    ^^^^^^ cannot infer type
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issue-51116.rs b/src/test/ui/issue-51116.rs
index 34217c6236c..c01559b1126 100644
--- a/src/test/ui/issue-51116.rs
+++ b/src/test/ui/issue-51116.rs
@@ -15,7 +15,7 @@ fn main() {
             //~^ NOTE the element type for this iterator is not specified
             *tile = 0;
             //~^ ERROR type annotations needed
-            //~| NOTE cannot infer type for `_`
+            //~| NOTE cannot infer type
             //~| NOTE type must be known at this point
         }
     }
diff --git a/src/test/ui/issue-51116.stderr b/src/test/ui/issue-51116.stderr
index 0c38688340b..fc84ee9028d 100644
--- a/src/test/ui/issue-51116.stderr
+++ b/src/test/ui/issue-51116.stderr
@@ -5,7 +5,7 @@ LL |         for tile in row {
    |                     --- the element type for this iterator is not specified
 LL |             //~^ NOTE the element type for this iterator is not specified
 LL |             *tile = 0;
-   |             ^^^^^ cannot infer type for `_`
+   |             ^^^^^ cannot infer type
    |
    = note: type must be known at this point
 
diff --git a/src/test/ui/issue-7813.stderr b/src/test/ui/issue-7813.stderr
index 34837e90e4f..3ab01982057 100644
--- a/src/test/ui/issue-7813.stderr
+++ b/src/test/ui/issue-7813.stderr
@@ -2,7 +2,7 @@ error[E0282]: type annotations needed
   --> $DIR/issue-7813.rs:12:13
    |
 LL |     let v = &[]; //~ ERROR type annotations needed
-   |         -   ^^^ cannot infer type for `_`
+   |         -   ^^^ cannot infer type
    |         |
    |         consider giving `v` a type
 
diff --git a/src/test/ui/span/issue-42234-unknown-receiver-type.stderr b/src/test/ui/span/issue-42234-unknown-receiver-type.stderr
index e1e13e9256d..d2d5a4a4b12 100644
--- a/src/test/ui/span/issue-42234-unknown-receiver-type.stderr
+++ b/src/test/ui/span/issue-42234-unknown-receiver-type.stderr
@@ -13,7 +13,7 @@ error[E0282]: type annotations needed
    |
 LL | /     data.iter() //~ ERROR 22:5: 23:20: type annotations needed
 LL | |         .sum::<_>()
-   | |___________________^ cannot infer type for `_`
+   | |___________________^ cannot infer type
    |
    = note: type must be known at this point
 
diff --git a/src/test/ui/span/method-and-field-eager-resolution.stderr b/src/test/ui/span/method-and-field-eager-resolution.stderr
index 21e19828a99..8a8c1e467b9 100644
--- a/src/test/ui/span/method-and-field-eager-resolution.stderr
+++ b/src/test/ui/span/method-and-field-eager-resolution.stderr
@@ -4,7 +4,7 @@ error[E0282]: type annotations needed
 LL |     let mut x = Default::default();
    |         ----- consider giving `x` a type
 LL |     x.0;
-   |     ^ cannot infer type for `_`
+   |     ^ cannot infer type
    |
    = note: type must be known at this point
 
@@ -14,7 +14,7 @@ error[E0282]: type annotations needed
 LL |     let mut x = Default::default();
    |         ----- consider giving `x` a type
 LL |     x[0];
-   |     ^ cannot infer type for `_`
+   |     ^ cannot infer type
    |
    = note: type must be known at this point
 
diff --git a/src/test/ui/type-check/cannot_infer_local_or_array.stderr b/src/test/ui/type-check/cannot_infer_local_or_array.stderr
index 90191ae6745..bfdd614e50d 100644
--- a/src/test/ui/type-check/cannot_infer_local_or_array.stderr
+++ b/src/test/ui/type-check/cannot_infer_local_or_array.stderr
@@ -2,7 +2,7 @@ error[E0282]: type annotations needed
   --> $DIR/cannot_infer_local_or_array.rs:12:13
    |
 LL |     let x = []; //~ ERROR type annotations needed
-   |         -   ^^ cannot infer type for `_`
+   |         -   ^^ cannot infer type
    |         |
    |         consider giving `x` a type