diff options
| author | bors <bors@rust-lang.org> | 2020-02-29 10:43:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-02-29 10:43:32 +0000 |
| commit | 3f9bddc7fea3ca1d49f39f22bb937a84ed32f84e (patch) | |
| tree | f832b09e3ffce6a55b209ef234a99c06742d18eb /src/librustc_parse/parser | |
| parent | 04e7f96dd89b1f0ad615dff1c85d11d4c4c64cb4 (diff) | |
| parent | bbfec7ca41887af04abb4510677c4539a95f03a2 (diff) | |
| download | rust-3f9bddc7fea3ca1d49f39f22bb937a84ed32f84e.tar.gz rust-3f9bddc7fea3ca1d49f39f22bb937a84ed32f84e.zip | |
Auto merge of #69570 - Dylan-DPC:rollup-d6boczt, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - #69477 (docs: add mention of async blocks in move keyword docs) - #69504 (Use assert_ne in hash tests) - #69546 (use to_vec() instead of .iter().cloned().collect() to convert slices to vecs.) - #69551 (use is_empty() instead of len() == x to determine if structs are empty.) - #69563 (Fix no_std detection for target triples) - #69567 (use .to_string() instead of format!() macro to create strings) Failed merges: r? @ghost
Diffstat (limited to 'src/librustc_parse/parser')
| -rw-r--r-- | src/librustc_parse/parser/pat.rs | 2 | ||||
| -rw-r--r-- | src/librustc_parse/parser/path.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_parse/parser/pat.rs b/src/librustc_parse/parser/pat.rs index 520d325f16b..4dc2f775173 100644 --- a/src/librustc_parse/parser/pat.rs +++ b/src/librustc_parse/parser/pat.rs @@ -216,7 +216,7 @@ impl<'a> Parser<'a> { .span_suggestion( seq_span, "...or a vertical bar to match on multiple alternatives", - format!("{}", seq_snippet.replace(",", " |")), + seq_snippet.replace(",", " |"), Applicability::MachineApplicable, ); } diff --git a/src/librustc_parse/parser/path.rs b/src/librustc_parse/parser/path.rs index f3a61ad4419..1db920625e3 100644 --- a/src/librustc_parse/parser/path.rs +++ b/src/librustc_parse/parser/path.rs @@ -469,7 +469,7 @@ impl<'a> Parser<'a> { // FIXME: we would like to report this in ast_validation instead, but we currently do not // preserve ordering of generic parameters with respect to associated type binding, so we // lose that information after parsing. - if misplaced_assoc_ty_constraints.len() > 0 { + if !misplaced_assoc_ty_constraints.is_empty() { let mut err = self.struct_span_err( args_lo.to(self.prev_span), "associated type bindings must be declared after generic parameters", |
