Auto merge of #55532 - pnkfelix:rustc_error-survey, r=nikomatsakis
#[rustc_error] survey Fix #55505
This commit is contained in:
@@ -21,11 +21,11 @@
|
|||||||
// ignore-mips
|
// ignore-mips
|
||||||
// ignore-mips64
|
// ignore-mips64
|
||||||
|
|
||||||
#![feature(asm, rustc_attrs)]
|
#![feature(asm)]
|
||||||
|
|
||||||
#[cfg(any(target_arch = "x86",
|
#[cfg(any(target_arch = "x86",
|
||||||
target_arch = "x86_64"))]
|
target_arch = "x86_64"))]
|
||||||
#[rustc_error]
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
unsafe {
|
unsafe {
|
||||||
// clobber formatted as register input/output
|
// clobber formatted as register input/output
|
||||||
|
|||||||
@@ -21,14 +21,14 @@
|
|||||||
// ignore-mips
|
// ignore-mips
|
||||||
// ignore-mips64
|
// ignore-mips64
|
||||||
|
|
||||||
#![feature(asm, rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
|
#![feature(asm)]
|
||||||
#![allow(dead_code, non_upper_case_globals)]
|
#![allow(dead_code, non_upper_case_globals)]
|
||||||
|
|
||||||
#[cfg(any(target_arch = "x86",
|
#[cfg(any(target_arch = "x86",
|
||||||
target_arch = "x86_64"))]
|
target_arch = "x86_64"))]
|
||||||
#[rustc_error]
|
pub fn main() {
|
||||||
pub fn main() { //~ ERROR compilation successful
|
|
||||||
// assignment not dead
|
// assignment not dead
|
||||||
let mut x: isize = 0;
|
let mut x: isize = 0;
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|||||||
@@ -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");
|
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,9 +8,9 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
|
||||||
pub type ParseResult<T> = Result<T, ()>;
|
pub type ParseResult<T> = Result<T, ()>;
|
||||||
|
|
||||||
pub enum Item<'a> { Literal(&'a str),
|
pub enum Item<'a> { Literal(&'a str),
|
||||||
@@ -35,5 +35,5 @@ pub fn parse<'a, I>(mut s: &str, items: I) -> ParseResult<()>
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { } //~ ERROR compilation successful
|
fn main() { }
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
error: compilation successful
|
|
||||||
--> $DIR/chrono-scan.rs:39:1
|
|
||||||
|
|
|
||||||
LL | fn main() { } //~ ERROR compilation successful
|
|
||||||
| ^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
@@ -8,9 +8,9 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
|
||||||
// Check that you are allowed to implement using elision but write
|
// Check that you are allowed to implement using elision but write
|
||||||
// trait without elision (a bug in this cropped up during
|
// trait without elision (a bug in this cropped up during
|
||||||
// bootstrapping, so this is a regression test).
|
// bootstrapping, so this is a regression test).
|
||||||
@@ -30,5 +30,5 @@ impl UnicodeStr for str {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { } //~ ERROR compilation successful
|
fn main() { }
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
error: compilation successful
|
|
||||||
--> $DIR/elision.rs:34:1
|
|
||||||
|
|
|
||||||
LL | fn main() { } //~ ERROR compilation successful
|
|
||||||
| ^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
@@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
#![warn(unused)]
|
#![warn(unused)]
|
||||||
#![deny(warnings)]
|
#![deny(warnings)]
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
use std::option; //~ WARN
|
use std::option; //~ WARN
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() {} //~ ERROR: compilation successful
|
fn main() {}
|
||||||
|
|
||||||
|
|||||||
@@ -11,11 +11,3 @@ LL | #![deny(warnings)]
|
|||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
= note: #[warn(unused_imports)] implied by #[warn(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,9 +8,9 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
// Here we do not get a coherence conflict because `Baz: Iterator`
|
// 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.
|
// does not hold and (due to the orphan rules), we can rely on that.
|
||||||
|
|
||||||
@@ -25,5 +25,5 @@ impl Foo<i32> for Baz { }
|
|||||||
|
|
||||||
impl<A:Iterator> Foo<A::Item> for A { }
|
impl<A:Iterator> Foo<A::Item> for A { }
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() {} //~ ERROR compilation successful
|
fn main() {}
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
error: compilation successful
|
|
||||||
--> $DIR/coherence-projection-ok-orphan.rs:29:1
|
|
||||||
|
|
|
||||||
LL | fn main() {} //~ ERROR compilation successful
|
|
||||||
| ^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
@@ -8,8 +8,8 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
pub trait Foo<P> {}
|
pub trait Foo<P> {}
|
||||||
|
|
||||||
pub trait Bar {
|
pub trait Bar {
|
||||||
@@ -24,5 +24,5 @@ impl Bar for i32 {
|
|||||||
type Output = u32;
|
type Output = u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() {} //~ ERROR compilation successful
|
fn main() {}
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
error: compilation successful
|
|
||||||
--> $DIR/coherence-projection-ok.rs:28:1
|
|
||||||
|
|
|
||||||
LL | fn main() {} //~ ERROR compilation successful
|
|
||||||
| ^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
// `MyType: !MyTrait` along with other "fundamental" wrappers.
|
// `MyType: !MyTrait` along with other "fundamental" wrappers.
|
||||||
|
|
||||||
// aux-build:coherence_copy_like_lib.rs
|
// aux-build:coherence_copy_like_lib.rs
|
||||||
|
// compile-pass
|
||||||
#![feature(rustc_attrs)]
|
// skip-codgen
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
extern crate coherence_copy_like_lib as lib;
|
extern crate coherence_copy_like_lib as lib;
|
||||||
@@ -30,5 +30,5 @@ impl<T: lib::MyCopy> MyTrait for T { }
|
|||||||
// Huzzah.
|
// Huzzah.
|
||||||
impl MyTrait for lib::MyFundamentalStruct<MyType> { }
|
impl MyTrait for lib::MyFundamentalStruct<MyType> { }
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { } //~ ERROR compilation successful
|
fn main() { }
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
error: compilation successful
|
|
||||||
--> $DIR/coherence_copy_like_err_fundamental_struct.rs:34:1
|
|
||||||
|
|
|
||||||
LL | fn main() { } //~ ERROR compilation successful
|
|
||||||
| ^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
// `MyType: !MyTrait` along with other "fundamental" wrappers.
|
// `MyType: !MyTrait` along with other "fundamental" wrappers.
|
||||||
|
|
||||||
// aux-build:coherence_copy_like_lib.rs
|
// aux-build:coherence_copy_like_lib.rs
|
||||||
|
// compile-pass
|
||||||
#![feature(rustc_attrs)]
|
// skip-codegen
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
extern crate coherence_copy_like_lib as lib;
|
extern crate coherence_copy_like_lib as lib;
|
||||||
@@ -30,5 +30,5 @@ impl<T: lib::MyCopy> MyTrait for T { }
|
|||||||
// Huzzah.
|
// Huzzah.
|
||||||
impl<'a> MyTrait for lib::MyFundamentalStruct<&'a MyType> { }
|
impl<'a> MyTrait for lib::MyFundamentalStruct<&'a MyType> { }
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { } //~ ERROR compilation successful
|
fn main() { }
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
error: compilation successful
|
|
||||||
--> $DIR/coherence_copy_like_err_fundamental_struct_ref.rs:34:1
|
|
||||||
|
|
|
||||||
LL | fn main() { } //~ ERROR compilation successful
|
|
||||||
| ^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
// aux-build:coherence_copy_like_lib.rs
|
// aux-build:coherence_copy_like_lib.rs
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
|
||||||
|
|
||||||
extern crate coherence_copy_like_lib as lib;
|
extern crate coherence_copy_like_lib as lib;
|
||||||
|
|
||||||
@@ -26,5 +26,5 @@ impl<T: lib::MyCopy> MyTrait for T { }
|
|||||||
// Tuples are not fundamental.
|
// Tuples are not fundamental.
|
||||||
impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { } //~ ERROR E0119
|
impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { } //~ ERROR E0119
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { }
|
fn main() { }
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
// `MyType: !MyTrait` along with other "fundamental" wrappers.
|
// `MyType: !MyTrait` along with other "fundamental" wrappers.
|
||||||
|
|
||||||
// aux-build:coherence_copy_like_lib.rs
|
// aux-build:coherence_copy_like_lib.rs
|
||||||
|
// compile-pass
|
||||||
#![feature(rustc_attrs)]
|
// skip-codegen
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
extern crate coherence_copy_like_lib as lib;
|
extern crate coherence_copy_like_lib as lib;
|
||||||
@@ -29,5 +29,5 @@ impl lib::MyCopy for Box<MyType> { }
|
|||||||
impl lib::MyCopy for lib::MyFundamentalStruct<MyType> { }
|
impl lib::MyCopy for lib::MyFundamentalStruct<MyType> { }
|
||||||
impl lib::MyCopy for lib::MyFundamentalStruct<Box<MyType>> { }
|
impl lib::MyCopy for lib::MyFundamentalStruct<Box<MyType>> { }
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { } //~ ERROR compilation successful
|
fn main() { }
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
error: compilation successful
|
|
||||||
--> $DIR/coherence_local.rs:33:1
|
|
||||||
|
|
|
||||||
LL | fn main() { } //~ ERROR compilation successful
|
|
||||||
| ^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
// aux-build:coherence_copy_like_lib.rs
|
// aux-build:coherence_copy_like_lib.rs
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
extern crate coherence_copy_like_lib as lib;
|
extern crate coherence_copy_like_lib as lib;
|
||||||
@@ -25,5 +25,5 @@ struct MyType { x: i32 }
|
|||||||
// MyStruct is not fundamental.
|
// MyStruct is not fundamental.
|
||||||
impl lib::MyCopy for lib::MyStruct<MyType> { } //~ ERROR E0117
|
impl lib::MyCopy for lib::MyStruct<MyType> { } //~ ERROR E0117
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { }
|
fn main() { }
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
// aux-build:coherence_copy_like_lib.rs
|
// aux-build:coherence_copy_like_lib.rs
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
extern crate coherence_copy_like_lib as lib;
|
extern crate coherence_copy_like_lib as lib;
|
||||||
@@ -25,5 +25,5 @@ struct MyType { x: i32 }
|
|||||||
// Tuples are not fundamental, so this is not a local impl.
|
// Tuples are not fundamental, so this is not a local impl.
|
||||||
impl lib::MyCopy for (MyType,) { } //~ ERROR E0117
|
impl lib::MyCopy for (MyType,) { } //~ ERROR E0117
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { }
|
fn main() { }
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
// `MyType: !MyTrait` along with other "fundamental" wrappers.
|
// `MyType: !MyTrait` along with other "fundamental" wrappers.
|
||||||
|
|
||||||
// aux-build:coherence_copy_like_lib.rs
|
// aux-build:coherence_copy_like_lib.rs
|
||||||
|
// compile-pass
|
||||||
#![feature(rustc_attrs)]
|
// skip-codegen
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
extern crate coherence_copy_like_lib as lib;
|
extern crate coherence_copy_like_lib as lib;
|
||||||
@@ -23,5 +23,5 @@ struct MyType { x: i32 }
|
|||||||
// naturally, legal
|
// naturally, legal
|
||||||
impl lib::MyCopy for MyType { }
|
impl lib::MyCopy for MyType { }
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { } //~ ERROR compilation successful
|
fn main() { }
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
error: compilation successful
|
|
||||||
--> $DIR/coherence_local_ref.rs:27:1
|
|
||||||
|
|
|
||||||
LL | fn main() { } //~ ERROR compilation successful
|
|
||||||
| ^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
@@ -8,17 +8,17 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
#![deny(unused_attributes)] // c.f #35584
|
#![deny(unused_attributes)] // c.f #35584
|
||||||
|
|
||||||
mod auxiliary {
|
mod auxiliary {
|
||||||
#[cfg_attr(any(), path = "nonexistent_file.rs")] pub mod namespaced_enums;
|
#[cfg_attr(any(), path = "nonexistent_file.rs")] pub mod namespaced_enums;
|
||||||
#[cfg_attr(all(), path = "namespaced_enums.rs")] pub mod nonexistent_file;
|
#[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::namespaced_enums::Foo::A;
|
||||||
let _ = auxiliary::nonexistent_file::Foo::A;
|
let _ = auxiliary::nonexistent_file::Foo::A;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
error: compilation successful
|
|
||||||
--> $DIR/cfg_attr_path.rs:21:1
|
|
||||||
|
|
|
||||||
LL | / fn main() { //~ ERROR compilation successful
|
|
||||||
LL | | let _ = auxiliary::namespaced_enums::Foo::A;
|
|
||||||
LL | | let _ = auxiliary::nonexistent_file::Foo::A;
|
|
||||||
LL | | }
|
|
||||||
| |_^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
@@ -10,16 +10,16 @@
|
|||||||
|
|
||||||
// Test use of const fn from another crate without a feature gate.
|
// Test use of const fn from another crate without a feature gate.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![allow(unused_variables)]
|
#![allow(unused_variables)]
|
||||||
|
|
||||||
// aux-build:const_fn_lib.rs
|
// aux-build:const_fn_lib.rs
|
||||||
|
|
||||||
extern crate const_fn_lib;
|
extern crate const_fn_lib;
|
||||||
|
|
||||||
use const_fn_lib::foo;
|
use const_fn_lib::foo;
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { //~ ERROR compilation successful
|
fn main() {
|
||||||
let x = foo(); // use outside a constant is ok
|
let x = foo(); // use outside a constant is ok
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
error: compilation successful
|
|
||||||
--> $DIR/const-fn-stability-calls-3.rs:23:1
|
|
||||||
|
|
|
||||||
LL | / fn main() { //~ ERROR compilation successful
|
|
||||||
LL | | let x = foo(); // use outside a constant is ok
|
|
||||||
LL | | }
|
|
||||||
| |_^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
@@ -7,9 +7,9 @@
|
|||||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
// skip-codegen
|
||||||
#![feature(custom_attribute, rustc_attrs)]
|
// compile-pass
|
||||||
|
#![feature(custom_attribute)]
|
||||||
macro_rules! mac {
|
macro_rules! mac {
|
||||||
{} => {
|
{} => {
|
||||||
#[cfg(attr)]
|
#[cfg(attr)]
|
||||||
@@ -28,5 +28,5 @@ macro_rules! mac {
|
|||||||
|
|
||||||
mac! {}
|
mac! {}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() {} //~ ERROR compilation successful
|
fn main() {}
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
error: compilation successful
|
|
||||||
--> $DIR/expanded-cfg.rs:32:1
|
|
||||||
|
|
|
||||||
LL | fn main() {} //~ ERROR compilation successful
|
|
||||||
| ^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
// inputs are handled by each, and (2.) to ease searching for related
|
// inputs are handled by each, and (2.) to ease searching for related
|
||||||
// occurrences in the source text.
|
// occurrences in the source text.
|
||||||
|
|
||||||
#![feature(rustc_attrs)] // For `rustc_error`; see note below.
|
// skip-codegen
|
||||||
#![warn(unused_attributes, unknown_lints)]
|
#![warn(unused_attributes, unknown_lints)]
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
#![allow(stable_features)]
|
#![allow(stable_features)]
|
||||||
@@ -584,7 +584,7 @@ mod export_name {
|
|||||||
#[export_name = "2200"] impl S { }
|
#[export_name = "2200"] impl S { }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note that this test ends with a `#[rustc_error] fn main()`, so it
|
// Note that this test has a `skip-codegen`, so it
|
||||||
// will never invoke the linker. These are here nonetheless to point
|
// will never invoke the linker. These are here nonetheless to point
|
||||||
// out that we allow them at non-crate-level (though I do not know
|
// out that we allow them at non-crate-level (though I do not know
|
||||||
// whether they have the same effect here as at crate-level).
|
// whether they have the same effect here as at crate-level).
|
||||||
@@ -835,12 +835,12 @@ mod type_length_limit {
|
|||||||
//~| WARN crate-level attribute should be an inner attribute
|
//~| WARN crate-level attribute should be an inner attribute
|
||||||
}
|
}
|
||||||
|
|
||||||
// Since we expect for the mix of attributes used here to compile
|
|
||||||
// successfully, and we are just testing for the expected warnings of
|
|
||||||
// various (mis)uses of attributes, we use the `rustc_error` attribute
|
|
||||||
// on the `fn main()`.
|
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { //~ ERROR compilation successful
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
fn main() {
|
||||||
println!("Hello World");
|
println!("Hello World");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1303,13 +1303,7 @@ warning: unused attribute
|
|||||||
LL | #![proc_macro_derive = "2500"] //~ WARN unused attribute
|
LL | #![proc_macro_derive = "2500"] //~ WARN unused attribute
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: compilation successful
|
error: invalid windows subsystem `1000`, only `windows` and `console` are allowed
|
||||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:844:1
|
|
||||||
|
|
|
||||||
LL | / fn main() { //~ ERROR compilation successful
|
|
||||||
LL | | println!("Hello World");
|
|
||||||
LL | | }
|
|
||||||
| |_^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
//
|
//
|
||||||
// (For non-crate-level cases, see issue-43106-gating-of-builtin-attrs.rs)
|
// (For non-crate-level cases, see issue-43106-gating-of-builtin-attrs.rs)
|
||||||
|
|
||||||
#![feature(rustc_attrs)] // For `rustc_error`; see note below.
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
#![deprecated = "1100"]
|
#![deprecated = "1100"]
|
||||||
|
|
||||||
// Since we expect for the mix of attributes used here to compile
|
// Since we expect for the mix of attributes used here to compile
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
// various (mis)uses of attributes, we use the `rustc_error` attribute
|
// various (mis)uses of attributes, we use the `rustc_error` attribute
|
||||||
// on the `fn main()`.
|
// on the `fn main()`.
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { //~ ERROR compilation successful
|
fn main() {
|
||||||
println!("Hello World");
|
println!("Hello World");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
error: compilation successful
|
|
||||||
--> $DIR/issue-43106-gating-of-deprecated.rs:29:1
|
|
||||||
|
|
|
||||||
LL | / fn main() { //~ ERROR compilation successful
|
|
||||||
LL | | println!("Hello World");
|
|
||||||
LL | | }
|
|
||||||
| |_^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
// Check that literals in attributes parse just fine.
|
// Check that literals in attributes parse just fine.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
#![allow(unused_variables)]
|
#![allow(unused_variables)]
|
||||||
|
|
||||||
@@ -29,5 +29,5 @@
|
|||||||
#[fake_doc(r"doc")] //~ ERROR attribute `fake_doc` is currently unknown
|
#[fake_doc(r"doc")] //~ ERROR attribute `fake_doc` is currently unknown
|
||||||
struct Q { }
|
struct Q { }
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { }
|
fn main() { }
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
mod foo {
|
mod foo {
|
||||||
pub use bar::*;
|
pub use bar::*;
|
||||||
pub use main as f;
|
pub use main as f;
|
||||||
@@ -25,5 +25,5 @@ mod baz {
|
|||||||
pub use super::*;
|
pub use super::*;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
pub fn main() {} //~ ERROR compilation successful
|
pub fn main() {}
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
error: compilation successful
|
|
||||||
--> $DIR/glob-cycles.rs:29:1
|
|
||||||
|
|
|
||||||
LL | pub fn main() {} //~ ERROR compilation successful
|
|
||||||
| ^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
@@ -11,8 +11,8 @@
|
|||||||
// ignore-pretty pretty-printing is unhygienic
|
// ignore-pretty pretty-printing is unhygienic
|
||||||
|
|
||||||
#![feature(decl_macro, associated_type_defaults)]
|
#![feature(decl_macro, associated_type_defaults)]
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
trait Base {
|
trait Base {
|
||||||
type AssocTy;
|
type AssocTy;
|
||||||
fn f();
|
fn f();
|
||||||
@@ -45,5 +45,5 @@ macro mac() {
|
|||||||
|
|
||||||
mac!();
|
mac!();
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() {} //~ ERROR compilation successful
|
fn main() {}
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
error: compilation successful
|
|
||||||
--> $DIR/assoc_ty_bindings.rs:49:1
|
|
||||||
|
|
|
||||||
LL | fn main() {} //~ ERROR compilation successful
|
|
||||||
| ^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
@@ -8,13 +8,13 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
|
||||||
// This used to ICE because the "if" being unreachable was not handled correctly
|
// This used to ICE because the "if" being unreachable was not handled correctly
|
||||||
fn err() {
|
fn err() {
|
||||||
if loop {} {}
|
if loop {} {}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() {} //~ ERROR compilation successful
|
fn main() {}
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
error: compilation successful
|
|
||||||
--> $DIR/if-loop.rs:20:1
|
|
||||||
|
|
|
||||||
LL | fn main() {} //~ ERROR compilation successful
|
|
||||||
| ^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
@@ -10,12 +10,12 @@
|
|||||||
|
|
||||||
// aux-build:import_crate_var.rs
|
// aux-build:import_crate_var.rs
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#[macro_use] extern crate import_crate_var;
|
#[macro_use] extern crate import_crate_var;
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { //~ ERROR compilation successful
|
fn main() {
|
||||||
m!();
|
m!();
|
||||||
//~^ WARN `$crate` may not be imported
|
//~^ WARN `$crate` may not be imported
|
||||||
//~| NOTE `use $crate;` was erroneously allowed and will become a hard error
|
//~| NOTE `use $crate;` was erroneously allowed and will become a hard error
|
||||||
|
|||||||
@@ -7,15 +7,3 @@ LL | m!();
|
|||||||
= note: `use $crate;` was erroneously allowed and will become a hard error in a future release
|
= note: `use $crate;` was erroneously allowed and will become a hard error in a future release
|
||||||
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
||||||
|
|
||||||
error: compilation successful
|
|
||||||
--> $DIR/import-crate-var.rs:18:1
|
|
||||||
|
|
|
||||||
LL | / fn main() { //~ ERROR compilation successful
|
|
||||||
LL | | m!();
|
|
||||||
LL | | //~^ WARN `$crate` may not be imported
|
|
||||||
LL | | //~| NOTE `use $crate;` was erroneously allowed and will become a hard error
|
|
||||||
LL | | }
|
|
||||||
| |_^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
|
||||||
struct Attr {
|
struct Attr {
|
||||||
name: String,
|
name: String,
|
||||||
value: 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 element = Element { attrs: Vec::new() };
|
||||||
let _ = unsafe { element.get_attr("foo") };
|
let _ = unsafe { element.get_attr("foo") };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,13 +8,13 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// 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 {
|
fn cb<'a,T>(_x: Box<Fn((&'a i32, &'a (Vec<&'static i32>, bool))) -> T>) -> T {
|
||||||
panic!()
|
panic!()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { //~ ERROR compilation successful
|
fn main() {
|
||||||
cb(Box::new(|(k, &(ref v, b))| (*k, v.clone(), b)));
|
cb(Box::new(|(k, &(ref v, b))| (*k, v.clone(), b)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,12 +8,12 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
|
||||||
trait A<T> {}
|
trait A<T> {}
|
||||||
struct B<T> where B<T>: A<B<T>> { t: T }
|
struct B<T> where B<T>: A<B<T>> { t: T }
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { //~ ERROR compilation successful
|
fn main() {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -7,9 +7,9 @@
|
|||||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
// skip-codegen
|
||||||
#![feature(unboxed_closures, fn_traits, rustc_attrs)]
|
// compile-pass
|
||||||
|
#![feature(unboxed_closures, fn_traits)]
|
||||||
struct Foo;
|
struct Foo;
|
||||||
|
|
||||||
impl<A> FnOnce<(A,)> for 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,)) {
|
extern "rust-call" fn call_once(self, (_,): (A,)) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[rustc_error]
|
|
||||||
fn main() { //~ ERROR compilation successful
|
fn main() {
|
||||||
println!("{:?}", Foo("bar"));
|
println!("{:?}", Foo("bar"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,10 +8,10 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(unboxed_closures, fn_traits, rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#[rustc_error]
|
#![feature(unboxed_closures, fn_traits)]
|
||||||
fn main() { //~ ERROR compilation successful
|
fn main() {
|
||||||
let k = |x: i32| { x + 1 };
|
let k = |x: i32| { x + 1 };
|
||||||
Fn::call(&k, (0,));
|
Fn::call(&k, (0,));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,9 +8,9 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
|
||||||
struct CNFParser {
|
struct CNFParser {
|
||||||
token: char,
|
token: char,
|
||||||
}
|
}
|
||||||
@@ -31,5 +31,5 @@ impl CNFParser {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() {} //~ ERROR compilation successful
|
fn main() {}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,8 +8,8 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
mod a {
|
mod a {
|
||||||
pub mod b { pub struct Foo; }
|
pub mod b { pub struct Foo; }
|
||||||
|
|
||||||
@@ -21,8 +21,8 @@ mod a {
|
|||||||
pub use self::c::*;
|
pub use self::c::*;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { //~ ERROR compilation successful
|
fn main() {
|
||||||
let _ = a::c::Bar(a::b::Foo);
|
let _ = a::c::Bar(a::b::Foo);
|
||||||
let _ = a::Bar(a::b::Foo);
|
let _ = a::Bar(a::b::Foo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,9 +8,9 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
|
||||||
trait Mirror {
|
trait Mirror {
|
||||||
type It;
|
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;
|
let c: <u32 as Mirror>::It = 5;
|
||||||
const CCCC: <u32 as Mirror>::It = 5;
|
const CCCC: <u32 as Mirror>::It = 5;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,13 +8,13 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![allow(unused)]
|
#![allow(unused)]
|
||||||
|
|
||||||
extern crate core;
|
extern crate core;
|
||||||
use core as core_export;
|
use core as core_export;
|
||||||
use self::x::*;
|
use self::x::*;
|
||||||
mod x {}
|
mod x {}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() {} //~ ERROR compilation successful
|
fn main() {}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,8 +8,8 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
// compile-pass
|
||||||
#![feature(rustc_attrs)]
|
// skip-codegen
|
||||||
|
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
@@ -27,5 +27,5 @@ pub trait Bar {
|
|||||||
|
|
||||||
impl<T: 'static, W: Bar<Output = T>> Foo<*mut T> for W {}
|
impl<T: 'static, W: Bar<Output = T>> Foo<*mut T> for W {}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() {} //~ ERROR compilation successful
|
fn main() {}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,11 +8,11 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![deny(non_snake_case)]
|
#![deny(non_snake_case)]
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn SparklingGenerationForeignFunctionInterface() {}
|
pub extern "C" fn SparklingGenerationForeignFunctionInterface() {}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() {} //~ ERROR compilation successful
|
fn main() {}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,9 +8,9 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
pub type T = ();
|
pub type T = ();
|
||||||
mod foo { pub use super::T; }
|
mod foo { pub use super::T; }
|
||||||
mod bar { pub use super::T; }
|
mod bar { pub use super::T; }
|
||||||
@@ -25,5 +25,5 @@ mod baz {
|
|||||||
pub use self::bar::*;
|
pub use self::bar::*;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() {} //~ ERROR compilation successful
|
fn main() {}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
|
||||||
mod foo {
|
mod foo {
|
||||||
@@ -30,5 +31,5 @@ mod b {
|
|||||||
pub use a::bar;
|
pub use a::bar;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() {} //~ ERROR compilation successful
|
fn main() {}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
|
|
||||||
pub use bar::*;
|
pub use bar::*;
|
||||||
mod bar {
|
mod bar {
|
||||||
@@ -20,5 +21,5 @@ mod baz {
|
|||||||
pub use main as f;
|
pub use main as f;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
pub fn main() {} //~ ERROR compilation successful
|
pub fn main() {}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
|
||||||
macro_rules! foo { () => {
|
macro_rules! foo { () => {
|
||||||
@@ -31,8 +32,8 @@ macro_rules! baz {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { //~ ERROR compilation successful
|
fn main() {
|
||||||
foo! {};
|
foo! {};
|
||||||
bar! {};
|
bar! {};
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
@@ -16,8 +17,8 @@ use std::fmt;
|
|||||||
// an unsized tuple by transmuting a trait object.
|
// an unsized tuple by transmuting a trait object.
|
||||||
fn any<T>() -> T { unreachable!() }
|
fn any<T>() -> T { unreachable!() }
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { //~ ERROR compilation successful
|
fn main() {
|
||||||
let t: &(u8, fmt::Debug) = any();
|
let t: &(u8, fmt::Debug) = any();
|
||||||
println!("{:?}", &t.1);
|
println!("{:?}", &t.1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
|
|
||||||
macro_rules! m {
|
macro_rules! m {
|
||||||
() => { #[cfg(any())] fn f() {} }
|
() => { #[cfg(any())] fn f() {} }
|
||||||
@@ -17,5 +18,5 @@ macro_rules! m {
|
|||||||
trait T {}
|
trait T {}
|
||||||
impl T for () { m!(); }
|
impl T for () { m!(); }
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() {} //~ ERROR compilation successful
|
fn main() {}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,14 +8,15 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
|
|
||||||
macro_rules! null { ($i:tt) => {} }
|
macro_rules! null { ($i:tt) => {} }
|
||||||
macro_rules! apply_null {
|
macro_rules! apply_null {
|
||||||
($i:item) => { null! { $i } }
|
($i:item) => { null! { $i } }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { //~ ERROR compilation successful
|
fn main() {
|
||||||
apply_null!(#[cfg(all())] fn f() {});
|
apply_null!(#[cfg(all())] fn f() {});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![allow(unused)]
|
#![allow(unused)]
|
||||||
|
|
||||||
macro_rules! make_item {
|
macro_rules! make_item {
|
||||||
@@ -27,5 +28,5 @@ fn g() {
|
|||||||
make_stmt! {}
|
make_stmt! {}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() {} //~ ERROR compilation successful
|
fn main() {}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
trait RegularExpression: Sized {
|
trait RegularExpression: Sized {
|
||||||
@@ -27,5 +28,5 @@ enum FindCapturesInner<'r, 't> {
|
|||||||
Dynamic(FindCaptures<'t, ExecNoSyncStr<'r>>),
|
Dynamic(FindCaptures<'t, ExecNoSyncStr<'r>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() {} //~ ERROR compilation successful
|
fn main() {}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
|
|
||||||
use std::mem;
|
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) {
|
fn takes_lifetime(_f: for<'a> fn(&'a ()) -> <() as Lifetime<'a>>::Out) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { //~ ERROR compilation successful
|
fn main() {
|
||||||
takes_lifetime(foo);
|
takes_lifetime(foo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -10,9 +10,9 @@
|
|||||||
|
|
||||||
// Unnecessary path disambiguator is ok
|
// Unnecessary path disambiguator is ok
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
#![allow(unused)]
|
#![allow(unused)]
|
||||||
|
|
||||||
macro_rules! m {
|
macro_rules! m {
|
||||||
($p: path) => {
|
($p: path) => {
|
||||||
let _ = $p(0);
|
let _ = $p(0);
|
||||||
@@ -33,5 +33,5 @@ fn f() {
|
|||||||
m!(S::<u8>); // OK, no warning
|
m!(S::<u8>); // OK, no warning
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() {} //~ ERROR compilation successful
|
fn main() {}
|
||||||
|
|||||||
@@ -10,11 +10,3 @@ warning: unnecessary path disambiguator
|
|||||||
LL | let g: Foo::<i32> = Foo { _a: 42 }; //~ WARN unnecessary path disambiguator
|
LL | let g: Foo::<i32> = Foo { _a: 42 }; //~ WARN unnecessary path disambiguator
|
||||||
| ^^ try removing `::`
|
| ^^ try removing `::`
|
||||||
|
|
||||||
error: compilation successful
|
|
||||||
--> $DIR/issue-36116.rs:37:1
|
|
||||||
|
|
|
||||||
LL | fn main() {} //~ ERROR compilation successful
|
|
||||||
| ^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,10 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
|
|
||||||
fn _test() -> impl Default { }
|
fn _test() -> impl Default { }
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { } //~ ERROR compilation successful
|
fn main() { }
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
|
|
||||||
pub trait Foo {
|
pub trait Foo {
|
||||||
type Bar;
|
type Bar;
|
||||||
@@ -26,7 +27,7 @@ impl<T> Broken for T {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { //~ ERROR compilation successful
|
fn main() {
|
||||||
let _m: &Broken<Assoc=()> = &();
|
let _m: &Broken<Assoc=()> = &();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,9 +8,10 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs, associated_type_defaults)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
|
#![feature(associated_type_defaults)]
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
|
||||||
trait State: Sized {
|
trait State: Sized {
|
||||||
type NextState: State = StateMachineEnded;
|
type NextState: State = StateMachineEnded;
|
||||||
fn execute(self) -> Option<Self::NextState>;
|
fn execute(self) -> Option<Self::NextState>;
|
||||||
@@ -24,6 +25,6 @@ impl State for StateMachineEnded {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { //~ ERROR compilation successful
|
fn main() {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -9,8 +9,9 @@
|
|||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// ignore-emscripten
|
// ignore-emscripten
|
||||||
|
// compile-pass
|
||||||
#![feature(rustc_attrs, asm)]
|
// skip-codegen
|
||||||
|
#![feature(asm)]
|
||||||
|
|
||||||
macro_rules! interrupt_handler {
|
macro_rules! interrupt_handler {
|
||||||
() => {
|
() => {
|
||||||
@@ -21,6 +22,6 @@ macro_rules! interrupt_handler {
|
|||||||
}
|
}
|
||||||
interrupt_handler!{}
|
interrupt_handler!{}
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { //~ ERROR compilation successful
|
fn main() {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -8,12 +8,13 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
|
|
||||||
fn foo(_: &mut i32) -> bool { true }
|
fn foo(_: &mut i32) -> bool { true }
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { //~ ERROR compilation successful
|
fn main() {
|
||||||
let opt = Some(92);
|
let opt = Some(92);
|
||||||
let mut x = 62;
|
let mut x = 62;
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -7,13 +7,13 @@
|
|||||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
// skip-codegen
|
||||||
#![feature(rustc_attrs)]
|
// compile-pass
|
||||||
#![warn(unused)]
|
#![warn(unused)]
|
||||||
|
|
||||||
type Z = for<'x> Send;
|
type Z = for<'x> Send;
|
||||||
//~^ WARN type alias is never used
|
//~^ WARN type alias is never used
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() { //~ ERROR compilation successful
|
fn main() {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,12 +11,3 @@ LL | #![warn(unused)]
|
|||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
= note: #[warn(dead_code)] implied by #[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
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,10 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(associated_consts, rustc_attrs)]
|
// compile-pass
|
||||||
|
// skip-codegen
|
||||||
|
#![feature(associated_consts)]
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
|
||||||
trait MyTrait {
|
trait MyTrait {
|
||||||
const MY_CONST: &'static str;
|
const MY_CONST: &'static str;
|
||||||
}
|
}
|
||||||
@@ -27,5 +28,5 @@ macro_rules! my_macro {
|
|||||||
|
|
||||||
my_macro!();
|
my_macro!();
|
||||||
|
|
||||||
#[rustc_error]
|
|
||||||
fn main() {} //~ ERROR compilation successful
|
fn main() {}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user