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.
This commit is contained in:
bors 2018-01-03 17:00:24 +00:00
commit d96cc6e286
102 changed files with 253 additions and 150 deletions

View File

@ -977,15 +977,13 @@ fn use_color(opts: &TestOpts) -> bool {
}
}
#[cfg(target_os = "redox")]
#[cfg(any(target_os = "cloudabi",
target_os = "redox",
all(target_arch = "wasm32", not(target_os = "emscripten"))))]
fn stdout_isatty() -> bool {
// FIXME: Implement isatty on Redox
false
}
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
fn stdout_isatty() -> bool {
false
}
#[cfg(unix)]
fn stdout_isatty() -> bool {
unsafe { libc::isatty(libc::STDOUT_FILENO) != 0 }

View File

@ -9,19 +9,20 @@
// except according to those terms.
// This test is for *-windows-msvc only.
// ignore-gnu
// ignore-android
// ignore-bitrig
// ignore-macos
// ignore-cloudabi
// ignore-dragonfly
// ignore-emscripten
// ignore-freebsd
// ignore-gnu
// ignore-haiku
// ignore-ios
// ignore-linux
// ignore-macos
// ignore-netbsd
// ignore-openbsd
// ignore-solaris
// ignore-emscripten
// aux-build:dummy.rs
// aux-build:wrapper.rs

View File

@ -13,16 +13,17 @@
// This test is for *-windows-msvc only.
// ignore-android
// ignore-bitrig
// ignore-macos
// ignore-cloudabi
// ignore-dragonfly
// ignore-emscripten
// ignore-freebsd
// ignore-haiku
// ignore-ios
// ignore-linux
// ignore-macos
// ignore-netbsd
// ignore-openbsd
// ignore-solaris
// ignore-emscripten
// compile-flags: -C no-prepopulate-passes -C panic=abort -O

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no std::path
use std::path::Path;
trait Foo {

View File

@ -11,6 +11,7 @@
// error-pattern: crate `cdylib_dep` required to be available in rlib format, but was not found
// aux-build:cdylib-dep.rs
// ignore-musl
// ignore-cloudabi
// ignore-emscripten
#![crate_type = "cdylib"]

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no std::process
fn foo(_: Box<FnMut()>) {}
fn main() {

View File

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags: -Z unstable-options --unpretty=mir
// ignore-cloudabi no std::path
use std::path::MAIN_SEPARATOR;

View File

@ -10,6 +10,7 @@
// compile-flags:-C panic=abort -C prefer-dynamic
// ignore-musl - no dylibs here
// ignore-cloudabi
// ignore-emscripten
// error-pattern:`panic_unwind` is not compiled with this crate's panic strategy

View File

@ -8,19 +8,20 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-gnu
// ignore-android
// ignore-bitrig
// ignore-macos
// ignore-cloudabi
// ignore-dragonfly
// ignore-emscripten
// ignore-freebsd
// ignore-gnu
// ignore-haiku
// ignore-ios
// ignore-linux
// ignore-macos
// ignore-netbsd
// ignore-openbsd
// ignore-solaris
// ignore-emscripten
// compile-flags: -Z parse-only

View File

@ -7,9 +7,10 @@
// <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.
// error-pattern:drop 1
// error-pattern:drop 2
// ignore-cloudabi no std::process
/// Structure which will not allow to be dropped twice.
struct Droppable<'a>(&'a mut bool, u32);

View File

@ -9,7 +9,7 @@
// except according to those terms.
// error-pattern:drop 1
// ignore-cloudabi no std::process
/// Structure which will not allow to be dropped twice.
struct Droppable<'a>(&'a mut bool, u32);

View File

@ -12,7 +12,7 @@
// error-pattern:drop 3
// error-pattern:drop 2
// error-pattern:drop 1
// ignore-cloudabi no std::process
/// Structure which will not allow to be dropped twice.
struct Droppable<'a>(&'a mut bool, u32);

View File

@ -10,6 +10,8 @@
// compile-flags: -Z no-landing-pads -C codegen-units=1
// error-pattern:converging_fn called
// ignore-cloudabi no std::process
use std::io::{self, Write};
struct Droppable;

View File

@ -10,6 +10,8 @@
// compile-flags: -Z no-landing-pads -C codegen-units=1
// error-pattern:diverging_fn called
// ignore-cloudabi no std::process
use std::io::{self, Write};
struct Droppable;

View File

