Skip to content

Commit

Permalink
insert span_fatal call in ast lowering to indicate that generic argum…
Browse files Browse the repository at this point in the history
…ents in AssocTyConstraints haven't been fully implemented
  • Loading branch information
b-naber authored and b-naber committed Nov 25, 2020
1 parent 823dbb3 commit 37d103f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions compiler/rustc_ast_lowering/src/lib.rs
Expand Up @@ -1038,6 +1038,13 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
) -> hir::TypeBinding<'hir> {
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 {
AssocTyConstraintKind::Equality { ref ty } => {
hir::TypeBindingKind::Equality { ty: self.lower_ty(ty, itctx) }
Expand Down

0 comments on commit 37d103f

Please sign in to comment.