about summary refs log tree commit diff
path: root/src/test/ui/codemap_tests
diff options
context:
space:
mode:
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2017-11-20 13:13:27 +0100
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2017-11-24 11:32:35 +0100
commit8937d6a6cfb011d9e1fe6b4a426913dbbf9fd584 (patch)
tree985b86728dbbcb631149b9f77ba18d435f60f798 /src/test/ui/codemap_tests
parent36066d8925940cdd423886a2eec2a096363f5bb8 (diff)
downloadrust-8937d6a6cfb011d9e1fe6b4a426913dbbf9fd584.tar.gz
rust-8937d6a6cfb011d9e1fe6b4a426913dbbf9fd584.zip
Merge cfail and ui tests into ui tests
Diffstat (limited to 'src/test/ui/codemap_tests')
-rw-r--r--src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.rs2
-rw-r--r--src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr2
-rw-r--r--src/test/ui/codemap_tests/empty_span.rs2
-rw-r--r--src/test/ui/codemap_tests/empty_span.stderr2
-rw-r--r--src/test/ui/codemap_tests/huge_multispan_highlight.rs2
-rw-r--r--src/test/ui/codemap_tests/huge_multispan_highlight.stderr2
-rw-r--r--src/test/ui/codemap_tests/issue-11715.rs2
-rw-r--r--src/test/ui/codemap_tests/issue-11715.stderr2
-rw-r--r--src/test/ui/codemap_tests/one_line.rs2
-rw-r--r--src/test/ui/codemap_tests/one_line.stderr2
-rw-r--r--src/test/ui/codemap_tests/overlapping_inherent_impls.rs6
-rw-r--r--src/test/ui/codemap_tests/overlapping_inherent_impls.stderr6
-rw-r--r--src/test/ui/codemap_tests/overlapping_spans.rs2
-rw-r--r--src/test/ui/codemap_tests/overlapping_spans.stderr2
-rw-r--r--src/test/ui/codemap_tests/tab.rs4
-rw-r--r--src/test/ui/codemap_tests/tab.stderr4
-rw-r--r--src/test/ui/codemap_tests/tab_2.rs2
-rw-r--r--src/test/ui/codemap_tests/tab_2.stderr2
-rw-r--r--src/test/ui/codemap_tests/tab_3.rs2
-rw-r--r--src/test/ui/codemap_tests/tab_3.stderr2
-rw-r--r--src/test/ui/codemap_tests/two_files.rs2
-rw-r--r--src/test/ui/codemap_tests/two_files.stderr2
-rw-r--r--src/test/ui/codemap_tests/unicode.rs2
-rw-r--r--src/test/ui/codemap_tests/unicode.stderr2
-rw-r--r--src/test/ui/codemap_tests/unicode_2.rs6
-rw-r--r--src/test/ui/codemap_tests/unicode_2.stderr6
26 files changed, 36 insertions, 36 deletions
diff --git a/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.rs b/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.rs
index a72ad0351e3..532d173011d 100644
--- a/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.rs
+++ b/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.rs
@@ -11,6 +11,6 @@
 #![allow(dead_code)]
 
 trait C {}
-impl C { fn f() {} }
+impl C { fn f() {} } //~ ERROR duplicate
 impl C { fn f() {} }
 fn main() { }
diff --git a/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr b/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr
index 7f1ab929c6f..a7d52301476 100644
--- a/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr
+++ b/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr
@@ -1,7 +1,7 @@
 error[E0592]: duplicate definitions with name `f`
   --> $DIR/coherence-overlapping-inherent-impl-trait.rs:14:10
    |
-14 | impl C { fn f() {} }
+14 | impl C { fn f() {} } //~ ERROR duplicate
    |          ^^^^^^^^^ duplicate definitions for `f`
 15 | impl C { fn f() {} }
    |          --------- other definition for `f`
diff --git a/src/test/ui/codemap_tests/empty_span.rs b/src/test/ui/codemap_tests/empty_span.rs
index 2cf3b66dd77..8e0395e3c50 100644
--- a/src/test/ui/codemap_tests/empty_span.rs
+++ b/src/test/ui/codemap_tests/empty_span.rs
@@ -14,5 +14,5 @@ fn main() {
 
     impl !Sync for Foo {}
 
-    unsafe impl Send for &'static Foo { }
+    unsafe impl Send for &'static Foo { } //~ ERROR cross-crate traits with a default impl
 }