@ -10,6 +10,7 @@
// error-pattern:nonzero
// exec-env:RUST_NEWRT=1
// ignore-cloudabi no std::env
use std::env;

View File

@ -9,9 +9,10 @@
// except according to those terms.
// no-prefer-dynamic
// ignore-cloudabi
// ignore-emscripten
// ignore-macos this needs valgrind 3.11 or higher; see
// https://github.com/rust-lang/rust/pull/30365#issuecomment-165763679
// ignore-emscripten
use std::env;
use std::process::{exit, Command};

View File

@ -11,6 +11,7 @@
// Since we mark some ABIs as "nounwind" to LLVM, we must make sure that
// we never unwind through them.
// ignore-cloudabi no env and process
// ignore-emscripten no processes
use std::{env, panic};

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no process support
// ignore-emscripten no threads support
use std::{env, fmt, process, sync, thread};

View File

@ -17,6 +17,7 @@
// compile-flags:-g -Cllvm-args=-enable-tail-merge=0
// ignore-pretty issue #37195
// ignore-cloudabi spawning processes is not supported
// ignore-emscripten spawning processes is not supported
use std::env;

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-android FIXME #17520
// ignore-cloudabi spawning processes is not supported
// ignore-emscripten spawning processes is not supported
// ignore-openbsd no support for libbacktrace without filename
// compile-flags:-g

View File

@ -9,6 +9,7 @@
// except according to those terms.
// pretty-expanded FIXME #23616
// ignore-cloudabi no target_family
// ignore-wasm32-bare no target_family
#[cfg(windows)]

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no target_family
// ignore-wasm32-bare no target_family
// pretty-expanded FIXME #23616

View File

@ -11,6 +11,7 @@
// Test that cleanups for the RHS of shortcircuiting operators work.
// pretty-expanded FIXME #23616
// ignore-cloudabi no std::env support
use std::env;

View File

@ -9,6 +9,7 @@
// except according to those terms.
// ignore-windows - this is a unix-specific test
// ignore-cloudabi no processes
// ignore-emscripten no processes
#![feature(process_exec, libc)]

View File

@ -10,6 +10,7 @@
// ignore-windows - this is a unix-specific test
// ignore-pretty issue #37199
// ignore-cloudabi no processes
// ignore-emscripten no processes
#![feature(process_exec)]

View File

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags:--test
// ignore-cloudabi no processes
// ignore-emscripten no processes
// NB: These tests kill child processes. Valgrind sees these children as leaking

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no processes
// ignore-emscripten no processes
use std::env::args;

View File

@ -12,6 +12,7 @@
// ignore-android
// ignore-windows
// ignore-cloudabi no execve
// ignore-emscripten no execve
// no-prefer-dynamic

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no environment variables present
// ignore-emscripten env vars don't work?
#![feature(path)]

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no env vars
// ignore-wasm32-bare no env vars
use std::env::*;

View File

@ -9,6 +9,7 @@
// except according to those terms.
// exec-env:TEST_EXEC_ENV=22
// ignore-cloudabi no env vars
// ignore-emscripten FIXME: issue #31622
use std::env;

View File

@ -10,6 +10,7 @@
// ignore-windows
// ignore-android
// ignore-cloudabi no processes
// ignore-emscripten no processes
// ignore-haiku

View File

