Rollup merge of #69460 - LeSeulArtichaut:move-compile-pass, r=RalfJung

Move some `build-pass` tests to `check-pass`

Helps with #62277.

r? @cramertj cc @Centril
This commit is contained in:
Yuki Okushi 2020-03-14 04:03:22 +09:00 committed by GitHub
commit 913a933202
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 23 additions and 20 deletions

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
pub trait Foo {
fn foo(self) -> u32;

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
fn main() {
const MIN: i8 = -5;

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
enum Foo {
A = 5,

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
#![feature(const_fn, rustc_attrs)]

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
use std::time::Duration;

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
#![feature(extern_types)]

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
pub trait Nullable {
const NULL: Self;

View File

@ -1,4 +1,7 @@
// build-pass (FIXME(62277): could be check-pass?)
// Regression test for #50356: Compiler panic when using repr(packed)
// associated constant in a match arm
// check-pass
#[derive(Copy, Clone, PartialEq, Eq)]
#[repr(packed)]
pub struct Num(u64);

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
struct S(pub &'static u32, pub u32);

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
pub struct Stats;

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
// https://github.com/rust-lang/rust/issues/51300
#[derive(PartialEq, Eq, Clone, Copy)]

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
macro_rules! m {
() => {{

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
pub const STATIC_TRAIT: &dyn Test = &();

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
// Test that we can handle newtypes wrapping extern types

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
// if `X` were used instead of `x`, `X - 10` would result in a lint.
// This file should never produce a lint, no matter how the const

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
pub fn main() {
let y: &'static mut [u8; 0] = &mut [];

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
#![warn(const_err)]
#![crate_type = "lib"]

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
#![warn(const_err)]
pub const Z: u32 = 0 - 1;

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
const PARSE_BOOL: Option<&'static str> = None;
static FOO: (Option<&str>, u32) = (PARSE_BOOL, 42);

View File

@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
static ASSERT: () = [()][!(std::mem::size_of::<u32>() == 4) as usize];