diff --git a/src/test/ui/codemap_tests/empty_span.stderr b/src/test/ui/codemap_tests/empty_span.stderr
index b33dee6b4a4..3474803b00d 100644
--- a/src/test/ui/codemap_tests/empty_span.stderr
+++ b/src/test/ui/codemap_tests/empty_span.stderr
@@ -1,7 +1,7 @@
 error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static main::Foo`
   --> $DIR/empty_span.rs:17:5
    |
-17 |     unsafe impl Send for &'static Foo { }
+17 |     unsafe impl Send for &'static Foo { } //~ ERROR cross-crate traits with a default impl
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
diff --git a/src/test/ui/codemap_tests/huge_multispan_highlight.rs b/src/test/ui/codemap_tests/huge_multispan_highlight.rs
index 5a058d48391..cf593eab853 100644
--- a/src/test/ui/codemap_tests/huge_multispan_highlight.rs
+++ b/src/test/ui/codemap_tests/huge_multispan_highlight.rs
@@ -97,5 +97,5 @@ fn main() {
 
 
 
-    let y = &mut x;
+    let y = &mut x; //~ ERROR cannot borrow
 }
diff --git a/src/test/ui/codemap_tests/huge_multispan_highlight.stderr b/src/test/ui/codemap_tests/huge_multispan_highlight.stderr
index 914db98c784..bc333bde93c 100644
--- a/src/test/ui/codemap_tests/huge_multispan_highlight.stderr
+++ b/src/test/ui/codemap_tests/huge_multispan_highlight.stderr
@@ -4,7 +4,7 @@ error[E0596]: cannot borrow immutable local variable `x` as mutable
 12  |     let x = "foo";
     |         - consider changing this to `mut x`
 ...
-100 |     let y = &mut x;
+100 |     let y = &mut x; //~ ERROR cannot borrow
     |                  ^ cannot borrow mutably
 
 error: aborting due to previous error
diff --git a/src/test/ui/codemap_tests/issue-11715.rs b/src/test/ui/codemap_tests/issue-11715.rs
index ba1ce6abcd3..75581d38927 100644
--- a/src/test/ui/codemap_tests/issue-11715.rs
+++ b/src/test/ui/codemap_tests/issue-11715.rs
@@ -97,5 +97,5 @@
 fn main() {
     let mut x = "foo";
     let y = &mut x;
-    let z = &mut x;
+    let z = &mut x; //~ ERROR cannot borrow
 }
diff --git a/src/test/ui/codemap_tests/issue-11715.stderr b/src/test/ui/codemap_tests/issue-11715.stderr
index 4947cbedd20..bd8ffba00d4 100644
--- a/src/test/ui/codemap_tests/issue-11715.stderr
+++ b/src/test/ui/codemap_tests/issue-11715.stderr
@@ -3,7 +3,7 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time
     |
 99  |     let y = &mut x;
     |                  - first mutable borrow occurs here
-100 |     let z = &mut x;
+100 |     let z = &mut x; //~ ERROR cannot borrow
     |                  ^ second mutable borrow occurs here
 101 | }
     | - first borrow ends here
diff --git a/src/test/ui/codemap_tests/one_line.rs b/src/test/ui/codemap_tests/one_line.rs
index e50091d5606..3fb35dd26ac 100644
--- a/src/test/ui/codemap_tests/one_line.rs
+++ b/src/test/ui/codemap_tests/one_line.rs
@@ -10,5 +10,5 @@
 
 fn main() {
     let mut v = vec![Some("foo"), Some("bar")];
-    v.push(v.pop().unwrap());
+    v.push(v.pop().unwrap()); //~ ERROR cannot borrow
 }
diff --git a/src/test/ui/codemap_tests/one_line.stderr b/src/test/ui/codemap_tests/one_line.stderr
index a73575a8d57..cfe3d527136 100644
--- a/src/test/ui/codemap_tests/one_line.stderr
+++ b/src/test/ui/codemap_tests/one_line.stderr
@@ -1,7 +1,7 @@
 error[E0499]: cannot borrow `v` as mutable more than once at a time
   --> $DIR/one_line.rs:13:12
    |
-13 |     v.push(v.pop().unwrap());
+13 |     v.push(v.pop().unwrap()); //~ ERROR cannot borrow
    |     -      ^               - first borrow ends here
    |     |      |
    |     |      second mutable borrow occurs here
diff --git a/src/test/ui/codemap_tests/overlapping_inherent_impls.rs b/src/test/ui/codemap_tests/overlapping_inherent_impls.rs
index a626b63b31b..18e77ddfd2c 100644
--- a/src/test/ui/codemap_tests/overlapping_inherent_impls.rs
+++ b/src/test/ui/codemap_tests/overlapping_inherent_impls.rs
@@ -16,7 +16,7 @@
 struct Foo;
 
 impl Foo {
-    fn id() {}
+    fn id() {} //~ ERROR duplicate definitions
 }
 
 impl Foo {
@@ -26,7 +26,7 @@ impl Foo {
 struct Bar<T>(T);
 
 impl<T> Bar<T> {
-    fn bar(&self) {}
+    fn bar(&self) {} //~ ERROR duplicate definitions
 }
 
 impl Bar<u32> {
@@ -36,7 +36,7 @@ impl Bar<u32> {
 struct Baz<T>(T);
 
 impl<T: Copy> Baz<T> {
-    fn baz(&self) {}
+    fn baz(&self) {} //~ ERROR duplicate definitions
 }
 
 impl<T> Baz<Vec<T>> {
diff --git a/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr b/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr
index eaf42cde22f..0ccdd207651 100644
--- a/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr
+++ b/src/test/ui/codemap_tests/overlapping_inherent_impls.stderr
@@ -1,7 +1,7 @@
 error[E0592]: duplicate definitions with name `id`
   --> $DIR/overlapping_inherent_impls.rs:19:5
    |
-19 |     fn id() {}
+19 |     fn id() {} //~ ERROR duplicate definitions
    |     ^^^^^^^^^^ duplicate definitions for `id`
 ...
 23 |     fn id() {}
@@ -10,7 +10,7 @@ error[E0592]: duplicate definitions with name `id`
 error[E0592]: duplicate definitions with name `bar`
   --> $DIR/overlapping_inherent_impls.rs:29:5
    |
-29 |     fn bar(&self) {}
+29 |     fn bar(&self) {} //~ ERROR duplicate definitions
    |     ^^^^^^^^^^^^^^^^ duplicate definitions for `bar`
 ...
 33 |     fn bar(&self) {}
@@ -19,7 +19,7 @@ error[E0592]: duplicate definitions with name `bar`
 error[E0592]: duplicate definitions with name `baz`
   --> $DIR/overlapping_inherent_impls.rs:39:5
    |
-39 |     fn baz(&self) {}
+39 |     fn baz(&self) {} //~ ERROR duplicate definitions
    |     ^^^^^^^^^^^^^^^^ duplicate definitions for `baz`
 ...
 43 |     fn baz(&self) {}
diff --git a/src/test/ui/codemap_tests/overlapping_spans.rs b/src/test/ui/codemap_tests/overlapping_spans.rs
index 7c1f0db16dd..467e90bd5a5 100644
--- a/src/test/ui/codemap_tests/overlapping_spans.rs
+++ b/src/test/ui/codemap_tests/overlapping_spans.rs
@@ -18,6 +18,6 @@ impl Drop for S {
 
 fn main() {
     match (S {f:"foo".to_string()}) {
-        S {f:_s} => {}
+        S {f:_s} => {} //~ ERROR cannot move out
     }
 }
diff --git a/src/test/ui/codemap_tests/overlapping_spans.stderr b/src/test/ui/codemap_tests/overlapping_spans.stderr
index d32b18d6703..dc801b20dfb 100644
--- a/src/test/ui/codemap_tests/overlapping_spans.stderr
+++ b/src/test/ui/codemap_tests/overlapping_spans.stderr
@@ -1,7 +1,7 @@
 error[E0509]: cannot move out of type `S`, which implements the `Drop` trait
   --> $DIR/overlapping_spans.rs:21:9
    |
-21 |         S {f:_s} => {}
+21 |         S {f:_s} => {} //~ ERROR cannot move out
    |         ^^^^^--^
    |         |    |
    |         |    hint: to prevent move, use `ref _s` or `ref mut _s`
diff --git a/src/test/ui/codemap_tests/tab.rs b/src/test/ui/codemap_tests/tab.rs
index 146ad2283c2..b8dedb0daf5 100644
--- a/src/test/ui/codemap_tests/tab.rs
+++ b/src/test/ui/codemap_tests/tab.rs
@@ -11,9 +11,9 @@
 // ignore-tidy-tab
 
 fn main() {
-	bar;
+	bar; //~ ERROR cannot find value `bar`
 }
 
 fn foo() {
-	"bar			boo"
+	"bar			boo" //~ ERROR mismatched types
 }
diff --git a/src/test/ui/codemap_tests/tab.stderr b/src/test/ui/codemap_tests/tab.stderr
index b3fa9b128c5..41ab60f017f 100644
--- a/src/test/ui/codemap_tests/tab.stderr
+++ b/src/test/ui/codemap_tests/tab.stderr
@@ -1,7 +1,7 @@
 error[E0425]: cannot find value `bar` in this scope
   --> $DIR/tab.rs:14:2
    |
-14 |  bar;
+14 |  bar; //~ ERROR cannot find value `bar`
    |  ^^^ not found in this scope
 
 error[E0308]: mismatched types
@@ -9,7 +9,7 @@ error[E0308]: mismatched types
    |
 17 | fn foo() {
    |          - help: try adding a return type: `-> &'static str `