@ -19,14 +19,15 @@ mod rusti {
}
}
#[cfg(any(target_os = "linux",
target_os = "macos",
target_os = "freebsd",
#[cfg(any(target_os = "cloudabi",
target_os = "dragonfly",
target_os = "emscripten",
target_os = "freebsd",
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd",
target_os = "solaris",
target_os = "emscripten"))]
target_os = "solaris"))]
mod m {
#[main]
#[cfg(target_arch = "x86")]

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no processes
// ignore-emscripten no processes
// Make sure that if a process doesn't have its stdio/stderr descriptors set up

View File

@ -11,8 +11,9 @@
// aux-build:issue-12133-rlib.rs
// aux-build:issue-12133-dylib.rs
// aux-build:issue-12133-dylib2.rs
// ignore-musl
// ignore-cloudabi no dylib support
// ignore-emscripten no dylib support
// ignore-musl
// pretty-expanded FIXME #23616

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no processes
// ignore-emscripten no processes
#![feature(io, process_capture)]

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no processes
// ignore-emscripten no processes
#![feature(io, process_capture)]

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no processes
// ignore-emscripten no processes
use std::env;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no processes
// ignore-emscripten no processes
use std::process::Command;

View File

@ -9,6 +9,7 @@
// except according to those terms.
// pretty-expanded FIXME #23616
// ignore-cloudabi no std::fs
use std::fs::File;
use std::io::{self, BufReader, Read};

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no processes
// ignore-emscripten no processes
#![feature(std_misc, os)]

View File

@ -12,6 +12,7 @@
// had to do with trans ignoring binders.
// pretty-expanded FIXME #23616
// ignore-cloudabi no std::fs
#![feature(os)]

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no std::fs
// Regression test for #20797.
use std::default::Default;

View File

@ -34,7 +34,7 @@ mod m {
#[link_name = "m"]
extern {
#[cfg(unix)]
#[cfg(any(unix, target_os = "cloudabi"))]
#[link_name="lgamma_r"]
pub fn lgamma(n: c_double, sign: &mut c_int) -> c_double;
#[cfg(windows)]

View File

@ -9,6 +9,7 @@
// except according to those terms.
// pretty-expanded FIXME #23616
// ignore-cloudabi no std::fs
#![feature(fs, net)]

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no std::path
use std::collections::HashMap;
use std::path::Path;

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no std::path
use std::collections::HashMap;
use std::path::{Path, PathBuf};

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no processes
// ignore-emscripten no threads
use std::thread;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no std::env
// ignore-wasm32 issue 42629
#[inline(never)]

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no processes
// ignore-emscripten no processes
// Previously libstd would set stdio descriptors of a child process

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no processes
// ignore-emscripten no processes
use std::process::{Command, Stdio};

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no std::env
fn parse_args() -> String {
let args: Vec<_> = ::std::env::args().collect();
let mut n = 0;

View File

@ -9,6 +9,7 @@
// except according to those terms.
// pretty-expanded FIXME #23616
// ignore-cloudabi no std::env
use std::env;

View File

@ -10,11 +10,11 @@
// compile-flags:--test -g
use std::{env, panic, fs};
#[cfg(target_os = "macos")]
#[test]
fn simple_test() {
use std::{env, panic, fs};
// Find our dSYM and replace the DWARF binary with an empty file
let mut dsym_path = env::current_exe().unwrap();
let executable_name = dsym_path.file_name().unwrap().to_str().unwrap().to_string();

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no processes
// ignore-emscripten no processes
fn check_for_no_backtrace(test: std::process::Output) {

View File

@ -8,8 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten no processes
// ignore-android
// ignore-cloudabi no processes
// ignore-emscripten no processes
#![feature(libc)]

View File

@ -10,6 +10,7 @@
// ignore-android: FIXME (#20004)
// ignore-musl
// ignore-cloudabi no processes
// ignore-emscripten no processes
#![feature(asm)]

View File

@ -11,6 +11,7 @@
// compile-flags:-C panic=abort
// aux-build:exit-success-if-unwind.rs
// no-prefer-dynamic
// ignore-cloudabi no processes
// ignore-emscripten no processes
extern crate exit_success_if_unwind;

View File

@ -10,6 +10,7 @@
// compile-flags:-C panic=abort
// no-prefer-dynamic
// ignore-cloudabi no processes
// ignore-emscripten no processes
use std::process::Command;

View File

@ -10,6 +10,7 @@
// compile-flags:-C lto -C panic=abort
// no-prefer-dynamic
// ignore-cloudabi no processes
// ignore-emscripten no processes
use std::process::Command;

View File

@ -10,6 +10,7 @@
// compile-flags:-C lto -C panic=unwind
// no-prefer-dynamic
// ignore-cloudabi no processes
// ignore-emscripten no processes
use std::process::Command;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no files or I/O
// ignore-wasm32-bare no files or I/O
use std::fs;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi spawning processes is not supported
// ignore-emscripten spawning processes is not supported
use std::{env, process};

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no processes
// ignore-emscripten no processes
use std::process::Command;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no processes
// ignore-emscripten no processes
use std::env;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no processes
// ignore-emscripten no processes
use std::process::Command;

View File

@ -18,6 +18,7 @@
// (instead of running forever), and that it does not print an error
// message about a broken pipe.
// ignore-cloudabi no subprocesses support
// ignore-emscripten no threads support
use std::process;

View File

@ -16,6 +16,7 @@
// non-ASCII characters. The child process ensures all the strings are
// intact.
// ignore-cloudabi no processes
// ignore-emscripten no processes
use std::io::prelude::*;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no processes
// ignore-emscripten no processes
use std::env;

View File

@ -38,14 +38,15 @@ struct Outer {
}
#[cfg(any(target_os = "linux",
target_os = "macos",
target_os = "freebsd",
#[cfg(any(target_os = "cloudabi",
target_os = "dragonfly",
target_os = "emscripten",
target_os = "freebsd",
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd",
target_os = "solaris",
target_os = "emscripten"))]
target_os = "solaris"))]
mod m {
#[cfg(target_arch = "x86")]
pub mod m {

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi stdout does not map to file descriptor 1 by default
// ignore-wasm32-bare no libc
#![feature(libc)]

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi spawning processes is not supported
// ignore-emscripten spawning processes is not supported
#![feature(start)]

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi can't run commands
// ignore-emscripten can't run commands
#![feature(libc)]

View File

@ -12,8 +12,9 @@
// main thread exit while still being in use by signal handlers. This test
// triggers this situation by sending signal from atexit handler.
//
// ignore-windows
// ignore-cloudabi no signal handling support
// ignore-wasm32-bare no libc
// ignore-windows
#![feature(libc)]
extern crate libc;

View File

@ -8,8 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-windows
// ignore-cloudabi no processes
// ignore-emscripten no processes
// ignore-windows
use std::env;
use std::process::Command;

View File

@ -11,6 +11,7 @@
// Be sure that when a SIGPIPE would have been received that the entire process
// doesn't die in a ball of fire, but rather it's gracefully handled.
// ignore-cloudabi no processes
// ignore-emscripten no processes
use std::env;

View File

@ -7,7 +7,9 @@
// <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.
// min-llvm-version 4.0
// ignore-cloudabi no std::env
#![feature(cfg_target_feature)]

View File

@ -11,6 +11,7 @@
// ignore-arm
// ignore-aarch64
// ignore-wasm
// ignore-cloudabi no processes
// ignore-emscripten no processes
// ignore-musl FIXME #31506
// ignore-pretty

View File

@ -11,6 +11,7 @@
// ignore-arm
// ignore-aarch64
// ignore-wasm
// ignore-cloudabi no processes
// ignore-emscripten no processes
// ignore-musl FIXME #31506
// no-system-llvm

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no processes
// ignore-emscripten no processes
use std::env;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi networking not available
// ignore-wasm32-bare networking not available
#![feature(lookup_host)]

View File

@ -10,9 +10,10 @@
// ignore-android needs extra network permissions
// ignore-bitrig system ulimit (Too many open files)
// ignore-cloudabi no global network namespace access
// ignore-emscripten no threads or sockets support
// ignore-netbsd system ulimit (Too many open files)
// ignore-openbsd system ulimit (Too many open files)
// ignore-emscripten no threads or sockets support
use std::io::prelude::*;
use std::net::{TcpListener, TcpStream};

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no std::fs
use std::fs::File;
use std::io::{Read, self};
use std::num::ParseIntError;

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no processes
// ignore-emscripten no processes
#![feature(process_try_wait)]

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-cloudabi no processes
// ignore-emscripten no processes
#![feature(libc)]

View File

@ -17,13 +17,10 @@
// Note that this is disabled on unix as processes exiting with 259 will have
// their exit status truncated to 3 (only the lower 8 bits are used).
use std::process::{self, Command};
use std::env;
#[cfg(windows)]
fn main() {
if !cfg!(windows) {
return
}
use std::process::{self, Command};
use std::env;
if env::args().len() == 1 {
let status = Command::new(env::current_exe().unwrap())
@ -35,3 +32,6 @@ fn main() {
process::exit(259);
}
}
#[cfg(not(windows))]
fn main() {}

View File

@ -32,14 +32,15 @@ pub fn main() {
}
}
#[cfg(any(target_os = "macos",
target_os = "linux",
target_os = "freebsd",
target_os = "dragonfly",
#[cfg(any(target_os = "android",
target_os = "bitrig",
target_os = "cloudabi",
target_os = "dragonfly",
target_os = "emscripten",
target_os = "freebsd",
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd",
target_os = "android",
target_os = "solaris",
target_os = "emscripten"))]
target_os = "solaris"))]
pub fn main() { }

View File

@ -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)]

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 {

View File

@ -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

View File

@ -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).

View File

@ -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`

View File

@ -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 {
() => {}
}

View File

@ -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

View File

@ -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};

View File

@ -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<'_>`

View File

@ -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;

Some files were not shown because too many files have changed in this diff Show More