diff options
Diffstat (limited to 'crates/ra_hir_def/src/data.rs')
-rw-r--r-- | crates/ra_hir_def/src/data.rs | 8 |
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 56a20c5bd..b3c91fea2 100644 --- a/crates/ra_hir_def/src/data.rs +++ b/crates/ra_hir_def/src/data.rs | |||
@@ -15,7 +15,7 @@ use ra_syntax::ast::{ | |||
15 | use crate::{ | 15 | use crate::{ |
16 | attr::Attrs, | 16 | attr::Attrs, |
17 | db::DefDatabase, | 17 | db::DefDatabase, |
18 | path::{path, GenericArgs, Path}, | 18 | path::{path, AssociatedTypeBinding, GenericArgs, Path}, |
19 | src::HasSource, | 19 | src::HasSource, |
20 | type_ref::{Mutability, TypeBound, TypeRef}, | 20 | type_ref::{Mutability, TypeBound, TypeRef}, |
21 | visibility::RawVisibility, | 21 | visibility::RawVisibility, |
@@ -95,7 +95,11 @@ fn desugar_future_path(orig: TypeRef) -> Path { | |||
95 | let path = path![std::future::Future]; | 95 | let path = path![std::future::Future]; |
96 | let mut generic_args: Vec<_> = std::iter::repeat(None).take(path.segments.len() - 1).collect(); | 96 | let mut generic_args: Vec<_> = std::iter::repeat(None).take(path.segments.len() - 1).collect(); |
97 | let mut last = GenericArgs::empty(); | 97 | let mut last = GenericArgs::empty(); |
98 | last.bindings.push((name![Output], orig)); | 98 | last.bindings.push(AssociatedTypeBinding { |
99 | name: name![Output], | ||
100 | type_ref: Some(orig), | ||
101 | bounds: Vec::new(), | ||
102 | }); | ||
99 | generic_args.push(Some(Arc::new(last))); | 103 | generic_args.push(Some(Arc::new(last))); |
100 | 104 | ||
101 | Path::from_known_path(path, generic_args) | 105 | Path::from_known_path(path, generic_args) |