Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#[rustc_error] survey #55532

Merged
merged 5 commits into from
Nov 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/test/ui/asm/asm-bad-clobber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
// ignore-mips
// ignore-mips64

#![feature(asm, rustc_attrs)]
#![feature(asm)]

#[cfg(any(target_arch = "x86",
target_arch = "x86_64"))]
#[rustc_error]

pub fn main() {
unsafe {
// clobber formatted as register input/output
Expand Down
8 changes: 4 additions & 4 deletions src/test/ui/asm/asm-misplaced-option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
// ignore-mips
// ignore-mips64

#![feature(asm, rustc_attrs)]

// compile-pass
// skip-codegen
#![feature(asm)]
#![allow(dead_code, non_upper_case_globals)]

#[cfg(any(target_arch = "x86",
target_arch = "x86_64"))]
#[rustc_error]
pub fn main() { //~ ERROR compilation successful
pub fn main() {
// assignment not dead
let mut x: isize = 0;
unsafe {
Expand Down
14 changes: 0 additions & 14 deletions src/test/ui/asm/asm-misplaced-option.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,3 @@ warning: expected a clobber, found an option
LL | asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8_usize) : "cc", "volatile");
| ^^^^^^^^^^

error: compilation successful
--> $DIR/asm-misplaced-option.rs:31:1
|
LL | / pub fn main() { //~ ERROR compilation successful
LL | | // assignment not dead
LL | | let mut x: isize = 0;
LL | | unsafe {
... |
LL | | assert_eq!(x, 13);
LL | | }
| |_^

error: aborting due to previous error

8 changes: 4 additions & 4 deletions src/test/ui/associated-types/cache/chrono-scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
#![allow(warnings)]

pub type ParseResult<T> = Result<T, ()>;

pub enum Item<'a> { Literal(&'a str),
Expand All @@ -35,5 +35,5 @@ pub fn parse<'a, I>(mut s: &str, items: I) -> ParseResult<()>
Ok(())
}

#[rustc_error]
fn main() { } //~ ERROR compilation successful

fn main() { }
8 changes: 0 additions & 8 deletions src/test/ui/associated-types/cache/chrono-scan.stderr

This file was deleted.

8 changes: 4 additions & 4 deletions src/test/ui/associated-types/cache/elision.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
#![allow(warnings)]

// Check that you are allowed to implement using elision but write
// trait without elision (a bug in this cropped up during
// bootstrapping, so this is a regression test).
Expand All @@ -30,5 +30,5 @@ impl UnicodeStr for str {
}
}

#[rustc_error]
fn main() { } //~ ERROR compilation successful

fn main() { }
8 changes: 0 additions & 8 deletions src/test/ui/associated-types/cache/elision.stderr

This file was deleted.

8 changes: 4 additions & 4 deletions src/test/ui/bad/bad-lint-cap3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

#![warn(unused)]
#![deny(warnings)]
#![feature(rustc_attrs)]

// compile-pass
// skip-codegen
use std::option; //~ WARN

#[rustc_error]
fn main() {} //~ ERROR: compilation successful

fn main() {}

8 changes: 0 additions & 8 deletions src/test/ui/bad/bad-lint-cap3.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,3 @@ LL | #![deny(warnings)]
| ^^^^^^^^
= note: #[warn(unused_imports)] implied by #[warn(warnings)]

error: compilation successful
--> $DIR/bad-lint-cap3.rs:20:1
|
LL | fn main() {} //~ ERROR: compilation successful
| ^^^^^^^^^^^^

error: aborting due to previous error

8 changes: 4 additions & 4 deletions src/test/ui/coherence/coherence-projection-ok-orphan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
#![allow(dead_code)]

// Here we do not get a coherence conflict because `Baz: Iterator`
// does not hold and (due to the orphan rules), we can rely on that.

Expand All @@ -25,5 +25,5 @@ impl Foo<i32> for Baz { }

impl<A:Iterator> Foo<A::Item> for A { }

#[rustc_error]
fn main() {} //~ ERROR compilation successful

fn main() {}
8 changes: 0 additions & 8 deletions src/test/ui/coherence/coherence-projection-ok-orphan.stderr

This file was deleted.

8 changes: 4 additions & 4 deletions src/test/ui/coherence/coherence-projection-ok.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(rustc_attrs)]

// compile-pass
// skip-codegen
pub trait Foo<P> {}

