Deny associated type bindings within associated type bindings
This commit is contained in:
parent
57ee5cf5a9
commit
ca2e0bb51a
9 changed files with 82 additions and 5 deletions
|
@ -595,7 +595,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
|||
"create_substs_for_associated_item(span: {:?}, item_def_id: {:?}, item_segment: {:?}",
|
||||
span, item_def_id, item_segment
|
||||
);
|
||||
self.create_substs_for_ast_path(
|
||||
let (args, _) = self.create_substs_for_ast_path(
|
||||
span,
|
||||
item_def_id,
|
||||
parent_substs,
|
||||
|
@ -603,8 +603,14 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
|||
item_segment.args(),
|
||||
item_segment.infer_args,
|
||||
None,
|
||||
)
|
||||
.0
|
||||
);
|
||||
|
||||
let assoc_bindings = self.create_assoc_bindings_for_generic_args(item_segment.args());
|
||||
if let Some(b) = assoc_bindings.first() {
|
||||
Self::prohibit_assoc_ty_binding(self.tcx(), b.span);
|
||||
}
|
||||
|
||||
args
|
||||
}
|
||||
|
||||
/// Instantiates the path for the given trait reference, assuming that it's
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue