about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-03-22 16:58:57 +0000
committerbors <bors@rust-lang.org>2018-03-22 16:58:57 +0000
commit5092c6b01acbff60935a5e6d84f83b6c73c1ca5e (patch)
treebdc8568384c95b430e9bb324b82a876d98b1f56a /src/test
parentb176285ba775f86301040fc624acb96b4499f562 (diff)
parent2c6f911463efa6c2d87e5566fc1cd77a7d26509a (diff)
downloadrust-5092c6b01acbff60935a5e6d84f83b6c73c1ca5e.tar.gz
rust-5092c6b01acbff60935a5e6d84f83b6c73c1ca5e.zip
Auto merge of #49264 - kennytm:rollup, r=kennytm
Rollup of 23 pull requests

- Successful merges: #48374, #48596, #48759, #48939, #49029, #49069, #49093, #49109, #49117, #49140, #49158, #49188, #49189, #49209, #49211, #49216, #49225, #49231, #49234, #49242, #49244, #49105, #49038
- Failed merges:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/codegen/abi-main-signature-16bit-c-int.rs1
-rw-r--r--src/test/codegen/fastcall-inreg.rs2
-rw-r--r--src/test/codegen/global_asm.rs2
-rw-r--r--src/test/codegen/global_asm_include.rs2
-rw-r--r--src/test/codegen/global_asm_x2.rs2
-rw-r--r--src/test/codegen/repr-transparent-aggregates-1.rs1
-rw-r--r--src/test/run-make/tools.mk2
-rw-r--r--src/test/run-pass/issue-10683.rs2
-rw-r--r--src/test/run-pass/issue-27889.rs1
-rw-r--r--src/test/run-pass/issue-28561.rs2
-rw-r--r--src/test/rustdoc/check-styled-link.rs18
-rw-r--r--src/test/rustdoc/doc-cfg.rs24
-rw-r--r--src/test/ui/chalkify/lower_trait.rs22
-rw-r--r--src/test/ui/chalkify/lower_trait.stderr8
-rw-r--r--src/test/ui/type-dependent-def-issue-49241.rs15
-rw-r--r--src/test/ui/type-dependent-def-issue-49241.stderr18
16 files changed, 117 insertions, 5 deletions
diff --git a/src/test/codegen/abi-main-signature-16bit-c-int.rs b/src/test/codegen/abi-main-signature-16bit-c-int.rs
index 707531bf376..367d509cadf 100644
--- a/src/test/codegen/abi-main-signature-16bit-c-int.rs
+++ b/src/test/codegen/abi-main-signature-16bit-c-int.rs
@@ -19,6 +19,7 @@
 // ignore-mips
 // ignore-mips64
 // ignore-powerpc
+// ignore-powerpc64
 // ignore-s390x
 // ignore-sparc
 // ignore-wasm32
diff --git a/src/test/codegen/fastcall-inreg.rs b/src/test/codegen/fastcall-inreg.rs
index 9bfe47d0a1f..d6dd3f356b5 100644
--- a/src/test/codegen/fastcall-inreg.rs
+++ b/src/test/codegen/fastcall-inreg.rs
@@ -23,6 +23,8 @@
 // ignore-mips
 // ignore-mips64
 // ignore-msp430
+// ignore-powerpc64
+// ignore-powerpc64le
 // ignore-powerpc
 // ignore-r600
 // ignore-amdgcn
diff --git a/src/test/codegen/global_asm.rs b/src/test/codegen/global_asm.rs
index 94b69a6cab5..6b79e79fa00 100644
--- a/src/test/codegen/global_asm.rs
+++ b/src/test/codegen/global_asm.rs
@@ -19,6 +19,8 @@
 // ignore-mips
 // ignore-mips64
 // ignore-msp430
+// ignore-powerpc64
+// ignore-powerpc64le
 // ignore-powerpc
 // ignore-r600
 // ignore-amdgcn
diff --git a/src/test/codegen/global_asm_include.rs b/src/test/codegen/global_asm_include.rs
index c3688077f22..3f73a1cabbf 100644
--- a/src/test/codegen/global_asm_include.rs
+++ b/src/test/codegen/global_asm_include.rs
@@ -19,6 +19,8 @@
 // ignore-mips
 // ignore-mips64
 // ignore-msp430
+// ignore-powerpc64
+// ignore-powerpc64le
 // ignore-powerpc
 // ignore-r600
 // ignore-amdgcn