pub trait Bar {
Expand All @@ -24,5 +24,5 @@ impl Bar for i32 {
type Output = u32;
}

#[rustc_error]
fn main() {} //~ ERROR compilation successful

fn main() {}
8 changes: 0 additions & 8 deletions src/test/ui/coherence/coherence-projection-ok.stderr

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// `MyType: !MyTrait` along with other "fundamental" wrappers.

// aux-build:coherence_copy_like_lib.rs

#![feature(rustc_attrs)]
// compile-pass
// skip-codgen
#![allow(dead_code)]

extern crate coherence_copy_like_lib as lib;
Expand All @@ -30,5 +30,5 @@ impl<T: lib::MyCopy> MyTrait for T { }
// Huzzah.
impl MyTrait for lib::MyFundamentalStruct<MyType> { }

#[rustc_error]
fn main() { } //~ ERROR compilation successful

fn main() { }

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// `MyType: !MyTrait` along with other "fundamental" wrappers.

// aux-build:coherence_copy_like_lib.rs

#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
#![allow(dead_code)]

extern crate coherence_copy_like_lib as lib;
Expand All @@ -30,5 +30,5 @@ impl<T: lib::MyCopy> MyTrait for T { }
// Huzzah.
impl<'a> MyTrait for lib::MyFundamentalStruct<&'a MyType> { }

#[rustc_error]
fn main() { } //~ ERROR compilation successful

fn main() { }

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// aux-build:coherence_copy_like_lib.rs

#![feature(rustc_attrs)]


extern crate coherence_copy_like_lib as lib;

Expand All @@ -26,5 +26,5 @@ impl<T: lib::MyCopy> MyTrait for T { }
// Tuples are not fundamental.
impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { } //~ ERROR E0119

#[rustc_error]

fn main() { }
8 changes: 4 additions & 4 deletions src/test/ui/coherence/coherence_local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// `MyType: !MyTrait` along with other "fundamental" wrappers.

// aux-build:coherence_copy_like_lib.rs

#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
#![allow(dead_code)]

extern crate coherence_copy_like_lib as lib;
Expand All @@ -29,5 +29,5 @@ impl lib::MyCopy for Box<MyType> { }
impl lib::MyCopy for lib::MyFundamentalStruct<MyType> { }
impl lib::MyCopy for lib::MyFundamentalStruct<Box<MyType>> { }

#[rustc_error]
fn main() { } //~ ERROR compilation successful

fn main() { }
8 changes: 0 additions & 8 deletions src/test/ui/coherence/coherence_local.stderr

This file was deleted.

4 changes: 2 additions & 2 deletions src/test/ui/coherence/coherence_local_err_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// aux-build:coherence_copy_like_lib.rs

#![feature(rustc_attrs)]

#![allow(dead_code)]

extern crate coherence_copy_like_lib as lib;
Expand All @@ -25,5 +25,5 @@ struct MyType { x: i32 }
// MyStruct is not fundamental.
impl lib::MyCopy for lib::MyStruct<MyType> { } //~ ERROR E0117

#[rustc_error]

fn main() { }
4 changes: 2 additions & 2 deletions src/test/ui/coherence/coherence_local_err_tuple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// aux-build:coherence_copy_like_lib.rs

#![feature(rustc_attrs)]

#![allow(dead_code)]

extern crate coherence_copy_like_lib as lib;
Expand All @@ -25,5 +25,5 @@ struct MyType { x: i32 }
// Tuples are not fundamental, so this is not a local impl.
impl lib::MyCopy for (MyType,) { } //~ ERROR E0117

#[rustc_error]

fn main() { }
8 changes: 4 additions & 4 deletions src/test/ui/coherence/coherence_local_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// `MyType: !MyTrait` along with other "fundamental" wrappers.

// aux-build:coherence_copy_like_lib.rs

#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
#![allow(dead_code)]

extern crate coherence_copy_like_lib as lib;
Expand All @@ -23,5 +23,5 @@ struct MyType { x: i32 }
// naturally, legal
impl lib::MyCopy for MyType { }

#[rustc_error]
fn main() { } //~ ERROR compilation successful

fn main() { }
8 changes: 0 additions & 8 deletions src/test/ui/coherence/coherence_local_ref.stderr

This file was deleted.

8 changes: 4 additions & 4 deletions src/test/ui/conditional-compilation/cfg_attr_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
#![allow(dead_code)]
#![deny(unused_attributes)] // c.f #35584

mod auxiliary {
#[cfg_attr(any(), path = "nonexistent_file.rs")] pub mod namespaced_enums;
#[cfg_attr(all(), path = "namespaced_enums.rs")] pub mod nonexistent_file;
}

#[rustc_error]
fn main() { //~ ERROR compilation successful

fn main() {
let _ = auxiliary::namespaced_enums::Foo::A;
let _ = auxiliary::nonexistent_file::Foo::A;
}
11 changes: 0 additions & 11 deletions src/test/ui/conditional-compilation/cfg_attr_path.stderr

This file was deleted.

Loading