aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/data.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/data.rs')
-rw-r--r--crates/ra_hir_def/src/data.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/data.rs b/crates/ra_hir_def/src/data.rs
index 5dfde75d9..ccb682f9a 100644
--- a/crates/ra_hir_def/src/data.rs
+++ b/crates/ra_hir_def/src/data.rs
@@ -16,7 +16,7 @@ use ra_syntax::ast::{
16use crate::{ 16use crate::{
17 attr::Attrs, 17 attr::Attrs,
18 db::DefDatabase, 18 db::DefDatabase,
19 path::{path, GenericArgs, Path}, 19 path::{path, AssociatedTypeBinding, GenericArgs, Path},
20 src::HasSource, 20 src::HasSource,
21 type_ref::{Mutability, TypeBound, TypeRef}, 21 type_ref::{Mutability, TypeBound, TypeRef},
22 visibility::RawVisibility, 22 visibility::RawVisibility,
@@ -96,7 +96,11 @@ fn desugar_future_path(orig: TypeRef) -> Path {
96 let path = path![std::future::Future]; 96 let path = path![std::future::Future];
97 let mut generic_args: Vec<_> = std::iter::repeat(None).take(path.segments.len() - 1).collect(); 97 let mut generic_args: Vec<_> = std::iter::repeat(None).take(path.segments.len() - 1).collect();
98 let mut last = GenericArgs::empty(); 98 let mut last = GenericArgs::empty();
99 last.bindings.push((name![Output], orig)); 99 last.bindings.push(AssociatedTypeBinding {
100 name: name![Output],
101 type_ref: Some(orig),
102 bounds: Vec::new(),
103 });
100 generic_args.push(Some(Arc::new(last))); 104 generic_args.push(Some(Arc::new(last)));
101 105
102 Path::from_known_path(path, generic_args) 106 Path::from_known_path(path, generic_args)