diff --git a/src/test/codegen/global_asm_x2.rs b/src/test/codegen/global_asm_x2.rs
index 3b8fe43fa04..3e118a50d45 100644
--- a/src/test/codegen/global_asm_x2.rs
+++ b/src/test/codegen/global_asm_x2.rs
@@ -19,6 +19,8 @@
 // ignore-mips
 // ignore-mips64
 // ignore-msp430
+// ignore-powerpc64
+// ignore-powerpc64le
 // ignore-powerpc
 // ignore-r600
 // ignore-amdgcn
diff --git a/src/test/codegen/repr-transparent-aggregates-1.rs b/src/test/codegen/repr-transparent-aggregates-1.rs
index 655e67cf7ee..2eeed2b788c 100644
--- a/src/test/codegen/repr-transparent-aggregates-1.rs
+++ b/src/test/codegen/repr-transparent-aggregates-1.rs
@@ -14,6 +14,7 @@
 // ignore-mips
 // ignore-mips64
 // ignore-powerpc
+// ignore-powerpc64
 // See repr-transparent.rs
 
 #![crate_type="lib"]
diff --git a/src/test/run-make/tools.mk b/src/test/run-make/tools.mk
index d9103e19927..af1707de6c0 100644
--- a/src/test/run-make/tools.mk
+++ b/src/test/run-make/tools.mk
@@ -9,7 +9,7 @@ RUSTC_ORIGINAL := $(RUSTC)
 BARE_RUSTC := $(HOST_RPATH_ENV) '$(RUSTC)'
 BARE_RUSTDOC := $(HOST_RPATH_ENV) '$(RUSTDOC)'
 RUSTC := $(BARE_RUSTC) --out-dir $(TMPDIR) -L $(TMPDIR) $(RUSTFLAGS)
-RUSTDOC := $(BARE_RUSTDOC)
+RUSTDOC := $(BARE_RUSTDOC) -L $(TARGET_RPATH_DIR)
 ifdef RUSTC_LINKER
 RUSTC := $(RUSTC) -Clinker=$(RUSTC_LINKER)
 RUSTDOC := $(RUSTDOC) --linker $(RUSTC_LINKER) -Z unstable-options
diff --git a/src/test/run-pass/issue-10683.rs b/src/test/run-pass/issue-10683.rs
index eb2177202a2..d3ba477fa57 100644
--- a/src/test/run-pass/issue-10683.rs
+++ b/src/test/run-pass/issue-10683.rs
@@ -10,8 +10,6 @@
 
 // pretty-expanded FIXME #23616
 
