about summary refs log tree commit diff
path: root/src/test/ui
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-01-03 17:00:24 +0000
committerbors <bors@rust-lang.org>2018-01-03 17:00:24 +0000
commitd96cc6e2865ff2cc77f061ae97e58aae50f5a1e9 (patch)
tree7b82c1383f43ed10226029582841835212f24f22 /src/test/ui
parent8d1a30289ea13c433a92e31627f8533350835328 (diff)
parent3ca407e24bcc2b668de1f56e453903701849f79f (diff)
downloadrust-d96cc6e2865ff2cc77f061ae97e58aae50f5a1e9.tar.gz
rust-d96cc6e2865ff2cc77f061ae97e58aae50f5a1e9.zip
Auto merge of #47127 - EdSchouten:cloudabi-tests, r=kennytm
First cut at getting some part of the test suite working for CloudABI

I am currently working on creating a Docker container for automated CI for CloudABI. Here are some of the trivial changes that need to land to make tests pass.
Diffstat (limited to 'src/test/ui')
-rw-r--r--src/test/ui/issue-46576.rs2
-rw-r--r--src/test/ui/issue-46576.stderr8
-rw-r--r--src/test/ui/lint/use_suggestion_json.rs1
-rw-r--r--src/test/ui/lint/use_suggestion_json.stderr116
-rw-r--r--src/test/ui/mismatched_types/recovered-block.rs2
-rw-r--r--src/test/ui/mismatched_types/recovered-block.stderr10
-rw-r--r--src/test/ui/resolve/token-error-correct-3.rs2
-rw-r--r--src/test/ui/resolve/token-error-correct-3.stderr26
-rw-r--r--src/test/ui/resolve/use_suggestion_placement.rs2
-rw-r--r--src/test/ui/resolve/use_suggestion_placement.stderr20
-rw-r--r--src/test/ui/span/issue-33884.rs2
-rw-r--r--src/test/ui/span/issue-33884.stderr4
-rw-r--r--src/test/ui/suggestions/try-operator-on-main.rs2
-rw-r--r--src/test/ui/suggestions/try-operator-on-main.stderr16
14 files changed, 113 insertions, 100 deletions
diff --git a/src/test/ui/issue-46576.rs b/src/test/ui/issue-46576.rs
index 80f15eb4cac..636a1e9a064 100644
--- a/src/test/ui/issue-46576.rs
+++ b/src/test/ui/issue-46576.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// ignore-cloudabi no std::fs support
+
 #![allow(dead_code)]
 #![deny(unused_imports)]
 
diff --git a/src/test/ui/issue-46576.stderr b/src/test/ui/issue-46576.stderr
index d73da19ebdd..e0be6b4fdc2 100644
--- a/src/test/ui/issue-46576.stderr
+++ b/src/test/ui/issue-46576.stderr
@@ -1,13 +1,13 @@
 error: unused import: `BufRead`
-  --> $DIR/issue-46576.rs:15:15
+  --> $DIR/issue-46576.rs:17:15
    |
-15 | use std::io::{BufRead, BufReader, Read};
+17 | use std::io::{BufRead, BufReader, Read};
    |               ^^^^^^^
    |
 note: lint level defined here
-  --> $DIR/issue-46576.rs:12:9
+  --> $DIR/issue-46576.rs:14:9
    |
-12 | #![deny(unused_imports)]
+14 | #![deny(unused_imports)]
    |         ^^^^^^^^^^^^^^
 
 error: aborting due to previous error
diff --git a/src/test/ui/lint/use_suggestion_json.rs b/src/test/ui/lint/use_suggestion_json.rs
index 27232c4fec4..c097a8f1342 100644
--- a/src/test/ui/lint/use_suggestion_json.rs
+++ b/src/test/ui/lint/use_suggestion_json.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// ignore-cloudabi
 // compile-flags: --error-format pretty-json -Zunstable-options
 
 // The output for humans should just highlight the whole span without showing
