use std::ops::ControlFlow;
use crate::ty::{
- AliasTy, Const, ConstKind, DefIdTree, FallibleTypeFolder, InferConst, InferTy, Opaque,
- PolyTraitPredicate, Projection, Ty, TyCtxt, TypeFoldable, TypeSuperFoldable,
- TypeSuperVisitable, TypeVisitable, TypeVisitor,
+ AliasTy, Const, ConstKind, FallibleTypeFolder, InferConst, InferTy, Opaque, PolyTraitPredicate,
+ Projection, Ty, TyCtxt, TypeFoldable, TypeSuperFoldable, TypeSuperVisitable, TypeVisitable,
+ TypeVisitor,
};
use rustc_data_structures::fx::FxHashMap;
}
let param_name = trait_pred.skip_binder().self_ty().to_string();
- let mut constraint = trait_pred.print_modifiers_and_trait_path().to_string();
+ let mut constraint = trait_pred.to_string();
if let Some((name, term)) = associated_ty {
// FIXME: this case overlaps with code in TyCtxt::note_and_explain_type_err.
this requirement",
if generics.where_clause_span.is_empty() { "introducing a" } else { "extending the" },
),
- format!("{} {}: {}", generics.add_where_or_trailing_comma(), param_name, constraint),
+ format!("{} {constraint}", generics.add_where_or_trailing_comma()),
Applicability::MaybeIncorrect,
);
true