insert span_fatal call in ast lowering to indicate that generic arguments in AssocTyConstraints haven't been fully implemented

This commit is contained in:
b-naber 2020-11-19 18:32:52 +01:00 committed by b-naber
parent 823dbb38e4
commit 37d103f3cf

View File

@ -1038,6 +1038,13 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
) -> hir::TypeBinding<'hir> { ) -> hir::TypeBinding<'hir> {
debug!("lower_assoc_ty_constraint(constraint={:?}, itctx={:?})", constraint, itctx); debug!("lower_assoc_ty_constraint(constraint={:?}, itctx={:?})", constraint, itctx);
if let Some(ref gen_args) = constraint.gen_args {
self.sess.span_fatal(
gen_args.span(),
"generic associated types in trait paths are currently not implemented",
);
}
let kind = match constraint.kind { let kind = match constraint.kind {
AssocTyConstraintKind::Equality { ref ty } => { AssocTyConstraintKind::Equality { ref ty } => {
hir::TypeBindingKind::Equality { ty: self.lower_ty(ty, itctx) } hir::TypeBindingKind::Equality { ty: self.lower_ty(ty, itctx) }