Auto merge of #55532 - pnkfelix:rustc_error-survey, r=nikomatsakis

#[rustc_error] survey

Fix #55505
This commit is contained in:
bors 2018-11-08 09:38:49 +00:00
commit 653da4fd00
233 changed files with 448 additions and 1311 deletions

View file

@ -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)]
struct Attr {
name: String,
value: String,
@ -31,8 +31,8 @@ impl Element {
}
}
#[rustc_error]
fn main() { //~ ERROR compilation successful
fn main() {
let element = Element { attrs: Vec::new() };
let _ = unsafe { element.get_attr("foo") };
}

View file

@ -1,11 +0,0 @@
error: compilation successful
--> $DIR/issue-11740.rs:35:1
|
LL | / fn main() { //~ ERROR compilation successful
LL | | let element = Element { attrs: Vec::new() };
LL | | let _ = unsafe { element.get_attr("foo") };
LL | | }
| |_^
error: aborting due to previous error

View file

@ -8,13 +8,13 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
fn cb<'a,T>(_x: Box<Fn((&'a i32, &'a (Vec<&'static i32>, bool))) -> T>) -> T {
panic!()
}
#[rustc_error]
fn main() { //~ ERROR compilation successful
fn main() {
cb(Box::new(|(k, &(ref v, b))| (*k, v.clone(), b)));
}

View file

@ -1,10 +0,0 @@
error: compilation successful
--> $DIR/issue-16994.rs:18:1
|
LL | / fn main() { //~ ERROR compilation successful
LL | | cb(Box::new(|(k, &(ref v, b))| (*k, v.clone(), b)));
LL | | }
| |_^
error: aborting due to previous error

View file

@ -8,12 +8,12 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
#![allow(warnings)]
trait A<T> {}
struct B<T> where B<T>: A<B<T>> { t: T }
#[rustc_error]
fn main() { //~ ERROR compilation successful
fn main() {
}

View file

@ -1,9 +0,0 @@
error: compilation successful
--> $DIR/issue-19601.rs:18:1
|
LL | / fn main() { //~ ERROR compilation successful
LL | | }
| |_^
error: aborting due to previous error

View file

@ -7,9 +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.
#![feature(unboxed_closures, fn_traits, rustc_attrs)]
// skip-codegen
// compile-pass
#![feature(unboxed_closures, fn_traits)]
struct Foo;
impl<A> FnOnce<(A,)> for Foo {
@ -17,7 +17,7 @@ impl<A> FnOnce<(A,)> for Foo {
extern "rust-call" fn call_once(self, (_,): (A,)) {
}
}
#[rustc_error]
fn main() { //~ ERROR compilation successful
fn main() {
println!("{:?}", Foo("bar"));
}

View file

@ -1,10 +0,0 @@
error: compilation successful
--> $DIR/issue-22603.rs:21:1
|
LL | / fn main() { //~ ERROR compilation successful
LL | | println!("{:?}", Foo("bar"));
LL | | }
| |_^
error: aborting due to previous error

View file

@ -8,10 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(unboxed_closures, fn_traits, rustc_attrs)]
#[rustc_error]
fn main() { //~ ERROR compilation successful
// compile-pass
// skip-codegen
#![feature(unboxed_closures, fn_traits)]
fn main() {
let k = |x: i32| { x + 1 };
Fn::call(&k, (0,));
}

View file

@ -1,11 +0,0 @@
error: compilation successful
--> $DIR/issue-22789.rs:14:1
|
LL | / fn main() { //~ ERROR compilation successful
LL | | let k = |x: i32| { x + 1 };
LL | | Fn::call(&k, (0,));
LL | | }
| |_^
error: aborting due to previous error

View file

@ -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)]
struct CNFParser {
token: char,
}
@ -31,5 +31,5 @@ impl CNFParser {
}
}
#[rustc_error]
fn main() {} //~ ERROR compilation successful
fn main() {}

View file

@ -1,8 +0,0 @@
error: compilation successful
--> $DIR/issue-22933-1.rs:35:1
|
LL | fn main() {} //~ ERROR compilation successful
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -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
mod a {
pub mod b { pub struct Foo; }
@ -21,8 +21,8 @@ mod a {
pub use self::c::*;
}
#[rustc_error]
fn main() { //~ ERROR compilation successful
fn main() {
let _ = a::c::Bar(a::b::Foo);
let _ = a::Bar(a::b::Foo);
}

View file

@ -1,11 +0,0 @@
error: compilation successful
--> $DIR/issue-24883.rs:25:1
|
LL | / fn main() { //~ ERROR compilation successful
LL | | let _ = a::c::Bar(a::b::Foo);
LL | | let _ = a::Bar(a::b::Foo);
LL | | }
| |_^
error: aborting due to previous error

View file

@ -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)]
trait Mirror {
type It;
}
@ -20,8 +20,8 @@ impl<T> Mirror for T {
}
#[rustc_error]
fn main() { //~ ERROR compilation successful
fn main() {
let c: <u32 as Mirror>::It = 5;
const CCCC: <u32 as Mirror>::It = 5;
}

View file

@ -1,11 +0,0 @@
error: compilation successful
--> $DIR/issue-26614.rs:24:1
|
LL | / fn main() { //~ ERROR compilation successful
LL | | let c: <u32 as Mirror>::It = 5;
LL | | const CCCC: <u32 as Mirror>::It = 5;
LL | | }
| |_^
error: aborting due to previous error

View file

@ -8,13 +8,13 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
#![allow(unused)]
extern crate core;
use core as core_export;
use self::x::*;
mod x {}
#[rustc_error]
fn main() {} //~ ERROR compilation successful
fn main() {}

View file

@ -1,8 +0,0 @@
error: compilation successful
--> $DIR/issue-26930.rs:20:1
|
LL | fn main() {} //~ ERROR compilation successful
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -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
use std::marker::PhantomData;
@ -27,5 +27,5 @@ pub trait Bar {
impl<T: 'static, W: Bar<Output = T>> Foo<*mut T> for W {}
#[rustc_error]
fn main() {} //~ ERROR compilation successful
fn main() {}

View file

@ -1,8 +0,0 @@
error: compilation successful
--> $DIR/issue-29857.rs:31:1
|
LL | fn main() {} //~ ERROR compilation successful
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -8,11 +8,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
#![deny(non_snake_case)]
#[no_mangle]
pub extern "C" fn SparklingGenerationForeignFunctionInterface() {}
#[rustc_error]
fn main() {} //~ ERROR compilation successful
fn main() {}

View file

@ -1,8 +0,0 @@
error: compilation successful
--> $DIR/issue-31924-non-snake-ffi.rs:18:1
|
LL | fn main() {} //~ ERROR compilation successful
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -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)]
pub type T = ();
mod foo { pub use super::T; }
mod bar { pub use super::T; }
@ -25,5 +25,5 @@ mod baz {
pub use self::bar::*;
}
#[rustc_error]
fn main() {} //~ ERROR compilation successful
fn main() {}

View file

@ -1,8 +0,0 @@
error: compilation successful
--> $DIR/issue-32119.rs:29:1
|
LL | fn main() {} //~ ERROR compilation successful
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -8,7 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
#![allow(warnings)]
mod foo {
@ -30,5 +31,5 @@ mod b {
pub use a::bar;
}
#[rustc_error]
fn main() {} //~ ERROR compilation successful
fn main() {}

View file

@ -1,8 +0,0 @@
error: compilation successful
--> $DIR/issue-32222.rs:34:1
|
LL | fn main() {} //~ ERROR compilation successful
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -8,7 +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 use bar::*;
mod bar {
@ -20,5 +21,5 @@ mod baz {
pub use main as f;
}
#[rustc_error]
pub fn main() {} //~ ERROR compilation successful
pub fn main() {}

View file

@ -1,8 +0,0 @@
error: compilation successful
--> $DIR/issue-32797.rs:24:1
|
LL | pub fn main() {} //~ ERROR compilation successful
| ^^^^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -8,7 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
#![allow(warnings)]
macro_rules! foo { () => {
@ -31,8 +32,8 @@ macro_rules! baz {
}
}
#[rustc_error]
fn main() { //~ ERROR compilation successful
fn main() {
foo! {};
bar! {};

View file

@ -1,14 +0,0 @@
error: compilation successful
--> $DIR/issue-32922.rs:35:1
|
LL | / fn main() { //~ ERROR compilation successful
LL | | foo! {};
LL | | bar! {};
LL | |
LL | | let mut a = true;
LL | | baz!(a);
LL | | }
| |_^
error: aborting due to previous error

View file

@ -8,7 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
use std::fmt;
@ -16,8 +17,8 @@ use std::fmt;
// an unsized tuple by transmuting a trait object.
fn any<T>() -> T { unreachable!() }
#[rustc_error]
fn main() { //~ ERROR compilation successful
fn main() {
let t: &(u8, fmt::Debug) = any();
println!("{:?}", &t.1);
}

View file

@ -1,11 +0,0 @@
error: compilation successful
--> $DIR/issue-33241.rs:20:1
|
LL | / fn main() { //~ ERROR compilation successful
LL | | let t: &(u8, fmt::Debug) = any();
LL | | println!("{:?}", &t.1);
LL | | }
| |_^
error: aborting due to previous error

View file

@ -8,7 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
macro_rules! m {
() => { #[cfg(any())] fn f() {} }
@ -17,5 +18,5 @@ macro_rules! m {
trait T {}
impl T for () { m!(); }
#[rustc_error]
fn main() {} //~ ERROR compilation successful
fn main() {}

View file

@ -1,8 +0,0 @@
error: compilation successful
--> $DIR/issue-34028.rs:21:1
|
LL | fn main() {} //~ ERROR compilation successful
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -8,14 +8,15 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
macro_rules! null { ($i:tt) => {} }
macro_rules! apply_null {
($i:item) => { null! { $i } }
}
#[rustc_error]
fn main() { //~ ERROR compilation successful
fn main() {
apply_null!(#[cfg(all())] fn f() {});
}

View file

@ -1,10 +0,0 @@
error: compilation successful
--> $DIR/issue-34171.rs:19:1
|
LL | / fn main() { //~ ERROR compilation successful
LL | | apply_null!(#[cfg(all())] fn f() {});
LL | | }
| |_^
error: aborting due to previous error

View file

@ -8,7 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
#![allow(unused)]
macro_rules! make_item {
@ -27,5 +28,5 @@ fn g() {
make_stmt! {}
}
#[rustc_error]
fn main() {} //~ ERROR compilation successful
fn main() {}

View file

@ -1,8 +0,0 @@
error: compilation successful
--> $DIR/issue-34418.rs:31:1
|
LL | fn main() {} //~ ERROR compilation successful
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -8,7 +8,8 @@
// 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)]
trait RegularExpression: Sized {
@ -27,5 +28,5 @@ enum FindCapturesInner<'r, 't> {
Dynamic(FindCaptures<'t, ExecNoSyncStr<'r>>),
}
#[rustc_error]
fn main() {} //~ ERROR compilation successful
fn main() {}

View file

@ -1,8 +0,0 @@
error: compilation successful
--> $DIR/issue-34839.rs:31:1
|
LL | fn main() {} //~ ERROR compilation successful
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -8,7 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
use std::mem;
@ -34,7 +35,7 @@ fn foo<'a>(x: &'a ()) -> <() as Lifetime<'a>>::Out {
fn takes_lifetime(_f: for<'a> fn(&'a ()) -> <() as Lifetime<'a>>::Out) {
}
#[rustc_error]
fn main() { //~ ERROR compilation successful
fn main() {
takes_lifetime(foo);
}

View file

@ -1,10 +0,0 @@
error: compilation successful
--> $DIR/issue-35570.rs:38:1
|
LL | / fn main() { //~ ERROR compilation successful
LL | | takes_lifetime(foo);
LL | | }
| |_^
error: aborting due to previous error

View file

@ -10,9 +10,9 @@
// Unnecessary path disambiguator is ok
#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
#![allow(unused)]
macro_rules! m {
($p: path) => {
let _ = $p(0);
@ -33,5 +33,5 @@ fn f() {
m!(S::<u8>); // OK, no warning
}
#[rustc_error]
fn main() {} //~ ERROR compilation successful
fn main() {}

View file

@ -10,11 +10,3 @@ warning: unnecessary path disambiguator
LL | let g: Foo::<i32> = Foo { _a: 42 }; //~ WARN unnecessary path disambiguator
| ^^ try removing `::`
error: compilation successful
--> $DIR/issue-36116.rs:37:1
|
LL | fn main() {} //~ ERROR compilation successful
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -8,9 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
fn _test() -> impl Default { }
#[rustc_error]
fn main() { } //~ ERROR compilation successful
fn main() { }

View file

@ -1,8 +0,0 @@
error: compilation successful
--> $DIR/issue-36379.rs:16:1
|
LL | fn main() { } //~ ERROR compilation successful
| ^^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -8,7 +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 {
type Bar;
@ -26,7 +27,7 @@ impl<T> Broken for T {
}
}
#[rustc_error]
fn main() { //~ ERROR compilation successful
fn main() {
let _m: &Broken<Assoc=()> = &();
}

View file

@ -1,10 +0,0 @@
error: compilation successful
--> $DIR/issue-36839.rs:30:1
|
LL | / fn main() { //~ ERROR compilation successful
LL | | let _m: &Broken<Assoc=()> = &();
LL | | }
| |_^
error: aborting due to previous error

View file

@ -8,9 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs, associated_type_defaults)]
// compile-pass
// skip-codegen
#![feature(associated_type_defaults)]
#![allow(warnings)]
trait State: Sized {
type NextState: State = StateMachineEnded;
fn execute(self) -> Option<Self::NextState>;
@ -24,6 +25,6 @@ impl State for StateMachineEnded {
}
}
#[rustc_error]
fn main() { //~ ERROR compilation successful
fn main() {
}

View file

@ -1,9 +0,0 @@
error: compilation successful
--> $DIR/issue-37051.rs:28:1
|
LL | / fn main() { //~ ERROR compilation successful
LL | | }
| |_^
error: aborting due to previous error

View file

@ -9,8 +9,9 @@
// except according to those terms.
// ignore-emscripten
#![feature(rustc_attrs, asm)]
// compile-pass
// skip-codegen
#![feature(asm)]
macro_rules! interrupt_handler {
() => {
@ -21,6 +22,6 @@ macro_rules! interrupt_handler {
}
interrupt_handler!{}
#[rustc_error]
fn main() { //~ ERROR compilation successful
fn main() {
}

View file

@ -1,9 +0,0 @@
error: compilation successful
--> $DIR/issue-37366.rs:25:1
|
LL | / fn main() { //~ ERROR compilation successful
LL | | }
| |_^
error: aborting due to previous error

View file

@ -8,12 +8,13 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
fn foo(_: &mut i32) -> bool { true }
#[rustc_error]
fn main() { //~ ERROR compilation successful
fn main() {
let opt = Some(92);
let mut x = 62;

View file

@ -1,14 +0,0 @@
error: compilation successful
--> $DIR/issue-37510.rs:16:1
|
LL | / fn main() { //~ ERROR compilation successful
LL | | let opt = Some(92);
LL | | let mut x = 62;
LL | |
... |
LL | | }
LL | | }
| |_^
error: aborting due to previous error

View file

@ -7,13 +7,13 @@
// <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.
#![feature(rustc_attrs)]
// skip-codegen
// compile-pass
#![warn(unused)]
type Z = for<'x> Send;
//~^ WARN type alias is never used
#[rustc_error]
fn main() { //~ ERROR compilation successful
fn main() {
}

View file

@ -11,12 +11,3 @@ LL | #![warn(unused)]
| ^^^^^^
= note: #[warn(dead_code)] implied by #[warn(unused)]
error: compilation successful
--> $DIR/issue-37515.rs:18:1
|
LL | / fn main() { //~ ERROR compilation successful
LL | | }
| |_^
error: aborting due to previous error

View file

@ -8,9 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(associated_consts, rustc_attrs)]
// compile-pass
// skip-codegen
#![feature(associated_consts)]
#![allow(warnings)]
trait MyTrait {
const MY_CONST: &'static str;
}
@ -27,5 +28,5 @@ macro_rules! my_macro {
my_macro!();
#[rustc_error]
fn main() {} //~ ERROR compilation successful
fn main() {}

View file

@ -1,8 +0,0 @@
error: compilation successful
--> $DIR/issue-38160.rs:31:1
|
LL | fn main() {} //~ ERROR compilation successful
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -8,11 +8,12 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
use std::ops::Deref;
#[rustc_error]
fn main() { //~ ERROR compilation successful
fn main() {
let _x: fn(&i32) -> <&i32 as Deref>::Target = unimplemented!();
}

View file

@ -1,10 +0,0 @@
error: compilation successful
--> $DIR/issue-38381.rs:16:1
|
LL | / fn main() { //~ ERROR compilation successful
LL | | let _x: fn(&i32) -> <&i32 as Deref>::Target = unimplemented!();
LL | | }
| |_^
error: aborting due to previous error

View file

@ -8,7 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
// skip-codegen
#![allow(warnings)]
enum E {
@ -18,7 +19,5 @@ enum E {
}
}
#[rustc_error]
fn main() {}
//~^ ERROR compilation successful
fn main() {}

View file

@ -1,8 +0,0 @@
error: compilation successful
--> $DIR/issue-40350.rs:22:1
|
LL | fn main() {}
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -12,11 +12,3 @@ LL | &mut x
It represents potential unsoundness in your code.
This warning will become a hard error in the future.
error: compilation successful
--> $DIR/issue-40510-1.rs:23:1
|
LL | fn main() {} //~ ERROR compilation successful
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
#![allow(unused)]
fn f() {
@ -19,5 +19,5 @@ fn f() {
};
}
#[rustc_error]
fn main() {} //~ ERROR compilation successful
fn main() {}

View file

@ -1,8 +0,0 @@
error: compilation successful
--> $DIR/issue-40510-1.rs:23:1
|
LL | fn main() {} //~ ERROR compilation successful
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
#![allow(unused)]
fn f() {
@ -19,5 +19,5 @@ fn f() {
};
}
#[rustc_error]
fn main() {} //~ ERROR compilation successful
fn main() {}

View file

@ -1,8 +0,0 @@
error: compilation successful
--> $DIR/issue-40510-2.rs:23:1
|
LL | fn main() {} //~ ERROR compilation successful
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -14,11 +14,3 @@ LL | | }
It represents potential unsoundness in your code.
This warning will become a hard error in the future.
error: compilation successful
--> $DIR/issue-40510-3.rs:25:1
|
LL | fn main() {} //~ ERROR compilation successful
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
#![allow(unused)]
fn f() {
@ -21,5 +21,5 @@ fn f() {
};
}
#[rustc_error]
fn main() {} //~ ERROR compilation successful
fn main() {}

View file

@ -1,8 +0,0 @@
error: compilation successful
--> $DIR/issue-40510-3.rs:25:1
|
LL | fn main() {} //~ ERROR compilation successful
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
#![allow(unused)]
fn f() {
@ -21,5 +21,5 @@ fn f() {
};
}
#[rustc_error]
fn main() {} //~ ERROR compilation successful
fn main() {}

View file

@ -1,8 +0,0 @@
error: compilation successful
--> $DIR/issue-40510-4.rs:25:1
|
LL | fn main() {} //~ ERROR compilation successful
| ^^^^^^^^^^^^
error: aborting due to previous error

View file

@ -8,10 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(rustc_attrs)]
// compile-pass
#[rustc_error]
fn main() { //~ ERROR compilation successful
fn main() {
if ('x' as char) < ('y' as char) {
print!("x");
} else {

View file

@ -1,14 +0,0 @@
error: compilation successful
--> $DIR/issue-41998.rs:14:1
|
LL | / fn main() { //~ ERROR compilation successful
LL | | if ('x' as char) < ('y' as char) {
LL | | print!("x");
LL | | } else {
LL | | print!("y");
LL | | }
LL | | }
| |_^
error: aborting due to previous error