From 3f880912e90825a88b0a25e235dd43b24da1055b Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Tue, 2 Jan 2018 14:11:41 +0100 Subject: Add 'ignore-cloudabi' to tests that don't and won't build on CloudABI. It looks like many of these tests are already disabled on emscripten, which also doesn't seem to support environment variables and subprocess spawning. Just add a similar tag for CloudABI. While there, sort some of the lists of operating systems alphabetically. --- src/test/ui/span/issue-33884.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/test/ui/span') 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}; -- cgit 1.4.1-3-g733a5 From c51f8783f27c00397ded2d17dd71cc603cbf5245 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Tue, 2 Jan 2018 17:19:20 +0100 Subject: Correct for changes in line numbers in expected stderr output. Due to the disable-cloudabi tags being added to the source files, the expected output of the compiler is altered slightly. --- src/test/ui/issue-46576.stderr | 8 +- src/test/ui/lint/use_suggestion_json.stderr | 116 ++++++++++----------- .../ui/mismatched_types/recovered-block.stderr | 10 +- src/test/ui/resolve/token-error-correct-3.stderr | 26 ++--- .../ui/resolve/use_suggestion_placement.stderr | 20 ++-- src/test/ui/span/issue-33884.stderr | 4 +- .../ui/suggestions/try-operator-on-main.stderr | 16 +-- 7 files changed, 100 insertions(+), 100 deletions(-) (limited to 'src/test/ui/span') 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.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.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.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.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 = HashMap; //~ ERROR cannot find +37 | type Dict = HashMap; //~ 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.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.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 `()` -- cgit 1.4.1-3-g733a5