-use std::ascii::AsciiExt;
-
 static NAME: &'static str = "hello world";
 
 fn main() {
diff --git a/src/test/run-pass/issue-27889.rs b/src/test/run-pass/issue-27889.rs
index 3f7d0400c88..29a5f6dd24b 100644
--- a/src/test/run-pass/issue-27889.rs
+++ b/src/test/run-pass/issue-27889.rs
@@ -10,7 +10,6 @@
 
 // Test that a field can have the same name in different variants
 // of an enum
-// FIXME #27889
 
 pub enum Foo {
     X { foo: u32 },
diff --git a/src/test/run-pass/issue-28561.rs b/src/test/run-pass/issue-28561.rs
index 8c73830f4d7..e21e487fedd 100644
--- a/src/test/run-pass/issue-28561.rs
+++ b/src/test/run-pass/issue-28561.rs
@@ -45,7 +45,7 @@ struct Array<T> {
     f32: [T; 32],
 }
 
-// FIXME(#7622): merge with `Array` once `[T; N]: Clone` where `T: Clone`
+// FIXME(#44580): merge with `Array` once `[T; N]: Clone` where `T: Clone`
 #[derive(Clone, Copy)]
 struct CopyArray<T: Copy> {
     f00: [T; 00],
diff --git a/src/test/rustdoc/check-styled-link.rs b/src/test/rustdoc/check-styled-link.rs
new file mode 100644
index 00000000000..1633711e83d
--- /dev/null
+++ b/src/test/rustdoc/check-styled-link.rs
@@ -0,0 +1,18 @@
+// 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.
+
+#![crate_name = "foo"]
+
+pub struct Foo;
+
+// @has foo/struct.Bar.html '//a[@href="../foo/struct.Foo.html"]' 'Foo'
+
+/// Code-styled reference to [`Foo`].
+pub struct Bar;
diff --git a/src/test/rustdoc/doc-cfg.rs b/src/test/rustdoc/doc-cfg.rs
index 8499e5c741e..ea8a13b034b 100644
--- a/src/test/rustdoc/doc-cfg.rs
+++ b/src/test/rustdoc/doc-cfg.rs
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 #![feature(doc_cfg)]
+#![feature(target_feature, cfg_target_feature)]
 
 // @has doc_cfg/struct.Portable.html
 // @!has - '//*[@id="main"]/*[@class="stability"]/*[@class="stab portability"]' ''
@@ -45,3 +46,26 @@ pub mod unix_only {
         fn unix_and_arm_only_function() {}
     }
 }
+
+// tagging a function with `#[target_feature]` creates a doc(cfg(target_feature)) node for that
+// item as well
+
+// the portability header is different on the module view versus the full view
+// @has doc_cfg/index.html
+// @matches - '//*[@class=" module-item"]//*[@class="stab portability"]' '\Aavx\Z'
+
+// @has doc_cfg/fn.uses_target_feature.html
+// @has - '//*[@id="main"]/*[@class="stability"]/*[@class="stab portability"]' \
+//        'This is supported with target feature avx only.'
+#[target_feature(enable = "avx")]
+pub unsafe fn uses_target_feature() {
+    content::should::be::irrelevant();
+}
+
+// @has doc_cfg/fn.uses_cfg_target_feature.html
+// @has - '//*[@id="main"]/*[@class="stability"]/*[@class="stab portability"]' \
+//        'This is supported with target feature avx only.'
+#[doc(cfg(target_feature = "avx"))]
+pub fn uses_cfg_target_feature() {
+    uses_target_feature();
+}
diff --git a/src/test/ui/chalkify/lower_trait.rs b/src/test/ui/chalkify/lower_trait.rs
new file mode 100644
index 00000000000..010cb77edc3
--- /dev/null
+++ b/src/test/ui/chalkify/lower_trait.rs
@@ -0,0 +1,22 @@
+// 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.
+
+#![feature(rustc_attrs)]
+
+#[rustc_dump_program_clauses] //~ ERROR Implemented(Self: Foo<S, T, U>) :-
+trait Foo<S, T, U> {
+    fn s(S) -> S;
+    fn t(T) -> T;
+    fn u(U) -> U;
+}
+
+fn main() {
+    println!("hello");
+}
diff --git a/src/test/ui/chalkify/lower_trait.stderr b/src/test/ui/chalkify/lower_trait.stderr
new file mode 100644
index 00000000000..6da1e2fd8ed
--- /dev/null
+++ b/src/test/ui/chalkify/lower_trait.stderr
@@ -0,0 +1,8 @@
+error: Implemented(Self: Foo<S, T, U>) :- FromEnv(Self: Foo<S, T, U>).
+  --> $DIR/lower_trait.rs:13:1
+   |
+LL | #[rustc_dump_program_clauses] //~ ERROR Implemented(Self: Foo<S, T, U>) :-
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/type-dependent-def-issue-49241.rs b/src/test/ui/type-dependent-def-issue-49241.rs
new file mode 100644
index 00000000000..64264999fd2
--- /dev/null
+++ b/src/test/ui/type-dependent-def-issue-49241.rs
@@ -0,0 +1,15 @@
+// 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.
+
+fn main() {
+    let v = vec![0];
+    const l: usize = v.count(); //~ ERROR can't capture dynamic environment in a fn item
+    let s: [u32; l] = v.into_iter().collect(); //~ ERROR constant evaluation error
+}
diff --git a/src/test/ui/type-dependent-def-issue-49241.stderr b/src/test/ui/type-dependent-def-issue-49241.stderr
new file mode 100644
index 00000000000..f00edccae5d
--- /dev/null
+++ b/src/test/ui/type-dependent-def-issue-49241.stderr
@@ -0,0 +1,18 @@
+error[E0434]: can't capture dynamic environment in a fn item
+  --> $DIR/type-dependent-def-issue-49241.rs:13:22
+   |
+LL |     const l: usize = v.count(); //~ ERROR can't capture dynamic environment in a fn item
+   |                      ^
+   |
+   = help: use the `|| { ... }` closure form instead
+
+error[E0080]: constant evaluation error
+  --> $DIR/type-dependent-def-issue-49241.rs:14:18
+   |
+LL |     let s: [u32; l] = v.into_iter().collect(); //~ ERROR constant evaluation error
+   |                  ^ encountered constants with type errors, stopping evaluation
+
+error: aborting due to 2 previous errors
+
+Some errors occurred: E0080, E0434.
+For more information about an error, try `rustc --explain E0080`.