aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/path.rs
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2019-12-24 11:45:28 +0000
committerEdwin Cheng <[email protected]>2019-12-24 11:45:28 +0000
commit0edb5b4a501a66baa7db8ececf46135e6246f4de (patch)
treea65f9899f109d4df2c05069e037fe5dec0545d73 /crates/ra_hir_def/src/path.rs
parent60aa4d12f95477565d5b01f122d2c9dd845015b4 (diff)
Implement infer await from async func
Diffstat (limited to 'crates/ra_hir_def/src/path.rs')
-rw-r--r--crates/ra_hir_def/src/path.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_hir_def/src/path.rs b/crates/ra_hir_def/src/path.rs
index 8e1294201..bf401df35 100644
--- a/crates/ra_hir_def/src/path.rs
+++ b/crates/ra_hir_def/src/path.rs
@@ -130,6 +130,11 @@ impl Path {
130 Path { type_anchor: None, mod_path: name_ref.as_name().into(), generic_args: vec![None] } 130 Path { type_anchor: None, mod_path: name_ref.as_name().into(), generic_args: vec![None] }
131 } 131 }
132 132
133 /// Converts a known mod path to `Path`.
134 pub(crate) fn from_known_path(path: ModPath, generic_args: Vec<Option<Arc<GenericArgs>>>) -> Path {
135 Path { type_anchor: None, mod_path: path, generic_args }
136 }
137
133 pub fn kind(&self) -> &PathKind { 138 pub fn kind(&self) -> &PathKind {
134 &self.mod_path.kind 139 &self.mod_path.kind
135 } 140 }