aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2019-12-24 11:52:48 +0000
committerEdwin Cheng <[email protected]>2019-12-24 12:30:39 +0000
commitd0537cda9eb55e7a596a0cf05e0c1423e8c430a8 (patch)
tree20e5cb8aaf4ce29b27951c9795ded6411a3a5529
parent0edb5b4a501a66baa7db8ececf46135e6246f4de (diff)
Formatting
-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