Skip to content

Commit

Permalink
Auto merge of #62080 - Centril:rollup-1wmgoy8, r=Centril
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Jun 23, 2019
2 parents 5d677b2 + a8b4d1d commit 14ff2f5
Show file tree
Hide file tree
Showing 91 changed files with 850 additions and 896 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3801,9 +3801,11 @@ dependencies = [
name = "tidy"
version = "0.1.0"
dependencies = [
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
"walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,8 +709,8 @@ impl Step for Tidy {
if !builder.config.vendor {
cmd.arg("--no-vendor");
}
if !builder.config.verbose_tests {
cmd.arg("--quiet");
if builder.is_verbose() {
cmd.arg("--verbose");
}

let _folder = builder.fold_output(|| "tidy");
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/hir/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,7 @@ impl<'a> LoweringContext<'a> {
attrs: self.lower_attrs(&arm.attrs),
pats: arm.pats.iter().map(|x| self.lower_pat(x)).collect(),
guard: match arm.guard {
Some(Guard::If(ref x)) => Some(hir::Guard::If(P(self.lower_expr(x)))),
Some(ref x) => Some(hir::Guard::If(P(self.lower_expr(x)))),
_ => None,
},
body: P(self.lower_expr(&arm.body)),
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_resolve/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3055,7 +3055,7 @@ impl<'a> Resolver<'a> {

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

if let Some(ast::Guard::If(ref expr)) = arm.guard {
if let Some(ref expr) = arm.guard {
self.visit_expr(expr)
}
self.visit_expr(&arm.body);
Expand Down
5 changes: 2 additions & 3 deletions src/librustc_save_analysis/dump_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1609,9 +1609,8 @@ impl<'l, 'tcx, 'll, O: DumpOutput + 'll> Visitor<'l> for DumpVisitor<'l, 'tcx, '

fn visit_arm(&mut self, arm: &'l ast::Arm) {
self.process_var_decl_multi(&arm.pats);
match arm.guard {
Some(ast::Guard::If(ref expr)) => self.visit_expr(expr),
_ => {}
if let Some(expr) = &arm.guard {
self.visit_expr(expr);
}
self.visit_expr(&arm.body);
}
Expand Down
7 changes: 1 addition & 6 deletions src/libsyntax/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -893,16 +893,11 @@ pub struct Local {
pub struct Arm {
pub attrs: Vec<Attribute>,
pub pats: Vec<P<Pat>>,
pub guard: Option<Guard>,
pub guard: Option<P<Expr>>,
pub body: P<Expr>,
pub span: Span,
}

#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub enum Guard {
If(P<Expr>),
}

#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct Field {
pub ident: Ident,
Expand Down
Loading

0 comments on commit 14ff2f5

Please sign in to comment.