Add must-compile-successfully comment to appropriate ui tests.

This commit is contained in:
Tommy Ip 2017-12-10 19:14:01 +00:00
parent 81b8db2180
commit 76d9b309ae
33 changed files with 44 additions and 0 deletions

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// must-compile-successfully
#![feature(exclusive_range_pattern)]
#![warn(unreachable_patterns)]

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// must-compile-successfully
fn main() {
let s = "ZͨA͑ͦ͒͋ͤ͑̚L̄͑͋Ĝͨͥ̿͒̽̈́Oͥ͛ͭ!̏"; while true { break; }
println!("{}", s);

View File

@ -9,3 +9,4 @@
// except according to those terms.
// compile-flags: --explain E0591
// must-compile-successfully

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// must-compile-successfully
// Test that compiling hello world succeeds with no output of any kind.
fn main() {

View File

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags: -A bad-style
// must-compile-successfully
fn main() {
let _InappropriateCamelCasing = true;

View File

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags: -W bad-style
// must-compile-successfully
fn main() {
let _InappropriateCamelCasing = true;

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// must-compile-successfully
// this tests the `unknown_lint` lint, especially the suggestions
// the suggestion only appears if a lint with the lowercase name exists

View File

@ -14,6 +14,8 @@
// suggestions to use `crate` given when it is on). When that feature becomes
// stable, this test can be deleted.
// must-compile-successfully
#![feature(macro_vis_matcher)]
#![allow(unused)]

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// must-compile-successfully
#![feature(crate_visibility_modifier)]
#![feature(macro_vis_matcher)]

View File

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags: --error-format pretty-json -Zunstable-options
// must-compile-successfully
// The output for humans should just highlight the whole span without showing
// the suggested replacement, but we also want to test that suggested

View File

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags: -Z trace-macros
// must-compile-successfully
fn main() {
println!("Hello, World!");

View File

@ -28,6 +28,7 @@
// requirement, as you can see from the `#[rustc_regions]` output.
// compile-flags:-Znll -Zborrowck=mir -Zverbose
// must-compile-successfully
#![feature(rustc_attrs)]

View File

@ -17,6 +17,7 @@
// these errors are not (yet) reported.
// compile-flags:-Znll -Zborrowck=mir -Zverbose
// must-compile-successfully
#![feature(rustc_attrs)]

View File

@ -18,6 +18,7 @@
// these errors are not (yet) reported.
// compile-flags:-Znll -Zborrowck=mir -Zverbose
// must-compile-successfully
#![feature(rustc_attrs)]

View File

@ -16,6 +16,7 @@
// anonymous regions as well.
// compile-flags:-Znll -Zborrowck=mir -Zverbose
// must-compile-successfully
#![feature(rustc_attrs)]

View File

@ -14,6 +14,7 @@
// regions is erased.
// compile-flags:-Znll -Zborrowck=mir -Zverbose
// must-compile-successfully
#![feature(rustc_attrs)]

View File

@ -9,6 +9,7 @@
// except according to those terms.
//compile-flags: -Z emit-end-regions -Zborrowck=mir -Z nll
// must-compile-successfully
#![allow(warnings)]

View File

@ -12,6 +12,7 @@
#![allow(dead_code)]
// compile-flags: -Z print-fuel=foo
// must-compile-successfully
struct S1(u8, u16, u8);
struct S2(u8, u16, u8);

View File

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags: -Z print-type-sizes
// must-compile-successfully
// All of the types that occur in this function are uninteresting, in
// that one cannot control the sizes of these types with the same sort

View File

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags: -Z print-type-sizes
// must-compile-successfully
// This file illustrates how generics are handled: types have to be
// monomorphized, in the MIR of the original function in which they

View File

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags: -Z print-type-sizes
// must-compile-successfully
// This file illustrates that when multiple structural types occur in
// a function, every one of them is included in the output.

View File

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags: -Z print-type-sizes
// must-compile-successfully
// This file illustrates how niche-filling enums are handled,
// modelled after cases like `Option<&u32>`, `Option<bool>` and such.

View File

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags: -Z print-type-sizes
// must-compile-successfully
// This file illustrates that when the same type occurs repeatedly
// (even if multiple functions), it is only printed once in the

View File

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags: -Z print-type-sizes
// must-compile-successfully
// This file illustrates how packing is handled; it should cause
// the elimination of padding that would normally be introduced

View File

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags: -Z print-type-sizes
// must-compile-successfully
// This file illustrates how padding is handled: alignment
// requirements can lead to the introduction of padding, either before

View File

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags: -Z print-type-sizes
// must-compile-successfully
// This file illustrates how padding is handled: alignment
// requirements can lead to the introduction of padding, either before

View File

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags: -Z print-type-sizes
// must-compile-successfully
#![feature(never_type)]

View File

@ -9,6 +9,7 @@
// except according to those terms.
// compile-flags: -Z print-type-sizes
// must-compile-successfully
// This file illustrates two things:
//

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// must-compile-successfully
#![allow(unused_variables)]
#![allow(dead_code)]
#![deny(unreachable_code)]

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// must-compile-successfully
#![allow(unused_variables)]
#![allow(dead_code)]
#![deny(unreachable_code)]

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// must-compile-successfully
#![feature(fn_must_use)]
#![warn(unused_must_use)]

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// must-compile-successfully
#![warn(unused)]
macro_rules! m {

View File

@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// must-compile-successfully
#![warn(unused)]
use std::cmp::{Eq, Ord, min, PartialEq, PartialOrd};