Collect generic arguments in associated type bindings

This commit is contained in:
Ryo Yoshida 2022-10-26 22:52:04 +09:00
parent f233ac447f
commit 63cba43b48
No known key found for this signature in database
GPG key ID: E25698A930586171
5 changed files with 44 additions and 31 deletions

View file

@ -662,8 +662,12 @@ fn desugar_future_path(orig: TypeRef) -> Path {
let mut generic_args: Vec<_> =
std::iter::repeat(None).take(path.segments().len() - 1).collect();
let mut last = GenericArgs::empty();
let binding =
AssociatedTypeBinding { name: name![Output], type_ref: Some(orig), bounds: Vec::new() };
let binding = AssociatedTypeBinding {
name: name![Output],
args: None,
type_ref: Some(orig),
bounds: Vec::new(),
};
last.bindings.push(binding);
generic_args.push(Some(Interned::new(last)));