From 0c455463ba4140aaeb4179c2eee3644863d17322 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 7 Apr 2019 12:43:40 +0200 Subject: [PATCH] fix tests --- src/librustc_mir/interpret/validity.rs | 2 +- .../cfg-arg-invalid-1.stderr | 2 ++ .../cfg-arg-invalid-2.stderr | 2 ++ .../cfg-arg-invalid-3.stderr | 2 ++ .../cfg-arg-invalid-4.stderr | 2 ++ .../cfg-arg-invalid-5.stderr | 2 ++ .../cfg-empty-codemap.stderr | 2 ++ src/test/ui/pattern/const-pat-ice.stderr | 13 +++++++++++++ 8 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 src/test/ui/conditional-compilation/cfg-arg-invalid-1.stderr create mode 100644 src/test/ui/conditional-compilation/cfg-arg-invalid-2.stderr create mode 100644 src/test/ui/conditional-compilation/cfg-arg-invalid-3.stderr create mode 100644 src/test/ui/conditional-compilation/cfg-arg-invalid-4.stderr create mode 100644 src/test/ui/conditional-compilation/cfg-arg-invalid-5.stderr create mode 100644 src/test/ui/conditional-compilation/cfg-empty-codemap.stderr create mode 100644 src/test/ui/pattern/const-pat-ice.stderr diff --git a/src/librustc_mir/interpret/validity.rs b/src/librustc_mir/interpret/validity.rs index d4cf906619d89..11e4ffe19da62 100644 --- a/src/librustc_mir/interpret/validity.rs +++ b/src/librustc_mir/interpret/validity.rs @@ -353,7 +353,7 @@ impl<'rt, 'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> match self.ecx.memory.check_align(ptr, align) { Ok(_) => {}, Err(err) => { - error!("{:?} is not aligned to {:?}", ptr, align); + info!("{:?} is not aligned to {:?}", ptr, align); match err.kind { InterpError::InvalidNullPointerUsage => return validation_failure!("NULL reference", self.path), diff --git a/src/test/ui/conditional-compilation/cfg-arg-invalid-1.stderr b/src/test/ui/conditional-compilation/cfg-arg-invalid-1.stderr new file mode 100644 index 0000000000000..1e7922a9ff155 --- /dev/null +++ b/src/test/ui/conditional-compilation/cfg-arg-invalid-1.stderr @@ -0,0 +1,2 @@ +error: invalid `--cfg` argument: `a(b=c)` (expected `key` or `key="value"`) + diff --git a/src/test/ui/conditional-compilation/cfg-arg-invalid-2.stderr b/src/test/ui/conditional-compilation/cfg-arg-invalid-2.stderr new file mode 100644 index 0000000000000..b92e1fd3d97cf --- /dev/null +++ b/src/test/ui/conditional-compilation/cfg-arg-invalid-2.stderr @@ -0,0 +1,2 @@ +error: invalid `--cfg` argument: `a{b}` (expected `key` or `key="value"`) + diff --git a/src/test/ui/conditional-compilation/cfg-arg-invalid-3.stderr b/src/test/ui/conditional-compilation/cfg-arg-invalid-3.stderr new file mode 100644 index 0000000000000..5412f7ffd5c9c --- /dev/null +++ b/src/test/ui/conditional-compilation/cfg-arg-invalid-3.stderr @@ -0,0 +1,2 @@ +error: invalid `--cfg` argument: `a::b` (argument key must be an identifier) + diff --git a/src/test/ui/conditional-compilation/cfg-arg-invalid-4.stderr b/src/test/ui/conditional-compilation/cfg-arg-invalid-4.stderr new file mode 100644 index 0000000000000..6853a69b9eb22 --- /dev/null +++ b/src/test/ui/conditional-compilation/cfg-arg-invalid-4.stderr @@ -0,0 +1,2 @@ +error: invalid `--cfg` argument: `a(b)` (expected `key` or `key="value"`) + diff --git a/src/test/ui/conditional-compilation/cfg-arg-invalid-5.stderr b/src/test/ui/conditional-compilation/cfg-arg-invalid-5.stderr new file mode 100644 index 0000000000000..aafc4e8980cb5 --- /dev/null +++ b/src/test/ui/conditional-compilation/cfg-arg-invalid-5.stderr @@ -0,0 +1,2 @@ +error: invalid `--cfg` argument: `a=10` (argument value must be a string) + diff --git a/src/test/ui/conditional-compilation/cfg-empty-codemap.stderr b/src/test/ui/conditional-compilation/cfg-empty-codemap.stderr new file mode 100644 index 0000000000000..128e3cd730680 --- /dev/null +++ b/src/test/ui/conditional-compilation/cfg-empty-codemap.stderr @@ -0,0 +1,2 @@ +error: invalid `--cfg` argument: `""` (expected `key` or `key="value"`) + diff --git a/src/test/ui/pattern/const-pat-ice.stderr b/src/test/ui/pattern/const-pat-ice.stderr new file mode 100644 index 0000000000000..11cb507d8e6d7 --- /dev/null +++ b/src/test/ui/pattern/const-pat-ice.stderr @@ -0,0 +1,13 @@ +thread 'rustc' panicked at 'assertion failed: rows.iter().all(|r| r.len() == v.len())', src/librustc_mir/hair/pattern/_match.rs:1069:5 +note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace. + +error: internal compiler error: unexpected panic + +note: the compiler unexpectedly panicked. this is a bug. + +note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports + +note: rustc 1.35.0-dev running on x86_64-unknown-linux-gnu + +note: compiler flags: -Z threads=1 -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath +