Skip to content

Commit 789a15a

Browse files
committed
Auto merge of #57379 - petrochenkov:parsrecov, r=estebank
tests: Do not use `-Z parse-only`, continue compilation to test recovery Make tests closer to reality! The next step will be enabling `-Z continue-parse-after-error` by default and looking at the regressions. A few instances of `-Z parse-only` are kept when it's appropriate, see e.g `ui/impl-trait/impl-trait-plus-priority.rs`, which tests mostly semantically wrong code and would generate too much useless noise if allowed to continue.
2 parents d39dddf + 1f64f60 commit 789a15a

File tree

530 files changed

+749
-882
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

530 files changed

+749
-882
lines changed

src/etc/generate-keyword-tests.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717

1818
template = """
19-
// compile-flags: -Z parse-only
20-
2119
// This file was auto-generated using 'src/etc/generate-keyword-tests.py %s'
2220
2321
fn main() {

src/libsyntax/feature_gate.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1543,7 +1543,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
15431543

15441544
fn visit_item(&mut self, i: &'a ast::Item) {
15451545
match i.node {
1546-
ast::ItemKind::Static(..) |
15471546
ast::ItemKind::Const(_,_) => {
15481547
if i.ident.name == "_" {
15491548
gate_feature_post!(&self, underscore_const_names, i.span,
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// compile-flags: -Z parse-only
2-
31
fn main () {
42
((1, (2, 3)).1).1;
53
}

src/test/rustfix/tuple-float-index.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// compile-flags: -Z parse-only
2-
31
fn main () {
42
(1, (2, 3)).1.1;
53
}

src/test/ui/mod/mod_file_disambig.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// compile-flags: -Z parse-only
2-
31
mod mod_file_disambig_aux; //~ ERROR file for module `mod_file_disambig_aux` found at both
42

53
fn main() {

src/test/ui/mod/mod_file_disambig.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0584]: file for module `mod_file_disambig_aux` found at both mod_file_disambig_aux.rs and mod_file_disambig_aux/mod.rs
2-
--> $DIR/mod_file_disambig.rs:3:5
2+
--> $DIR/mod_file_disambig.rs:1:5
33
|
44
LL | mod mod_file_disambig_aux; //~ ERROR file for module `mod_file_disambig_aux` found at both
55
| ^^^^^^^^^^^^^^^^^^^^^

src/test/ui/mut/mut-ref.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// compile-flags: -Z parse-only
2-
31
fn main() {
42
let mut ref x = 10; //~ ERROR the order of `mut` and `ref` is incorrect
53
let ref mut y = 11;

src/test/ui/mut/mut-ref.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: the order of `mut` and `ref` is incorrect
2-
--> $DIR/mut-ref.rs:4:9
2+
--> $DIR/mut-ref.rs:2:9
33
|
44
LL | let mut ref x = 10; //~ ERROR the order of `mut` and `ref` is incorrect
55
| ^^^^^^^ help: try switching the order: `ref mut`

src/test/ui/parser/ascii-only-character-escape.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: -Z parse-only -Z continue-parse-after-error
1+
// compile-flags: -Z continue-parse-after-error
22

33
fn main() {
44
let x = "\x80"; //~ ERROR may only be used

src/test/ui/parser/assoc-oddities-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// compile-flags: -Z parse-only
22

3-
fn that_odd_parse() {
3+
fn main() {
44
// following lines below parse and must not fail
55
x = if c { a } else { b }();
66
x = if true { 1 } else { 0 } as *mut _;

0 commit comments

Comments
 (0)