about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-10-18 07:02:11 +0000
committerbors <bors@rust-lang.org>2018-10-18 07:02:11 +0000
commitaf204b1f3e83d77427f5fe78285537378be103ec (patch)
tree9cb6f52d303dfd226216893cb08a28860ffa2301 /src/test
parentf7eb7fbbf6bca0eaa146c4a48cd39c133a257706 (diff)
parent1c090061e9a7dbe7ce65c34f81b8fd55318adeb0 (diff)
Auto merge of #55171 - kennytm:rollup, r=kennytm
Rollup of 18 pull requests

Successful merges:

 - #54646 (improve documentation on std::thread::sleep)
 - #54933 (Cleanup the rest of codegen_llvm)
 - #54964 (Run both lldb and gdb tests)
 - #55016 (Deduplicate some code and compile-time values around vtables)
 - #55031 (Improve verify_llvm_ir config option)
 - #55050 (doc std::fmt: the Python inspiration is already mentioned in precedin…)
 - #55077 (rustdoc: Use dyn keyword when rendering dynamic traits)
 - #55080 (Detect if access to localStorage is forbidden by the user's browser)
 - #55090 (regression test for move out of borrow via pattern)
 - #55102 (resolve: Do not skip extern prelude during speculative resolution)
 - #55104 (Add test for #34229)
 - #55111 ([Rustc Book] Explain --cfg's arguments)
 - #55122 (Cleanup mir/borrowck)
 - #55127 (Remove HybridBitSet::dummy)
 - #55128 (Fix LLVMRustInlineAsmVerify return type mismatch)
 - #55142 (miri: layout should not affect CTFE checks (outside of validation))
 - #55151 (Cleanup nll)
 - #55161 ([librustdoc] Disable spellcheck for search field)
Diffstat (limited to 'src/test')
-rw-r--r--src/test/debuginfo/lexical-scope-with-macro.rs2
-rw-r--r--src/test/run-pass/extern/extern-prelude-no-speculative.rs2
-rw-r--r--src/test/rustdoc/assoc-consts.rs2
-rw-r--r--src/test/rustdoc/inline_cross/issue-32881.rs4
-rw-r--r--src/test/rustdoc/test-parens.rs2
-rw-r--r--src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.rs22
-rw-r--r--src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr12
-rw-r--r--src/test/ui/impl-trait/auxiliary/extra-item.rs1
-rw-r--r--src/test/ui/impl-trait/extra-item.rs10
-rw-r--r--src/test/ui/impl-trait/extra-item.stderr9
-rw-r--r--src/test/ui/issues/issue-34229.rs4
-rw-r--r--src/test/ui/issues/issue-34229.stderr12
12 files changed, 76 insertions, 6 deletions
diff --git a/src/test/debuginfo/lexical-scope-with-macro.rs b/src/test/debuginfo/lexical-scope-with-macro.rs
index 4e88f65ad1d..d11a42bb0ed 100644
--- a/src/test/debuginfo/lexical-scope-with-macro.rs
+++ b/src/test/debuginfo/lexical-scope-with-macro.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // min-lldb-version: 310
-// ignore-macos FIXME #48807
+// ignore-lldb FIXME #48807
 
 // compile-flags:-g -Zdebug-macros
 
diff --git a/src/test/run-pass/extern/extern-prelude-no-speculative.rs b/src/test/run-pass/extern/extern-prelude-no-speculative.rs
index 6ca1815a191..372f34454de 100644
--- a/src/test/run-pass/extern/extern-prelude-no-speculative.rs
+++ b/src/test/run-pass/extern/extern-prelude-no-speculative.rs
@@ -10,7 +10,7 @@
 
 // run-pass
 #![allow(unused_variables)]
