diff --git a/src/expr.rs b/src/expr.rs index a694cc69ac6a..84f01f2a1a9f 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -1148,10 +1148,10 @@ pub(crate) fn is_simple_block( attrs: Option<&[ast::Attribute]>, source_map: &SourceMap, ) -> bool { - (block.stmts.len() == 1 + block.stmts.len() == 1 && stmt_is_expr(&block.stmts[0]) && !block_contains_comment(block, source_map) - && attrs.map_or(true, |a| a.is_empty())) + && attrs.map_or(true, |a| a.is_empty()) } /// Checks whether a block contains at most one statement or expression, and no diff --git a/src/items.rs b/src/items.rs index ed7b46c8e4f4..0316dc6f0c24 100644 --- a/src/items.rs +++ b/src/items.rs @@ -2585,7 +2585,7 @@ fn compute_budgets_for_params( ret_str_len: usize, fn_brace_style: FnBraceStyle, force_vertical_layout: bool, -) -> Option<((usize, usize, Indent))> { +) -> Option<(usize, usize, Indent)> { debug!( "compute_budgets_for_params {} {:?}, {}, {:?}", result.len(), diff --git a/src/modules.rs b/src/modules.rs index 92db42de13fe..e7a2e21179d4 100644 --- a/src/modules.rs +++ b/src/modules.rs @@ -2,7 +2,7 @@ use std::borrow::Cow; use std::collections::BTreeMap; use std::path::{Path, PathBuf}; -use rustc_errors::{Diagnostic, PResult}; +use rustc_errors::PResult; use rustc_parse::{new_sub_parser_from_file, parser, DirectoryOwnership}; use rustc_session::parse::ParseSess; use rustc_span::symbol::{sym, Symbol};