diff --git a/src/test/ui/lint/use_suggestion_json.stderr b/src/test/ui/lint/use_suggestion_json.stderr
index 846d7df445d..86c2ad4c0e7 100644
--- a/src/test/ui/lint/use_suggestion_json.stderr
+++ b/src/test/ui/lint/use_suggestion_json.stderr
@@ -73,10 +73,10 @@ mod foo {
   "spans": [
     {
       "file_name": "$DIR/use_suggestion_json.rs",
-      "byte_start": 888,
-      "byte_end": 892,
-      "line_start": 20,
-      "line_end": 20,
+      "byte_start": 907,
+      "byte_end": 911,
+      "line_start": 21,
+      "line_end": 21,
       "column_start": 12,
       "column_end": 16,
       "is_primary": true,
@@ -100,10 +100,10 @@ mod foo {
       "spans": [
         {
           "file_name": "$DIR/use_suggestion_json.rs",
-          "byte_start": 865,
-          "byte_end": 865,
-          "line_start": 19,
-          "line_end": 19,
+          "byte_start": 884,
+          "byte_end": 884,
+          "line_start": 20,
+          "line_end": 20,
           "column_start": 1,
           "column_end": 1,
           "is_primary": true,
@@ -122,10 +122,10 @@ mod foo {
         },
         {
           "file_name": "$DIR/use_suggestion_json.rs",
-          "byte_start": 865,
-          "byte_end": 865,
-          "line_start": 19,
-          "line_end": 19,
+          "byte_start": 884,
+          "byte_end": 884,
+          "line_start": 20,
+          "line_end": 20,
           "column_start": 1,
           "column_end": 1,
           "is_primary": true,
@@ -144,10 +144,10 @@ mod foo {
         },
         {
           "file_name": "$DIR/use_suggestion_json.rs",
-          "byte_start": 865,
-          "byte_end": 865,
-          "line_start": 19,
-          "line_end": 19,
+          "byte_start": 884,
+          "byte_end": 884,
+          "line_start": 20,
+          "line_end": 20,
           "column_start": 1,
           "column_end": 1,
           "is_primary": true,
@@ -166,10 +166,10 @@ mod foo {
         },
         {
           "file_name": "$DIR/use_suggestion_json.rs",
-          "byte_start": 865,
-          "byte_end": 865,
-          "line_start": 19,
-          "line_end": 19,
+          "byte_start": 884,
+          "byte_end": 884,
+          "line_start": 20,
+          "line_end": 20,
           "column_start": 1,
           "column_end": 1,
           "is_primary": true,
@@ -188,10 +188,10 @@ mod foo {
         },
         {
           "file_name": "$DIR/use_suggestion_json.rs",
-          "byte_start": 865,
-          "byte_end": 865,
-          "line_start": 19,
-          "line_end": 19,
+          "byte_start": 884,
+          "byte_end": 884,
+          "line_start": 20,
+          "line_end": 20,
           "column_start": 1,
           "column_end": 1,
           "is_primary": true,
@@ -210,10 +210,10 @@ mod foo {
         },
         {
           "file_name": "$DIR/use_suggestion_json.rs",
-          "byte_start": 865,
-          "byte_end": 865,
-          "line_start": 19,
-          "line_end": 19,
+          "byte_start": 884,
+          "byte_end": 884,
+          "line_start": 20,
+          "line_end": 20,
           "column_start": 1,
           "column_end": 1,
           "is_primary": true,
@@ -232,10 +232,10 @@ mod foo {
         },
         {
           "file_name": "$DIR/use_suggestion_json.rs",
-          "byte_start": 865,
-          "byte_end": 865,
-          "line_start": 19,
-          "line_end": 19,
+          "byte_start": 884,
+          "byte_end": 884,
+          "line_start": 20,
+          "line_end": 20,
           "column_start": 1,
           "column_end": 1,
           "is_primary": true,
@@ -254,10 +254,10 @@ mod foo {
         },
         {
           "file_name": "$DIR/use_suggestion_json.rs",
-          "byte_start": 865,
-          "byte_end": 865,
-          "line_start": 19,
-          "line_end": 19,
+          "byte_start": 884,
+          "byte_end": 884,
+          "line_start": 20,
+          "line_end": 20,
           "column_start": 1,
           "column_end": 1,
           "is_primary": true,
@@ -276,10 +276,10 @@ mod foo {
         },
         {
           "file_name": "$DIR/use_suggestion_json.rs",
-          "byte_start": 865,
-          "byte_end": 865,
-          "line_start": 19,
-          "line_end": 19,
+          "byte_start": 884,
+          "byte_end": 884,
+          "line_start": 20,
+          "line_end": 20,
           "column_start": 1,
           "column_end": 1,
           "is_primary": true,
@@ -298,10 +298,10 @@ mod foo {
         },
         {
           "file_name": "$DIR/use_suggestion_json.rs",
-          "byte_start": 865,
-          "byte_end": 865,
-          "line_start": 19,
-          "line_end": 19,
+          "byte_start": 884,
+          "byte_end": 884,
+          "line_start": 20,
+          "line_end": 20,
           "column_start": 1,
           "column_end": 1,
           "is_primary": true,
@@ -320,10 +320,10 @@ mod foo {
         },
         {
           "file_name": "$DIR/use_suggestion_json.rs",
-          "byte_start": 865,
-          "byte_end": 865,
-          "line_start": 19,
-          "line_end": 19,
+          "byte_start": 884,
+          "byte_end": 884,
+          "line_start": 20,
+          "line_end": 20,
           "column_start": 1,
           "column_end": 1,
           "is_primary": true,
@@ -342,10 +342,10 @@ mod foo {
         },
         {
           "file_name": "$DIR/use_suggestion_json.rs",
-          "byte_start": 865,
-          "byte_end": 865,
-          "line_start": 19,
-          "line_end": 19,
+          "byte_start": 884,
+          "byte_end": 884,
+          "line_start": 20,
+          "line_end": 20,
           "column_start": 1,
           "column_end": 1,
           "is_primary": true,
@@ -368,19 +368,19 @@ mod foo {
     }
   ],
   "rendered": "error[E0412]: cannot find type `Iter` in this scope
-  --> $DIR/use_suggestion_json.rs:20:12
+  --> $DIR/use_suggestion_json.rs:21:12
    |
-20 |     let x: Iter;
+21 |     let x: Iter;
    |            ^^^^ not found in this scope
 help: possible candidates are found in other modules, you can import them into scope
    |
-19 | use std::collections::binary_heap::Iter;
+20 | use std::collections::binary_heap::Iter;
    |
-19 | use std::collections::btree_map::Iter;
+20 | use std::collections::btree_map::Iter;
    |
-19 | use std::collections::btree_set::Iter;
+20 | use std::collections::btree_set::Iter;
    |
-19 | use std::collections::hash_map::Iter;
+20 | use std::collections::hash_map::Iter;
    |
 and 8 other candidates
 
diff --git a/src/test/ui/mismatched_types/recovered-block.rs b/src/test/ui/mismatched_types/recovered-block.rs
index f3e3579f2bc..8166254e8a6 100644
--- a/src/test/ui/mismatched_types/recovered-block.rs
+++ b/src/test/ui/mismatched_types/recovered-block.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// ignore-cloudabi no std::env support
+
 use std::env;
 
 pub struct Foo {
diff --git a/src/test/ui/mismatched_types/recovered-block.stderr b/src/test/ui/mismatched_types/recovered-block.stderr
index dcaf2812f59..23c1a5b8c24 100644
--- a/src/test/ui/mismatched_types/recovered-block.stderr
+++ b/src/test/ui/mismatched_types/recovered-block.stderr
@@ -1,17 +1,17 @@
 error: missing `struct` for struct definition
-  --> $DIR/recovered-block.rs:21:8
+  --> $DIR/recovered-block.rs:23:8
    |
-21 |     pub Foo { text }
+23 |     pub Foo { text }
    |        ^
 help: add `struct` here to parse `Foo` as a public struct
    |
-21 |     pub struct Foo { text }
+23 |     pub struct Foo { text }
    |         ^^^^^^
 
 error: expected one of `(` or `<`, found `{`
-  --> $DIR/recovered-block.rs:27:9
+  --> $DIR/recovered-block.rs:29:9
    |
-27 |     Foo { text: "".to_string() }
+29 |     Foo { text: "".to_string() }
    |         ^ expected one of `(` or `<` here
 
 error: aborting due to 2 previous errors
diff --git a/src/test/ui/resolve/token-error-correct-3.rs b/src/test/ui/resolve/token-error-correct-3.rs
index 6d216178a75..8881b965f94 100644
--- a/src/test/ui/resolve/token-error-correct-3.rs
+++ b/src/test/ui/resolve/token-error-correct-3.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// ignore-cloudabi no std::fs support
+
 // Test that we do some basic error correcton in the tokeniser (and don't spew
 // too many bogus errors).
 
diff --git a/src/test/ui/resolve/token-error-correct-3.stderr b/src/test/ui/resolve/token-error-correct-3.stderr
index f2281a24e23..33cf1d87817 100644
--- a/src/test/ui/resolve/token-error-correct-3.stderr
+++ b/src/test/ui/resolve/token-error-correct-3.stderr
@@ -1,40 +1,40 @@
 error: incorrect close delimiter: `}`
-  --> $DIR/token-error-correct-3.rs:28:9
+  --> $DIR/token-error-correct-3.rs:30:9
    |
-28 |         } else { //~ ERROR: incorrect close delimiter: `}`
+30 |         } else { //~ ERROR: incorrect close delimiter: `}`
    |         ^
    |
 note: unclosed delimiter
-  --> $DIR/token-error-correct-3.rs:22:21
+  --> $DIR/token-error-correct-3.rs:24:21
    |
-22 |             callback(path.as_ref(); //~ ERROR expected one of
+24 |             callback(path.as_ref(); //~ ERROR expected one of
    |                     ^
 
 error: expected one of `,`, `.`, `?`, or an operator, found `;`
-  --> $DIR/token-error-correct-3.rs:22:35
+  --> $DIR/token-error-correct-3.rs:24:35
    |
-22 |             callback(path.as_ref(); //~ ERROR expected one of
+24 |             callback(path.as_ref(); //~ ERROR expected one of
    |                                   ^ expected one of `,`, `.`, `?`, or an operator here
 
 error: expected one of `.`, `;`, `?`, `}`, or an operator, found `)`
-  --> $DIR/token-error-correct-3.rs:28:9
+  --> $DIR/token-error-correct-3.rs:30:9
    |
-23 |             fs::create_dir_all(path.as_ref()).map(|()| true) //~ ERROR: mismatched types
+25 |             fs::create_dir_all(path.as_ref()).map(|()| true) //~ ERROR: mismatched types
    |                                                             - expected one of `.`, `;`, `?`, `}`, or an operator here
 ...
-28 |         } else { //~ ERROR: incorrect close delimiter: `}`
+30 |         } else { //~ ERROR: incorrect close delimiter: `}`
    |         ^ unexpected token
 
 error[E0425]: cannot find function `is_directory` in this scope
-  --> $DIR/token-error-correct-3.rs:21:13
+  --> $DIR/token-error-correct-3.rs:23:13
    |
-21 |         if !is_directory(path.as_ref()) { //~ ERROR: cannot find function `is_directory`
+23 |         if !is_directory(path.as_ref()) { //~ ERROR: cannot find function `is_directory`
    |             ^^^^^^^^^^^^ not found in this scope
 
 error[E0308]: mismatched types
-  --> $DIR/token-error-correct-3.rs:23:13
+  --> $DIR/token-error-correct-3.rs:25:13
    |
-23 |             fs::create_dir_all(path.as_ref()).map(|()| true) //~ ERROR: mismatched types
+25 |             fs::create_dir_all(path.as_ref()).map(|()| true) //~ ERROR: mismatched types
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try adding a semicolon: `;`
    |             |
    |             expected (), found enum `std::result::Result`
diff --git a/src/test/ui/resolve/use_suggestion_placement.rs b/src/test/ui/resolve/use_suggestion_placement.rs
index 87f38df0442..835c42e4553 100644
--- a/src/test/ui/resolve/use_suggestion_placement.rs
+++ b/src/test/ui/resolve/use_suggestion_placement.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// ignore-cloudabi no std::path support
+
 macro_rules! y {
     () => {}
 }
diff --git a/src/test/ui/resolve/use_suggestion_placement.stderr b/src/test/ui/resolve/use_suggestion_placement.stderr
index 1cc2d06ab68..3607aa5e9ab 100644
--- a/src/test/ui/resolve/use_suggestion_placement.stderr
+++ b/src/test/ui/resolve/use_suggestion_placement.stderr
@@ -1,33 +1,33 @@
 error[E0412]: cannot find type `Path` in this scope
-  --> $DIR/use_suggestion_placement.rs:25:16
+  --> $DIR/use_suggestion_placement.rs:27:16
    |
-25 |     type Bar = Path; //~ ERROR cannot find
+27 |     type Bar = Path; //~ ERROR cannot find
    |                ^^^^ not found in this scope
 help: possible candidate is found in another module, you can import it into scope
    |
-21 |     use std::path::Path;
+23 |     use std::path::Path;
    |
 
 error[E0425]: cannot find value `A` in this scope
-  --> $DIR/use_suggestion_placement.rs:30:13
+  --> $DIR/use_suggestion_placement.rs:32:13
    |
-30 |     let _ = A; //~ ERROR cannot find
+32 |     let _ = A; //~ ERROR cannot find
    |             ^ not found in this scope
 help: possible candidate is found in another module, you can import it into scope
    |
-11 | use m::A;
+13 | use m::A;
    |
 
 error[E0412]: cannot find type `HashMap` in this scope
-  --> $DIR/use_suggestion_placement.rs:35:23
+  --> $DIR/use_suggestion_placement.rs:37:23
    |
-35 |     type Dict<K, V> = HashMap<K, V>; //~ ERROR cannot find
+37 |     type Dict<K, V> = HashMap<K, V>; //~ ERROR cannot find
    |                       ^^^^^^^ not found in this scope
 help: possible candidates are found in other modules, you can import them into scope
    |
-11 | use std::collections::HashMap;
+13 | use std::collections::HashMap;
    |
-11 | use std::collections::hash_map::HashMap;
+13 | use std::collections::hash_map::HashMap;
    |
 
 error: aborting due to 3 previous errors
diff --git a/src/test/ui/span/issue-33884.rs b/src/test/ui/span/issue-33884.rs
index 93aa502ee15..d0f23caa538 100644
--- a/src/test/ui/span/issue-33884.rs
+++ b/src/test/ui/span/issue-33884.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// ignore-cloudabi no std::net support
+
 use std::net::TcpListener;
 use std::net::TcpStream;
 use std::io::{self, Read, Write};
diff --git a/src/test/ui/span/issue-33884.stderr b/src/test/ui/span/issue-33884.stderr
index cf5190bba0c..5a9c2051a71 100644
--- a/src/test/ui/span/issue-33884.stderr
+++ b/src/test/ui/span/issue-33884.stderr
@@ -1,7 +1,7 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-33884.rs:16:22
+  --> $DIR/issue-33884.rs:18:22
    |
-16 |     stream.write_fmt(format!("message received"))
+18 |     stream.write_fmt(format!("message received"))
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::fmt::Arguments`, found struct `std::string::String`
    |
    = note: expected type `std::fmt::Arguments<'_>`
diff --git a/src/test/ui/suggestions/try-operator-on-main.rs b/src/test/ui/suggestions/try-operator-on-main.rs
index e9d285941b7..e52ef45c2ec 100644
--- a/src/test/ui/suggestions/try-operator-on-main.rs
+++ b/src/test/ui/suggestions/try-operator-on-main.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// ignore-cloudabi no std::fs support
+
 #![feature(try_trait)]
 
 use std::ops::Try;
diff --git a/src/test/ui/suggestions/try-operator-on-main.stderr b/src/test/ui/suggestions/try-operator-on-main.stderr
index 8b17e06065b..beb627bda6b 100644
--- a/src/test/ui/suggestions/try-operator-on-main.stderr
+++ b/src/test/ui/suggestions/try-operator-on-main.stderr
@@ -1,7 +1,7 @@
 error[E0277]: the `?` operator can only be used in a function that returns `Result` (or another type that implements `std::ops::Try`)
-  --> $DIR/try-operator-on-main.rs:17:5
+  --> $DIR/try-operator-on-main.rs:19:5
    |
-17 |     std::fs::File::open("foo")?; //~ ERROR the `?` operator can only
+19 |     std::fs::File::open("foo")?; //~ ERROR the `?` operator can only
    |     ---------------------------
    |     |
    |     cannot use the `?` operator in a function that returns `()`
@@ -11,9 +11,9 @@ error[E0277]: the `?` operator can only be used in a function that returns `Resu
    = note: required by `std::ops::Try::from_error`
 
 error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
-  --> $DIR/try-operator-on-main.rs:20:5
+  --> $DIR/try-operator-on-main.rs:22:5
    |
-20 |     ()?; //~ ERROR the `?` operator can only
+22 |     ()?; //~ ERROR the `?` operator can only
    |     ---
    |     |
    |     the `?` operator cannot be applied to type `()`
@@ -23,17 +23,17 @@ error[E0277]: the `?` operator can only be applied to values that implement `std
    = note: required by `std::ops::Try::into_result`
 
 error[E0277]: the trait bound `(): std::ops::Try` is not satisfied
-  --> $DIR/try-operator-on-main.rs:23:5
+  --> $DIR/try-operator-on-main.rs:25:5
    |
-23 |     try_trait_generic::<()>(); //~ ERROR the trait bound
+25 |     try_trait_generic::<()>(); //~ ERROR the trait bound
    |     ^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::ops::Try` is not implemented for `()`
    |
    = note: required by `try_trait_generic`
 
 error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
-  --> $DIR/try-operator-on-main.rs:30:5
+  --> $DIR/try-operator-on-main.rs:32:5
    |
-30 |     ()?; //~ ERROR the `?` operator can only
+32 |     ()?; //~ ERROR the `?` operator can only
    |     ---
    |     |
    |     the `?` operator cannot be applied to type `()`