mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
compiletest: Remove skip-codegen
This commit is contained in:
parent
8e8fba1b3b
commit
932ea64175
@ -1,6 +1,6 @@
|
|||||||
// revisions:cfail1 cfail2
|
// revisions:cfail1 cfail2
|
||||||
|
// check-pass
|
||||||
// compile-flags: --crate-type cdylib
|
// compile-flags: --crate-type cdylib
|
||||||
// skip-codegen
|
|
||||||
|
|
||||||
#![deny(unused_attributes)]
|
#![deny(unused_attributes)]
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// check-pass
|
||||||
// ignore-android
|
// ignore-android
|
||||||
// ignore-arm
|
// ignore-arm
|
||||||
// ignore-aarch64
|
// ignore-aarch64
|
||||||
@ -11,14 +12,11 @@
|
|||||||
// ignore-mips
|
// ignore-mips
|
||||||
// ignore-mips64
|
// ignore-mips64
|
||||||
|
|
||||||
// compile-pass
|
|
||||||
// skip-codegen
|
|
||||||
#![feature(asm)]
|
#![feature(asm)]
|
||||||
#![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"))]
|
||||||
pub fn main() {
|
fn main() {
|
||||||
// assignment not dead
|
// assignment not dead
|
||||||
let mut x: isize = 0;
|
let mut x: isize = 0;
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
warning: unrecognized option
|
warning: unrecognized option
|
||||||
--> $DIR/asm-misplaced-option.rs:26:64
|
--> $DIR/asm-misplaced-option.rs:24:64
|
||||||
|
|
|
|
||||||
LL | asm!("mov $1, $0" : "=r"(x) : "r"(5_usize), "0"(x) : : "cc");
|
LL | asm!("mov $1, $0" : "=r"(x) : "r"(5_usize), "0"(x) : : "cc");
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
||||||
warning: expected a clobber, found an option
|
warning: expected a clobber, found an option
|
||||||
--> $DIR/asm-misplaced-option.rs:33:80
|
--> $DIR/asm-misplaced-option.rs:31:80
|
||||||
|
|
|
|
||||||
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");
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![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)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn colon_or_space(s: &str) -> ParseResult<&str> {
|
pub fn colon_or_space(s: &str) -> ParseResult<&str> {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
@ -20,10 +20,9 @@ pub fn parse<'a, I>(mut s: &str, items: I) -> ParseResult<()>
|
|||||||
macro_rules! try_consume {
|
macro_rules! try_consume {
|
||||||
($e:expr) => ({ let (s_, v) = try!($e); s = s_; v })
|
($e:expr) => ({ let (s_, v) = try!($e); s = s_; v })
|
||||||
}
|
}
|
||||||
let offset = try_consume!(timezone_offset_zulu(s.trim_left(), colon_or_space));
|
let offset = try_consume!(timezone_offset_zulu(s.trim_start(), colon_or_space));
|
||||||
let offset = try_consume!(timezone_offset_zulu(s.trim_left(), colon_or_space));
|
let offset = try_consume!(timezone_offset_zulu(s.trim_start(), colon_or_space));
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn main() {}
|
||||||
fn main() { }
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// compile-pass
|
|
||||||
// skip-codegen
|
|
||||||
#![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).
|
||||||
|
|
||||||
|
// check-pass
|
||||||
|
|
||||||
pub struct SplitWhitespace<'a> {
|
pub struct SplitWhitespace<'a> {
|
||||||
x: &'a u8
|
x: &'a u8
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
|
// check-pass
|
||||||
// compile-flags: --cap-lints warn
|
// compile-flags: --cap-lints warn
|
||||||
|
|
||||||
#![warn(unused)]
|
#![warn(unused)]
|
||||||
#![deny(warnings)]
|
#![deny(warnings)]
|
||||||
// compile-pass
|
|
||||||
// skip-codegen
|
|
||||||
use std::option; //~ WARN
|
use std::option; //~ WARN
|
||||||
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -5,7 +5,7 @@ LL | use std::option;
|
|||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
note: lint level defined here
|
note: lint level defined here
|
||||||
--> $DIR/bad-lint-cap3.rs:4:9
|
--> $DIR/bad-lint-cap3.rs:5:9
|
||||||
|
|
|
|
||||||
LL | #![deny(warnings)]
|
LL | #![deny(warnings)]
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
// compile-pass
|
// Here we do not get a coherence conflict because `Baz: Iterator`
|
||||||
// skip-codegen
|
// does not hold and (due to the orphan rules), we can rely on that.
|
||||||
|
|
||||||
|
// check-pass
|
||||||
// revisions: old re
|
// revisions: old re
|
||||||
|
|
||||||
#![cfg_attr(re, feature(re_rebalance_coherence))]
|
#![cfg_attr(re, feature(re_rebalance_coherence))]
|
||||||
#![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.
|
|
||||||
|
|
||||||
pub trait Foo<P> {}
|
pub trait Foo<P> {}
|
||||||
|
|
||||||
@ -18,5 +17,4 @@ impl Foo<i32> for Baz { }
|
|||||||
|
|
||||||
impl<A:Iterator> Foo<A::Item> for A { }
|
impl<A:Iterator> Foo<A::Item> for A { }
|
||||||
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
// revisions: old re
|
// revisions: old re
|
||||||
|
|
||||||
#![cfg_attr(re, feature(re_rebalance_coherence))]
|
#![cfg_attr(re, feature(re_rebalance_coherence))]
|
||||||
|
|
||||||
pub trait Foo<P> {}
|
pub trait Foo<P> {}
|
||||||
|
|
||||||
pub trait Bar {
|
pub trait Bar {
|
||||||
@ -17,5 +17,4 @@ impl Bar for i32 {
|
|||||||
type Output = u32;
|
type Output = u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
// Test that we are able to introduce a negative constraint that
|
// Test that we are able to introduce a negative constraint that
|
||||||
// `MyType: !MyTrait` along with other "fundamental" wrappers.
|
// `MyType: !MyTrait` along with other "fundamental" wrappers.
|
||||||
|
|
||||||
|
// check-pass
|
||||||
// aux-build:coherence_copy_like_lib.rs
|
// aux-build:coherence_copy_like_lib.rs
|
||||||
// compile-pass
|
|
||||||
// skip-codegen
|
|
||||||
// revisions: old re
|
// revisions: old re
|
||||||
|
|
||||||
#![cfg_attr(re, feature(re_rebalance_coherence))]
|
#![cfg_attr(re, feature(re_rebalance_coherence))]
|
||||||
#![allow(dead_code)]
|
|
||||||
|
|
||||||
extern crate coherence_copy_like_lib as lib;
|
extern crate coherence_copy_like_lib as lib;
|
||||||
|
|
||||||
@ -23,5 +21,4 @@ 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> { }
|
||||||
|
|
||||||
|
|
||||||
fn main() { }
|
fn main() { }
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
// Test that we are able to introduce a negative constraint that
|
// Test that we are able to introduce a negative constraint that
|
||||||
// `MyType: !MyTrait` along with other "fundamental" wrappers.
|
// `MyType: !MyTrait` along with other "fundamental" wrappers.
|
||||||
|
|
||||||
|
// check-pass
|
||||||
// aux-build:coherence_copy_like_lib.rs
|
// aux-build:coherence_copy_like_lib.rs
|
||||||
// compile-pass
|
|
||||||
// skip-codegen
|
|
||||||
// revisions: old re
|
// revisions: old re
|
||||||
|
|
||||||
#![cfg_attr(re, feature(re_rebalance_coherence))]
|
#![cfg_attr(re, feature(re_rebalance_coherence))]
|
||||||
#![allow(dead_code)]
|
|
||||||
|
|
||||||
extern crate coherence_copy_like_lib as lib;
|
extern crate coherence_copy_like_lib as lib;
|
||||||
|
|
||||||
@ -22,5 +20,4 @@ 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>> { }
|
||||||
|
|
||||||
|
fn main() {}
|
||||||
fn main() { }
|
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
// Test that we are able to introduce a negative constraint that
|
// Test that we are able to introduce a negative constraint that
|
||||||
// `MyType: !MyTrait` along with other "fundamental" wrappers.
|
// `MyType: !MyTrait` along with other "fundamental" wrappers.
|
||||||
|
|
||||||
|
// check-pass
|
||||||
// aux-build:coherence_copy_like_lib.rs
|
// aux-build:coherence_copy_like_lib.rs
|
||||||
// compile-pass
|
|
||||||
// skip-codegen
|
|
||||||
// revisions: old re
|
// revisions: old re
|
||||||
|
|
||||||
#![cfg_attr(re, feature(re_rebalance_coherence))]
|
#![cfg_attr(re, feature(re_rebalance_coherence))]
|
||||||
#![allow(dead_code)]
|
|
||||||
|
|
||||||
extern crate coherence_copy_like_lib as lib;
|
extern crate coherence_copy_like_lib as lib;
|
||||||
|
|
||||||
@ -16,5 +14,4 @@ struct MyType { x: i32 }
|
|||||||
// naturally, legal
|
// naturally, legal
|
||||||
impl lib::MyCopy for MyType { }
|
impl lib::MyCopy for MyType { }
|
||||||
|
|
||||||
|
|
||||||
fn main() { }
|
fn main() { }
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
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,15 +1,12 @@
|
|||||||
// Test use of const fn from another crate without a feature gate.
|
// Test use of const fn from another crate without a feature gate.
|
||||||
|
|
||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![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;
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let x = foo(); // use outside a constant is ok
|
let x = foo(); // use outside a constant is ok
|
||||||
}
|
}
|
||||||
|
@ -30,8 +30,9 @@
|
|||||||
// 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.
|
||||||
|
|
||||||
|
// check-pass
|
||||||
|
|
||||||
#![warn(unused_attributes, unknown_lints)]
|
#![warn(unused_attributes, unknown_lints)]
|
||||||
#![allow(stable_features)]
|
|
||||||
|
|
||||||
// UNGATED WHITE-LISTED BUILT-IN ATTRIBUTES
|
// UNGATED WHITE-LISTED BUILT-IN ATTRIBUTES
|
||||||
|
|
||||||
@ -75,7 +76,7 @@
|
|||||||
// see issue-43106-gating-of-stable.rs
|
// see issue-43106-gating-of-stable.rs
|
||||||
// see issue-43106-gating-of-unstable.rs
|
// see issue-43106-gating-of-unstable.rs
|
||||||
// see issue-43106-gating-of-deprecated.rs
|
// see issue-43106-gating-of-deprecated.rs
|
||||||
#![windows_subsystem = "1000"]
|
#![windows_subsystem = "windows"]
|
||||||
|
|
||||||
// UNGATED CRATE-LEVEL BUILT-IN ATTRIBUTES
|
// UNGATED CRATE-LEVEL BUILT-IN ATTRIBUTES
|
||||||
|
|
||||||
@ -539,7 +540,7 @@ mod export_name {
|
|||||||
#[export_name = "2200"] impl S { }
|
#[export_name = "2200"] impl S { }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note that this test has a `skip-codegen`, so it
|
// Note that this is a `check-pass` test, 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).
|
||||||
@ -611,17 +612,17 @@ mod must_use {
|
|||||||
#[must_use] impl S { }
|
#[must_use] impl S { }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[windows_subsystem = "1000"]
|
#[windows_subsystem = "windows"]
|
||||||
mod windows_subsystem {
|
mod windows_subsystem {
|
||||||
mod inner { #![windows_subsystem="1000"] }
|
mod inner { #![windows_subsystem="windows"] }
|
||||||
|
|
||||||
#[windows_subsystem = "1000"] fn f() { }
|
#[windows_subsystem = "windows"] fn f() { }
|
||||||
|
|
||||||
#[windows_subsystem = "1000"] struct S;
|
#[windows_subsystem = "windows"] struct S;
|
||||||
|
|
||||||
#[windows_subsystem = "1000"] type T = S;
|
#[windows_subsystem = "windows"] type T = S;
|
||||||
|
|
||||||
#[windows_subsystem = "1000"] impl S { }
|
#[windows_subsystem = "windows"] impl S { }
|
||||||
}
|
}
|
||||||
|
|
||||||
// BROKEN USES OF CRATE-LEVEL BUILT-IN ATTRIBUTES
|
// BROKEN USES OF CRATE-LEVEL BUILT-IN ATTRIBUTES
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -5,8 +5,7 @@
|
|||||||
//
|
//
|
||||||
// (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)
|
||||||
|
|
||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
|
|
||||||
#![deprecated]
|
#![deprecated]
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
mod foo {
|
mod foo {
|
||||||
pub use bar::*;
|
pub use bar::*;
|
||||||
pub use main as f;
|
pub use main as f;
|
||||||
@ -15,5 +15,4 @@ mod baz {
|
|||||||
pub use super::*;
|
pub use super::*;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pub fn main() {}
|
pub fn main() {}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
|
// check-pass
|
||||||
// ignore-pretty pretty-printing is unhygienic
|
// ignore-pretty pretty-printing is unhygienic
|
||||||
|
|
||||||
#![feature(decl_macro, associated_type_defaults)]
|
#![feature(decl_macro, associated_type_defaults)]
|
||||||
// compile-pass
|
|
||||||
// skip-codegen
|
|
||||||
trait Base {
|
trait Base {
|
||||||
type AssocTy;
|
type AssocTy;
|
||||||
fn f();
|
fn f();
|
||||||
@ -35,5 +35,4 @@ macro mac() {
|
|||||||
|
|
||||||
mac!();
|
mac!();
|
||||||
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![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 {} {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
|
// check-pass
|
||||||
// aux-build:import_crate_var.rs
|
// aux-build:import_crate_var.rs
|
||||||
|
|
||||||
// compile-pass
|
|
||||||
// skip-codegen
|
|
||||||
#[macro_use] extern crate import_crate_var;
|
#[macro_use] extern crate import_crate_var;
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
m!();
|
m!();
|
||||||
//~^ WARN `$crate` may not be imported
|
//~^ WARN `$crate` may not be imported
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
warning: `$crate` may not be imported
|
warning: `$crate` may not be imported
|
||||||
--> $DIR/import-crate-var.rs:9:5
|
--> $DIR/import-crate-var.rs:7:5
|
||||||
|
|
|
|
||||||
LL | m!();
|
LL | m!();
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![allow(warnings)]
|
|
||||||
struct Attr {
|
struct Attr {
|
||||||
name: String,
|
name: String,
|
||||||
value: String,
|
value: String,
|
||||||
@ -21,7 +20,6 @@ impl Element {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
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,10 +1,9 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
fn cb<'a,T>(_x: Box<dyn Fn((&'a i32, &'a (Vec<&'static i32>, bool))) -> T>) -> T {
|
fn cb<'a,T>(_x: Box<dyn Fn((&'a i32, &'a (Vec<&'static i32>, bool))) -> T>) -> T {
|
||||||
panic!()
|
panic!()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
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,9 +1,6 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![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 }
|
||||||
|
|
||||||
|
fn main() {}
|
||||||
fn main() {
|
|
||||||
}
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// check-pass
|
// check-pass
|
||||||
|
|
||||||
#![feature(unboxed_closures, fn_traits)]
|
#![feature(unboxed_closures, fn_traits)]
|
||||||
|
|
||||||
struct Foo;
|
struct Foo;
|
||||||
|
|
||||||
impl<A> FnOnce<(A,)> for Foo {
|
impl<A> FnOnce<(A,)> for Foo {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![feature(unboxed_closures, fn_traits)]
|
#![feature(unboxed_closures, fn_traits)]
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let k = |x: i32| { x + 1 };
|
let k = |x: i32| { x + 1 };
|
||||||
Fn::call(&k, (0,));
|
Fn::call(&k, (0,));
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![allow(warnings)]
|
|
||||||
struct CNFParser {
|
struct CNFParser {
|
||||||
token: char,
|
token: char,
|
||||||
}
|
}
|
||||||
@ -14,12 +13,11 @@ impl CNFParser {
|
|||||||
self.consume_while(&(CNFParser::is_whitespace))
|
self.consume_while(&(CNFParser::is_whitespace))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn consume_while(&mut self, p: &Fn(char) -> bool) {
|
fn consume_while(&mut self, p: &dyn Fn(char) -> bool) {
|
||||||
while p(self.token) {
|
while p(self.token) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
mod a {
|
mod a {
|
||||||
pub mod b { pub struct Foo; }
|
pub mod b { pub struct Foo; }
|
||||||
|
|
||||||
@ -11,7 +11,6 @@ mod a {
|
|||||||
pub use self::c::*;
|
pub use self::c::*;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
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,6 +1,5 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![allow(warnings)]
|
|
||||||
trait Mirror {
|
trait Mirror {
|
||||||
type It;
|
type It;
|
||||||
}
|
}
|
||||||
@ -9,8 +8,6 @@ impl<T> Mirror for T {
|
|||||||
type It = Self;
|
type It = Self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
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,10 +1,8 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![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 {}
|
||||||
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
|
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
@ -17,5 +16,4 @@ 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 {}
|
||||||
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![deny(non_snake_case)]
|
|
||||||
#[no_mangle]
|
|
||||||
pub extern "C" fn SparklingGenerationForeignFunctionInterface() {}
|
|
||||||
|
|
||||||
|
#![deny(non_snake_case)]
|
||||||
|
|
||||||
|
#[no_mangle]
|
||||||
|
pub extern "C" fn SparklingGenerationForeignFunctionInterface() {} // OK
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![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; }
|
||||||
@ -15,5 +14,4 @@ mod baz {
|
|||||||
pub use self::bar::*;
|
pub use self::bar::*;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![allow(warnings)]
|
|
||||||
|
|
||||||
mod foo {
|
mod foo {
|
||||||
pub fn bar() {}
|
pub fn bar() {}
|
||||||
@ -21,5 +19,4 @@ mod b {
|
|||||||
pub use a::bar;
|
pub use a::bar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
|
|
||||||
pub use bar::*;
|
pub use bar::*;
|
||||||
mod bar {
|
mod bar {
|
||||||
@ -11,5 +10,4 @@ mod baz {
|
|||||||
pub use main as f;
|
pub use main as f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pub fn main() {}
|
pub fn main() {}
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![allow(warnings)]
|
|
||||||
|
|
||||||
macro_rules! foo { () => {
|
macro_rules! foo { () => {
|
||||||
let x = 1;
|
let x = 1;
|
||||||
@ -22,7 +20,6 @@ macro_rules! baz {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
foo! {};
|
foo! {};
|
||||||
bar! {};
|
bar! {};
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
@ -7,7 +6,6 @@ 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!() }
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let t: &(u8, dyn fmt::Debug) = any();
|
let t: &(u8, dyn fmt::Debug) = any();
|
||||||
println!("{:?}", &t.1);
|
println!("{:?}", &t.1);
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
|
|
||||||
macro_rules! m {
|
macro_rules! m {
|
||||||
() => { #[cfg(any())] fn f() {} }
|
() => { #[cfg(any())] fn f() {} }
|
||||||
@ -8,5 +7,4 @@ macro_rules! m {
|
|||||||
trait T {}
|
trait T {}
|
||||||
impl T for () { m!(); }
|
impl T for () { m!(); }
|
||||||
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
// compile-pass
|
// check-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 } }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
apply_null!(#[cfg(all())] fn f() {});
|
apply_null!(#[cfg(all())] fn f() {});
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![allow(unused)]
|
|
||||||
|
|
||||||
macro_rules! make_item {
|
macro_rules! make_item {
|
||||||
() => { fn f() {} }
|
() => { fn f() {} }
|
||||||
@ -18,5 +16,4 @@ fn g() {
|
|||||||
make_stmt! {}
|
make_stmt! {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![allow(dead_code)]
|
|
||||||
|
|
||||||
trait RegularExpression: Sized {
|
trait RegularExpression: Sized {
|
||||||
type Text;
|
type Text;
|
||||||
@ -18,5 +16,4 @@ enum FindCapturesInner<'r, 't> {
|
|||||||
Dynamic(FindCaptures<'t, ExecNoSyncStr<'r>>),
|
Dynamic(FindCaptures<'t, ExecNoSyncStr<'r>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
|
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
||||||
@ -25,7 +24,6 @@ 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) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
takes_lifetime(foo);
|
takes_lifetime(foo);
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
// Unnecessary path disambiguator is ok
|
// Unnecessary path disambiguator is ok
|
||||||
|
|
||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![allow(unused)]
|
|
||||||
macro_rules! m {
|
macro_rules! m {
|
||||||
($p: path) => {
|
($p: path) => {
|
||||||
let _ = $p(0);
|
let _ = $p(0);
|
||||||
@ -23,5 +22,4 @@ fn f() {
|
|||||||
m!(S::<u8>);
|
m!(S::<u8>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
|
|
||||||
fn _test() -> impl Default { }
|
fn _test() -> impl Default { }
|
||||||
|
|
||||||
|
fn main() {}
|
||||||
fn main() { }
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
|
|
||||||
pub trait Foo {
|
pub trait Foo {
|
||||||
type Bar;
|
type Bar;
|
||||||
@ -17,7 +16,6 @@ impl<T> Broken for T {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let _m: &dyn Broken<Assoc=()> = &();
|
let _m: &dyn Broken<Assoc=()> = &();
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![feature(associated_type_defaults)]
|
#![feature(associated_type_defaults)]
|
||||||
#![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>;
|
||||||
@ -15,6 +15,4 @@ impl State for StateMachineEnded {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn main() {}
|
||||||
fn main() {
|
|
||||||
}
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
// check-pass
|
||||||
// ignore-emscripten
|
// ignore-emscripten
|
||||||
// compile-pass
|
|
||||||
// skip-codegen
|
|
||||||
#![feature(asm)]
|
#![feature(asm)]
|
||||||
|
|
||||||
macro_rules! interrupt_handler {
|
macro_rules! interrupt_handler {
|
||||||
@ -12,6 +12,4 @@ macro_rules! interrupt_handler {
|
|||||||
}
|
}
|
||||||
interrupt_handler!{}
|
interrupt_handler!{}
|
||||||
|
|
||||||
|
fn main() {}
|
||||||
fn main() {
|
|
||||||
}
|
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
|
|
||||||
fn foo(_: &mut i32) -> bool { true }
|
fn foo(_: &mut i32) -> bool { true }
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let opt = Some(92);
|
let opt = Some(92);
|
||||||
let mut x = 62;
|
let mut x = 62;
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![feature(associated_consts)]
|
|
||||||
#![allow(warnings)]
|
|
||||||
trait MyTrait {
|
trait MyTrait {
|
||||||
const MY_CONST: &'static str;
|
const MY_CONST: &'static str;
|
||||||
}
|
}
|
||||||
@ -18,5 +16,4 @@ macro_rules! my_macro {
|
|||||||
|
|
||||||
my_macro!();
|
my_macro!();
|
||||||
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
|
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let _x: fn(&i32) -> <&i32 as Deref>::Target = unimplemented!();
|
let _x: fn(&i32) -> <&i32 as Deref>::Target = unimplemented!();
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![allow(warnings)]
|
|
||||||
|
|
||||||
enum E {
|
enum E {
|
||||||
A = {
|
A = {
|
||||||
@ -9,5 +7,4 @@ enum E {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
// Basic test for free regions in the NLL code. This test does not
|
// Basic test for free regions in the NLL code. This test does not
|
||||||
// report an error because of the (implied) bound that `'b: 'a`.
|
// report an error because of the (implied) bound that `'b: 'a`.
|
||||||
|
|
||||||
|
// check-pass
|
||||||
// compile-flags:-Zborrowck=mir -Zverbose
|
// compile-flags:-Zborrowck=mir -Zverbose
|
||||||
// compile-pass
|
|
||||||
// skip-codegen
|
|
||||||
|
|
||||||
fn foo<'a, 'b>(x: &'a &'b u32) -> &'a u32 {
|
fn foo<'a, 'b>(x: &'a &'b u32) -> &'a u32 {
|
||||||
&**x
|
&**x
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() { }
|
fn main() {}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![deny(unreachable_patterns)]
|
#![deny(unreachable_patterns)]
|
||||||
#![feature(exhaustive_patterns)]
|
#![feature(exhaustive_patterns)]
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// compile-pass
|
// check-pass
|
||||||
// skip-codegen
|
|
||||||
#![deny(unreachable_patterns)]
|
#![deny(unreachable_patterns)]
|
||||||
#![feature(exhaustive_patterns)]
|
#![feature(exhaustive_patterns)]
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
|
@ -539,13 +539,10 @@ impl TestProps {
|
|||||||
let pass_mode = if config.parse_name_directive(ln, "check-pass") {
|
let pass_mode = if config.parse_name_directive(ln, "check-pass") {
|
||||||
check_no_run("check-pass");
|
check_no_run("check-pass");
|
||||||
Some(PassMode::Check)
|
Some(PassMode::Check)
|
||||||
} else if config.parse_name_directive(ln, "skip-codegen") {
|
|
||||||
check_no_run("skip-codegen");
|
|
||||||
Some(PassMode::Check)
|
|
||||||
} else if config.parse_name_directive(ln, "build-pass") {
|
} else if config.parse_name_directive(ln, "build-pass") {
|
||||||
check_no_run("build-pass");
|
check_no_run("build-pass");
|
||||||
Some(PassMode::Build)
|
Some(PassMode::Build)
|
||||||
} else if config.parse_name_directive(ln, "compile-pass") {
|
} else if config.parse_name_directive(ln, "compile-pass") /* compatibility */ {
|
||||||
check_no_run("compile-pass");
|
check_no_run("compile-pass");
|
||||||
Some(PassMode::Build)
|
Some(PassMode::Build)
|
||||||
} else if config.parse_name_directive(ln, "run-pass") {
|
} else if config.parse_name_directive(ln, "run-pass") {
|
||||||
@ -558,7 +555,6 @@ impl TestProps {
|
|||||||
};
|
};
|
||||||
match (self.pass_mode, pass_mode) {
|
match (self.pass_mode, pass_mode) {
|
||||||
(None, Some(_)) => self.pass_mode = pass_mode,
|
(None, Some(_)) => self.pass_mode = pass_mode,
|
||||||
(Some(_), Some(pm)) if pm == PassMode::Check => self.pass_mode = pass_mode,
|
|
||||||
(Some(_), Some(_)) => panic!("multiple `*-pass` headers in a single test"),
|
(Some(_), Some(_)) => panic!("multiple `*-pass` headers in a single test"),
|
||||||
(_, None) => {}
|
(_, None) => {}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user