aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_hir_def/src/data.rs2
-rw-r--r--crates/ra_hir_def/src/path.rs5
2 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/data.rs b/crates/ra_hir_def/src/data.rs
index 0a282f31b..a1b31c411 100644
--- a/crates/ra_hir_def/src/data.rs
+++ b/crates/ra_hir_def/src/data.rs
@@ -80,9 +80,7 @@ impl FunctionData {
80 80
81fn desugar_future_path(orig: TypeRef) -> Path { 81fn desugar_future_path(orig: TypeRef) -> Path {
82 let path = path![std::future::Future]; 82 let path = path![std::future::Future];
83
84 let mut generic_args: Vec<_> = std::iter::repeat(None).take(path.segments.len() - 1).collect(); 83 let mut generic_args: Vec<_> = std::iter::repeat(None).take(path.segments.len() - 1).collect();
85
86 let mut last = GenericArgs::empty(); 84 let mut last = GenericArgs::empty();
87 last.bindings.push((name![Output], orig)); 85 last.bindings.push((name![Output], orig));
88 generic_args.push(Some(Arc::new(last))); 86 generic_args.push(Some(Arc::new(last)));
diff --git a/crates/ra_hir_def/src/path.rs b/crates/ra_hir_def/src/path.rs
index bf401df35..107d2d799 100644
--- a/crates/ra_hir_def/src/path.rs
+++ b/crates/ra_hir_def/src/path.rs
@@ -131,7 +131,10 @@ impl Path {
131 } 131 }
132 132
133 /// Converts a known mod path to `Path`. 133 /// Converts a known mod path to `Path`.
134 pub(crate) fn from_known_path(path: ModPath, generic_args: Vec<Option<Arc<GenericArgs>>>) -> Path { 134 pub(crate) fn from_known_path(
135 path: ModPath,
136 generic_args: Vec<Option<Arc<GenericArgs>>>,
137 ) -> Path {
135 Path { type_anchor: None, mod_path: path, generic_args } 138 Path { type_anchor: None, mod_path: path, generic_args }
136 } 139 }
137 140