use super::ty::{AllowPlus, RecoverQPath};
use super::{Parser, TokenType};
use crate::maybe_whole;
+use rustc_ast::ast::{
+ self, AngleBracketedArgs, Ident, ParenthesizedArgs, Path, PathSegment, QSelf,
+};
+use rustc_ast::ast::{
+ AnonConst, AssocTyConstraint, AssocTyConstraintKind, BlockCheckMode, GenericArg,
+};
+use rustc_ast::token::{self, Token};
use rustc_errors::{pluralize, Applicability, PResult};
use rustc_span::source_map::{BytePos, Span};
use rustc_span::symbol::{kw, sym};
-use syntax::ast::{self, AngleBracketedArgs, Ident, ParenthesizedArgs, Path, PathSegment, QSelf};
-use syntax::ast::{
- AnonConst, AssocTyConstraint, AssocTyConstraintKind, BlockCheckMode, GenericArg,
-};
-use syntax::token::{self, Token};
use log::debug;
use std::mem;
// 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_token.span),
"associated type bindings must be declared after generic parameters",