-18 |  "bar   boo"
+18 |  "bar   boo" //~ ERROR mismatched types
    |  ^^^^^^^^^^^ expected (), found reference
    |
    = note: expected type `()`
diff --git a/src/test/ui/codemap_tests/tab_2.rs b/src/test/ui/codemap_tests/tab_2.rs
index d26d7974d85..b759a4abcae 100644
--- a/src/test/ui/codemap_tests/tab_2.rs
+++ b/src/test/ui/codemap_tests/tab_2.rs
@@ -11,5 +11,5 @@
 // ignore-tidy-tab
 
 fn main() {
-				""";
+				"""; //~ ERROR unterminated double quote
 }
diff --git a/src/test/ui/codemap_tests/tab_2.stderr b/src/test/ui/codemap_tests/tab_2.stderr
index a2b3ca7e4d4..7f6b55e7eb8 100644
--- a/src/test/ui/codemap_tests/tab_2.stderr
+++ b/src/test/ui/codemap_tests/tab_2.stderr
@@ -1,7 +1,7 @@
 error: unterminated double quote string
   --> $DIR/tab_2.rs:14:7
    |
-14 |       """;
+14 |       """; //~ ERROR unterminated double quote
    |  _______^
 15 | | }
    | |__^
diff --git a/src/test/ui/codemap_tests/tab_3.rs b/src/test/ui/codemap_tests/tab_3.rs
index 9b3513d5116..ea235ed71a9 100644
--- a/src/test/ui/codemap_tests/tab_3.rs
+++ b/src/test/ui/codemap_tests/tab_3.rs
@@ -14,6 +14,6 @@ fn main() {
 	let some_vec = vec!["hi"];
 	some_vec.into_iter();
 	{
-		println!("{:?}", some_vec);
+		println!("{:?}", some_vec); //~ ERROR use of moved
 	}
 }
