diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-02-29 02:16:21 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-29 02:16:21 +0100 |
| commit | c8db7dcc1cd91366dda9bea92e38b5d215ede1f1 (patch) | |
| tree | 30b13312973df647f11481151c9fc7bea077479a /src/librustc_parse/parser | |
| parent | ba2df27525ab535aa600cd25fda4aa7f0f13a2aa (diff) | |
| parent | 1622b6ef7372c40381914facf8794d851fcd9eb1 (diff) | |
| download | rust-c8db7dcc1cd91366dda9bea92e38b5d215ede1f1.tar.gz rust-c8db7dcc1cd91366dda9bea92e38b5d215ede1f1.zip | |
Rollup merge of #69551 - matthiaskrgr:len_zero, r=Mark-Simulacrum
use is_empty() instead of len() == x to determine if structs are empty.
Diffstat (limited to 'src/librustc_parse/parser')
| -rw-r--r-- | src/librustc_parse/parser/path.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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", |