-// compile-flags: --extern LooksLikeExternCrate=/path/to/nowhere
+// compile-flags: --extern LooksLikeExternCrate
 
 mod m {
     pub struct LooksLikeExternCrate;
diff --git a/src/test/rustdoc/assoc-consts.rs b/src/test/rustdoc/assoc-consts.rs
index 71e7db5f4a5..cbb2a00214a 100644
--- a/src/test/rustdoc/assoc-consts.rs
+++ b/src/test/rustdoc/assoc-consts.rs
@@ -52,7 +52,7 @@ pub fn f(_: &(ToString + 'static)) {}
 
 impl Bar {
     // @has assoc_consts/struct.Bar.html '//*[@id="associatedconstant.F"]' \
-    //      "const F: fn(_: &(ToString + 'static))"
+    //      "const F: fn(_: &(dyn ToString + 'static))"
     pub const F: fn(_: &(ToString + 'static)) = f;
 }
 
diff --git a/src/test/rustdoc/inline_cross/issue-32881.rs b/src/test/rustdoc/inline_cross/issue-32881.rs
index 948061bdcbe..c55a69bcb7b 100644
--- a/src/test/rustdoc/inline_cross/issue-32881.rs
+++ b/src/test/rustdoc/inline_cross/issue-32881.rs
@@ -15,8 +15,8 @@
 extern crate rustdoc_trait_object_impl;
 
 // @has issue_32881/trait.Bar.html
-// @has - '//code' "impl<'a> Bar"
-// @has - '//code' "impl<'a> Debug for Bar"
+// @has - '//code' "impl<'a> dyn Bar"
+// @has - '//code' "impl<'a> Debug for dyn Bar"
 
 pub use rustdoc_trait_object_impl::Bar;
 
diff --git a/src/test/rustdoc/test-parens.rs b/src/test/rustdoc/test-parens.rs
index 792dc9c218d..0c9452fa1e1 100644
--- a/src/test/rustdoc/test-parens.rs
+++ b/src/test/rustdoc/test-parens.rs
@@ -11,5 +11,5 @@
 #![crate_name = "foo"]
 
 // @has foo/fn.foo.html
-// @has - '//*[@class="rust fn"]' "_: &(ToString + 'static)"
+// @has - '//*[@class="rust fn"]' "_: &(dyn ToString + 'static)"
 pub fn foo(_: &(ToString + 'static)) {}
diff --git a/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.rs b/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.rs
new file mode 100644
index 00000000000..0749900986d
--- /dev/null
+++ b/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.rs
@@ -0,0 +1,22 @@
+#![feature(nll)]
+
+#![allow(dead_code)]
+
+#[derive(Debug)]
+struct Value;
+impl Value {
+    fn as_array(&self) -> Option<&Vec<Value>> {
+        None
+    }
+}
+
+fn foo(val: Value) {
+    let _reviewers_original: Vec<Value> = match val.as_array() {
+        Some(array) => {
+            *array
+        }
+        None => vec![]
+    };
+}
+
+fn main() { }
diff --git a/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr b/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr
new file mode 100644
index 00000000000..6a12016b2a5
--- /dev/null
+++ b/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr
@@ -0,0 +1,12 @@
+error[E0507]: cannot move out of borrowed content
+  --> $DIR/issue-54597-reject-move-out-of-borrow-via-pat.rs:16:13
+   |
+LL |             *array
+   |             ^^^^^^
+   |             |
+   |             cannot move out of borrowed content
+   |             help: consider removing the `*`: `array`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0507`.
diff --git a/src/test/ui/impl-trait/auxiliary/extra-item.rs b/src/test/ui/impl-trait/auxiliary/extra-item.rs
new file mode 100644
index 00000000000..8eaeafa5207
--- /dev/null
+++ b/src/test/ui/impl-trait/auxiliary/extra-item.rs
@@ -0,0 +1 @@
+pub trait MyTrait {}
diff --git a/src/test/ui/impl-trait/extra-item.rs b/src/test/ui/impl-trait/extra-item.rs
new file mode 100644
index 00000000000..d82237ccecc
--- /dev/null
+++ b/src/test/ui/impl-trait/extra-item.rs
@@ -0,0 +1,10 @@
+// aux-build:extra-item.rs
+// compile-flags:--extern extra_item
+
+struct S;
+
+impl extra_item::MyTrait for S {
+    fn extra() {} //~ ERROR method `extra` is not a member of trait `extra_item::MyTrait`
+}
+
+fn main() {}
diff --git a/src/test/ui/impl-trait/extra-item.stderr b/src/test/ui/impl-trait/extra-item.stderr
new file mode 100644
index 00000000000..de3c7ba5d31
--- /dev/null
+++ b/src/test/ui/impl-trait/extra-item.stderr
@@ -0,0 +1,9 @@
+error[E0407]: method `extra` is not a member of trait `extra_item::MyTrait`
+  --> $DIR/extra-item.rs:7:5
+   |
+LL |     fn extra() {} //~ ERROR method `extra` is not a member of trait `extra_item::MyTrait`
+   |     ^^^^^^^^^^^^^ not a member of trait `extra_item::MyTrait`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0407`.
diff --git a/src/test/ui/issues/issue-34229.rs b/src/test/ui/issues/issue-34229.rs
new file mode 100644
index 00000000000..bcdfcc767fb
--- /dev/null
+++ b/src/test/ui/issues/issue-34229.rs
@@ -0,0 +1,4 @@
+#[derive(PartialEq)] struct Comparable;
+#[derive(PartialEq, PartialOrd)] struct Nope(Comparable);
+
+fn main() {}
diff --git a/src/test/ui/issues/issue-34229.stderr b/src/test/ui/issues/issue-34229.stderr
new file mode 100644
index 00000000000..c57f80cd409
--- /dev/null
+++ b/src/test/ui/issues/issue-34229.stderr
@@ -0,0 +1,12 @@
+error[E0277]: can't compare `Comparable` with `Comparable`
+  --> $DIR/issue-34229.rs:2:46
+   |
+LL | #[derive(PartialEq, PartialOrd)] struct Nope(Comparable);
+   |                                              ^^^^^^^^^^ no implementation for `Comparable < Comparable` and `Comparable > Comparable`
+   |
+   = help: the trait `std::cmp::PartialOrd` is not implemented for `Comparable`
+   = note: required by `std::cmp::PartialOrd::partial_cmp`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.