diff --git a/src/test/ui/codemap_tests/tab_3.stderr b/src/test/ui/codemap_tests/tab_3.stderr
index f19f5f20d23..278e590a36d 100644
--- a/src/test/ui/codemap_tests/tab_3.stderr
+++ b/src/test/ui/codemap_tests/tab_3.stderr
@@ -4,7 +4,7 @@ error[E0382]: use of moved value: `some_vec`
 15 |  some_vec.into_iter();
    |  -------- value moved here
 16 |  {
-17 |   println!("{:?}", some_vec);
+17 |   println!("{:?}", some_vec); //~ ERROR use of moved
    |                    ^^^^^^^^ value used here after move
    |
    = note: move occurs because `some_vec` has type `std::vec::Vec<&str>`, which does not implement the `Copy` trait
diff --git a/src/test/ui/codemap_tests/two_files.rs b/src/test/ui/codemap_tests/two_files.rs
index fe5eba93b23..4c99ee67598 100644
--- a/src/test/ui/codemap_tests/two_files.rs
+++ b/src/test/ui/codemap_tests/two_files.rs
@@ -12,6 +12,6 @@ include!("two_files_data.rs");
 
 struct Baz { }
 
-impl Bar for Baz { }
+impl Bar for Baz { } //~ ERROR expected trait, found type alias
 
 fn main() { }
diff --git a/src/test/ui/codemap_tests/two_files.stderr b/src/test/ui/codemap_tests/two_files.stderr
index 9db43dde1ac..c0cfeef194d 100644
--- a/src/test/ui/codemap_tests/two_files.stderr
+++ b/src/test/ui/codemap_tests/two_files.stderr
@@ -1,7 +1,7 @@
 error[E0404]: expected trait, found type alias `Bar`
   --> $DIR/two_files.rs:15:6
    |
-15 | impl Bar for Baz { }
+15 | impl Bar for Baz { } //~ ERROR expected trait, found type alias
    |      ^^^ type aliases cannot be used for traits
 
 error: cannot continue compilation due to previous error
diff --git a/src/test/ui/codemap_tests/unicode.rs b/src/test/ui/codemap_tests/unicode.rs
index b206722d4f3..ac22906a623 100644
--- a/src/test/ui/codemap_tests/unicode.rs
+++ b/src/test/ui/codemap_tests/unicode.rs
@@ -8,6 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-extern "路濫狼á́́" fn foo() {}
+extern "路濫狼á́́" fn foo() {} //~ ERROR invalid ABI
 
 fn main() { }
diff --git a/src/test/ui/codemap_tests/unicode.stderr b/src/test/ui/codemap_tests/unicode.stderr
index 02a9d7ee0ef..4f3c79410df 100644
--- a/src/test/ui/codemap_tests/unicode.stderr
+++ b/src/test/ui/codemap_tests/unicode.stderr
@@ -1,7 +1,7 @@
 error: invalid ABI: expected one of [cdecl, stdcall, fastcall, vectorcall, thiscall, aapcs, win64, sysv64, ptx-kernel, msp430-interrupt, x86-interrupt, Rust, C, system, rust-intrinsic, rust-call, platform-intrinsic, unadjusted], found `路濫狼á́́`
   --> $DIR/unicode.rs:11:8
    |
-11 | extern "路濫狼á́́" fn foo() {}
+11 | extern "路濫狼á́́" fn foo() {} //~ ERROR invalid ABI
    |        ^^^^^^^^^
 
 error: aborting due to previous error
diff --git a/src/test/ui/codemap_tests/unicode_2.rs b/src/test/ui/codemap_tests/unicode_2.rs
index cc3eae90f90..c01b0b286af 100644
--- a/src/test/ui/codemap_tests/unicode_2.rs
+++ b/src/test/ui/codemap_tests/unicode_2.rs
@@ -11,7 +11,7 @@
 #![feature(non_ascii_idents)]
 
 fn main() {
-    let _ = ("a̐éö̲", 0u7);
-    let _ = ("아あ", 1i42);
-    let _ = a̐é;
+    let _ = ("a̐éö̲", 0u7); //~ ERROR invalid width
+    let _ = ("아あ", 1i42); //~ ERROR invalid width
+    let _ = a̐é; //~ ERROR cannot find
 }
diff --git a/src/test/ui/codemap_tests/unicode_2.stderr b/src/test/ui/codemap_tests/unicode_2.stderr
index 6cfa66730a2..9ffd08ca06f 100644
--- a/src/test/ui/codemap_tests/unicode_2.stderr
+++ b/src/test/ui/codemap_tests/unicode_2.stderr
@@ -1,7 +1,7 @@
 error: invalid width `7` for integer literal
   --> $DIR/unicode_2.rs:14:25
    |
-14 |     let _ = ("a̐éö̲", 0u7);
+14 |     let _ = ("a̐éö̲", 0u7); //~ ERROR invalid width
    |                     ^^^
    |
    = help: valid widths are 8, 16, 32, 64 and 128
@@ -9,7 +9,7 @@ error: invalid width `7` for integer literal
 error: invalid width `42` for integer literal
   --> $DIR/unicode_2.rs:15:20
    |
-15 |     let _ = ("아あ", 1i42);
+15 |     let _ = ("아あ", 1i42); //~ ERROR invalid width
    |                      ^^^^
    |
    = help: valid widths are 8, 16, 32, 64 and 128
@@ -17,7 +17,7 @@ error: invalid width `42` for integer literal
 error[E0425]: cannot find value `a̐é` in this scope
   --> $DIR/unicode_2.rs:16:13
    |
-16 |     let _ = a̐é;
+16 |     let _ = a̐é; //~ ERROR cannot find
    |             ^^ not found in this scope
 
 error: aborting due to 3 previous errors