diff options
| author | jumbatm <jumbatm@gmail.com> | 2020-02-02 09:47:58 +1000 |
|---|---|---|
| committer | jumbatm <jumbatm@gmail.com> | 2020-02-11 19:49:01 +1000 |
| commit | d246385122ffd7dd6cc5c490b7e648f58c2ff7fd (patch) | |
| tree | a5047dc08e4a896995c406d8fbeff527a38e8290 /src/librustc_parse | |
| parent | 0634a5007306f3951ec28c0b9986452a91eebda8 (diff) | |
| download | rust-d246385122ffd7dd6cc5c490b7e648f58c2ff7fd.tar.gz rust-d246385122ffd7dd6cc5c490b7e648f58c2ff7fd.zip | |
Run RustFmt
Diffstat (limited to 'src/librustc_parse')
| -rw-r--r-- | src/librustc_parse/config.rs | 6 | ||||
| -rw-r--r-- | src/librustc_parse/parser/mod.rs | 4 | ||||
| -rw-r--r-- | src/librustc_parse/validate_attr.rs | 10 |
3 files changed, 14 insertions, 6 deletions
diff --git a/src/librustc_parse/config.rs b/src/librustc_parse/config.rs index cd935a37f7d..8dec64c579e 100644 --- a/src/librustc_parse/config.rs +++ b/src/librustc_parse/config.rs @@ -317,9 +317,9 @@ impl<'a> StripUnconfigured<'a> { Ok(r) => return Some(r), Err(mut e) => { e.help(&format!("the valid syntax is `{}`", CFG_ATTR_GRAMMAR_HELP)) - .note(CFG_ATTR_NOTE_REF) - .emit(); - }, + .note(CFG_ATTR_NOTE_REF) + .emit(); + } } } _ => self.error_malformed_cfg_attr_missing(attr.span), diff --git a/src/librustc_parse/parser/mod.rs b/src/librustc_parse/parser/mod.rs index ba97f3feb80..21a738c7f7b 100644 --- a/src/librustc_parse/parser/mod.rs +++ b/src/librustc_parse/parser/mod.rs @@ -1407,6 +1407,8 @@ pub fn emit_unclosed_delims(unclosed_delims: &mut Vec<UnmatchedBrace>, sess: &Pa *sess.reached_eof.borrow_mut() |= unclosed_delims.iter().any(|unmatched_delim| unmatched_delim.found_delim.is_none()); for unmatched in unclosed_delims.drain(..) { - make_unclosed_delims_error(unmatched, sess).map(|mut e| { e.emit(); }); + make_unclosed_delims_error(unmatched, sess).map(|mut e| { + e.emit(); + }); } } diff --git a/src/librustc_parse/validate_attr.rs b/src/librustc_parse/validate_attr.rs index f6d5da68be3..f5e47608d58 100644 --- a/src/librustc_parse/validate_attr.rs +++ b/src/librustc_parse/validate_attr.rs @@ -27,7 +27,11 @@ pub fn check_meta(sess: &ParseSess, attr: &Attribute) { _ => { if let MacArgs::Eq(..) = attr.get_normal_item().args { // All key-value attributes are restricted to meta-item syntax. - parse_meta(sess, attr).map_err(|mut err| { err.emit(); }).ok(); + parse_meta(sess, attr) + .map_err(|mut err| { + err.emit(); + }) + .ok(); } } } @@ -152,6 +156,8 @@ pub fn check_builtin_attribute( } } } - Err(mut err) => { err.emit(); }, + Err(mut err) => { + err.emit(); + } } } |
