diff options
| author | Josh Stone <jistone@redhat.com> | 2020-04-24 13:58:41 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2020-04-24 13:58:41 -0700 |
| commit | 2325c209257a8ce6c11200ebfc152907566f7a04 (patch) | |
| tree | 3e7bb1afc2faee329bb27557bbb13a72f804f544 /src/librustc_parse/parser | |
| parent | 3360cc3a0ea33c84d0b0b1163107b1c1acbf2a69 (diff) | |
Avoid unused Option::map results
These are changes that would be needed if we add `#[must_use]` to `Option::map`, per #71484.
Diffstat (limited to 'src/librustc_parse/parser')
| -rw-r--r-- | src/librustc_parse/parser/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_parse/parser/mod.rs b/src/librustc_parse/parser/mod.rs index b987813e38d..9264fc8a735 100644 --- a/src/librustc_parse/parser/mod.rs +++ b/src/librustc_parse/parser/mod.rs @@ -1206,8 +1206,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| { + if let Some(mut e) = make_unclosed_delims_error(unmatched, sess) { e.emit(); - }); + } } } |
