Skip to content

Commit 14ff2f5

Browse files
committed
Auto merge of #62080 - Centril:rollup-1wmgoy8, r=Centril
Rollup of 5 pull requests Successful merges: - #61778 (compiletest: Introduce `// {check,build,run}-pass` pass modes) - #62037 (Speed up tidy) - #62052 (submodules: Update clippy from 5a11ed7 to c5d1ecd) - #62070 (Run rustfmt on some libsyntax files) - #62075 (Remove `ast::Guard`) Failed merges: r? @ghost
2 parents 5d677b2 + a8b4d1d commit 14ff2f5

File tree

91 files changed

+850
-896
lines changed

Some content is hidden

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

91 files changed

+850
-896
lines changed

Cargo.lock

+2
Original file line numberDiff line numberDiff line change
@@ -3801,9 +3801,11 @@ dependencies = [
38013801
name = "tidy"
38023802
version = "0.1.0"
38033803
dependencies = [
3804+
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
38043805
"regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
38053806
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
38063807
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
3808+
"walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
38073809
]
38083810

38093811
[[package]]

src/bootstrap/test.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -709,8 +709,8 @@ impl Step for Tidy {
709709
if !builder.config.vendor {
710710
cmd.arg("--no-vendor");
711711
}
712-
if !builder.config.verbose_tests {
713-
cmd.arg("--quiet");
712+
if builder.is_verbose() {
713+
cmd.arg("--verbose");
714714
}
715715

716716
let _folder = builder.fold_output(|| "tidy");

src/librustc/hir/lowering.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,7 @@ impl<'a> LoweringContext<'a> {
13821382
attrs: self.lower_attrs(&arm.attrs),
13831383
pats: arm.pats.iter().map(|x| self.lower_pat(x)).collect(),
13841384
guard: match arm.guard {
1385-
Some(Guard::If(ref x)) => Some(hir::Guard::If(P(self.lower_expr(x)))),
1385+
Some(ref x) => Some(hir::Guard::If(P(self.lower_expr(x)))),
13861386
_ => None,
13871387
},
13881388
body: P(self.lower_expr(&arm.body)),

src/librustc_resolve/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3055,7 +3055,7 @@ impl<'a> Resolver<'a> {
30553055

30563056
self.resolve_pats(&arm.pats, PatternSource::Match);
30573057

3058-
if let Some(ast::Guard::If(ref expr)) = arm.guard {
3058+
if let Some(ref expr) = arm.guard {
30593059
self.visit_expr(expr)
30603060
}
30613061
self.visit_expr(&arm.body);

src/librustc_save_analysis/dump_visitor.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1609,9 +1609,8 @@ impl<'l, 'tcx, 'll, O: DumpOutput + 'll> Visitor<'l> for DumpVisitor<'l, 'tcx, '
16091609

16101610
fn visit_arm(&mut self, arm: &'l ast::Arm) {
16111611
self.process_var_decl_multi(&arm.pats);
1612-
match arm.guard {
1613-
Some(ast::Guard::If(ref expr)) => self.visit_expr(expr),
1614-
_ => {}
1612+
if let Some(expr) = &arm.guard {
1613+
self.visit_expr(expr);
16151614
}
16161615
self.visit_expr(&arm.body);
16171616
}

src/libsyntax/ast.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -893,16 +893,11 @@ pub struct Local {
893893
pub struct Arm {
894894
pub attrs: Vec<Attribute>,
895895
pub pats: Vec<P<Pat>>,
896-
pub guard: Option<Guard>,
896+
pub guard: Option<P<Expr>>,
897897
pub body: P<Expr>,
898898
pub span: Span,
899899
}
900900

901-
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
902-
pub enum Guard {
903-
If(P<Expr>),
904-
}
905-
906901
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
907902
pub struct Field {
908903
pub ident: Ident,

0 commit comments

Comments
 (0)