Skip to content

Commit 76d9b30

Browse files
committed
Add must-compile-successfully comment to appropriate ui tests.
1 parent 81b8db2 commit 76d9b30

33 files changed

+44
-0
lines changed

src/test/ui/check_match/issue-43253.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// must-compile-successfully
12+
1113
#![feature(exclusive_range_pattern)]
1214
#![warn(unreachable_patterns)]
1315

src/test/ui/codemap_tests/unicode_3.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// must-compile-successfully
12+
1113
fn main() {
1214
let s = "ZͨA͑ͦ͒͋ͤ͑̚L̄͑͋Ĝͨͥ̿͒̽̈́Oͥ͛ͭ!̏"; while true { break; }
1315
println!("{}", s);

src/test/ui/explain.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
// except according to those terms.
1010

1111
// compile-flags: --explain E0591
12+
// must-compile-successfully

src/test/ui/hello_world/main.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// must-compile-successfully
12+
1113
// Test that compiling hello world succeeds with no output of any kind.
1214

1315
fn main() {

src/test/ui/lint/command-line-lint-group-allow.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// compile-flags: -A bad-style
12+
// must-compile-successfully
1213

1314
fn main() {
1415
let _InappropriateCamelCasing = true;

src/test/ui/lint/command-line-lint-group-warn.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// compile-flags: -W bad-style
12+
// must-compile-successfully
1213

1314
fn main() {
1415
let _InappropriateCamelCasing = true;

src/test/ui/lint/not_found.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// must-compile-successfully
12+
1113
// this tests the `unknown_lint` lint, especially the suggestions
1214

1315
// the suggestion only appears if a lint with the lowercase name exists

src/test/ui/lint/unreachable_pub-pub_crate.rs

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
// suggestions to use `crate` given when it is on). When that feature becomes
1515
// stable, this test can be deleted.
1616

17+
// must-compile-successfully
18+
1719
#![feature(macro_vis_matcher)]
1820

1921
#![allow(unused)]

src/test/ui/lint/unreachable_pub.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// must-compile-successfully
12+
1113
#![feature(crate_visibility_modifier)]
1214
#![feature(macro_vis_matcher)]
1315

src/test/ui/lint/unused_parens_json_suggestion.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// compile-flags: --error-format pretty-json -Zunstable-options
12+
// must-compile-successfully
1213

1314
// The output for humans should just highlight the whole span without showing
1415
// the suggested replacement, but we also want to test that suggested

src/test/ui/macros/trace-macro.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// compile-flags: -Z trace-macros
12+
// must-compile-successfully
1213

1314
fn main() {
1415
println!("Hello, World!");

src/test/ui/nll/closure-requirements/propagate-approximated-ref.rs

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
// requirement, as you can see from the `#[rustc_regions]` output.
2929

3030
// compile-flags:-Znll -Zborrowck=mir -Zverbose
31+
// must-compile-successfully
3132

3233
#![feature(rustc_attrs)]
3334

src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// these errors are not (yet) reported.
1818

1919
// compile-flags:-Znll -Zborrowck=mir -Zverbose
20+
// must-compile-successfully
2021

2122
#![feature(rustc_attrs)]
2223

src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
// these errors are not (yet) reported.
1919

2020
// compile-flags:-Znll -Zborrowck=mir -Zverbose
21+
// must-compile-successfully
2122

2223
#![feature(rustc_attrs)]
2324

src/test/ui/nll/closure-requirements/propagate-approximated-val.rs

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// anonymous regions as well.
1717

1818
// compile-flags:-Znll -Zborrowck=mir -Zverbose
19+
// must-compile-successfully
1920

2021
#![feature(rustc_attrs)]
2122

src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.rs

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// regions is erased.
1515

1616
// compile-flags:-Znll -Zborrowck=mir -Zverbose
17+
// must-compile-successfully
1718

1819
#![feature(rustc_attrs)]
1920

src/test/ui/nll/maybe-initialized-drop-uninitialized.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
//compile-flags: -Z emit-end-regions -Zborrowck=mir -Z nll
12+
// must-compile-successfully
1213

1314
#![allow(warnings)]
1415

src/test/ui/print-fuel/print-fuel.rs

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#![allow(dead_code)]
1313

1414
// compile-flags: -Z print-fuel=foo
15+
// must-compile-successfully
1516

1617
struct S1(u8, u16, u8);
1718
struct S2(u8, u16, u8);

src/test/ui/print_type_sizes/anonymous.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// compile-flags: -Z print-type-sizes
12+
// must-compile-successfully
1213

1314
// All of the types that occur in this function are uninteresting, in
1415
// that one cannot control the sizes of these types with the same sort

src/test/ui/print_type_sizes/generics.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// compile-flags: -Z print-type-sizes
12+
// must-compile-successfully
1213

1314
// This file illustrates how generics are handled: types have to be
1415
// monomorphized, in the MIR of the original function in which they

src/test/ui/print_type_sizes/multiple_types.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// compile-flags: -Z print-type-sizes
12+
// must-compile-successfully
1213

1314
// This file illustrates that when multiple structural types occur in
1415
// a function, every one of them is included in the output.

src/test/ui/print_type_sizes/niche-filling.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// compile-flags: -Z print-type-sizes
12+
// must-compile-successfully
1213

1314
// This file illustrates how niche-filling enums are handled,
1415
// modelled after cases like `Option<&u32>`, `Option<bool>` and such.

src/test/ui/print_type_sizes/no_duplicates.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// compile-flags: -Z print-type-sizes
12+
// must-compile-successfully
1213

1314
// This file illustrates that when the same type occurs repeatedly
1415
// (even if multiple functions), it is only printed once in the

src/test/ui/print_type_sizes/packed.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// compile-flags: -Z print-type-sizes
12+
// must-compile-successfully
1213

1314
// This file illustrates how packing is handled; it should cause
1415
// the elimination of padding that would normally be introduced

src/test/ui/print_type_sizes/padding.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// compile-flags: -Z print-type-sizes
12+
// must-compile-successfully
1213

1314
// This file illustrates how padding is handled: alignment
1415
// requirements can lead to the introduction of padding, either before

src/test/ui/print_type_sizes/repr-align.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// compile-flags: -Z print-type-sizes
12+
// must-compile-successfully
1213

1314
// This file illustrates how padding is handled: alignment
1415
// requirements can lead to the introduction of padding, either before

src/test/ui/print_type_sizes/uninhabited.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// compile-flags: -Z print-type-sizes
12+
// must-compile-successfully
1213

1314
#![feature(never_type)]
1415

src/test/ui/print_type_sizes/variants.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// compile-flags: -Z print-type-sizes
12+
// must-compile-successfully
1213

1314
// This file illustrates two things:
1415
//

src/test/ui/reachable/expr_andand.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// must-compile-successfully
12+
1113
#![allow(unused_variables)]
1214
#![allow(dead_code)]
1315
#![deny(unreachable_code)]

src/test/ui/reachable/expr_oror.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// must-compile-successfully
12+
1113
#![allow(unused_variables)]
1214
#![allow(dead_code)]
1315
#![deny(unreachable_code)]

src/test/ui/rfc_1940-must_use_on_functions/fn_must_use.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// must-compile-successfully
12+
1113
#![feature(fn_must_use)]
1214
#![warn(unused_must_use)]
1315

src/test/ui/span/macro-span-replacement.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// must-compile-successfully
12+
1113
#![warn(unused)]
1214

1315
macro_rules! m {

src/test/ui/span/multispan-import-lint.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// must-compile-successfully
12+
1113
#![warn(unused)]
1214

1315
use std::cmp::{Eq, Ord, min, PartialEq, PartialOrd};

0 commit comments

Comments
 (0)