diff options
author | Florian Diebold <[email protected]> | 2019-11-01 10:53:29 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-11-01 18:57:08 +0000 |
commit | dc4066ebed57d43068035f574244e3abd18ee67f (patch) | |
tree | c9edad2b461e71f0c9372d4f6554481bd3312cce /crates | |
parent | 77c26c2bf111314cc3be7ef100b6318a698c8089 (diff) |
Add some doc comments
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_hir/src/ty/method_resolution.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/method_resolution.rs b/crates/ra_hir/src/ty/method_resolution.rs index 9caff422f..8d682bb18 100644 --- a/crates/ra_hir/src/ty/method_resolution.rs +++ b/crates/ra_hir/src/ty/method_resolution.rs | |||
@@ -175,9 +175,15 @@ pub(crate) fn lookup_method( | |||
175 | }) | 175 | }) |
176 | } | 176 | } |
177 | 177 | ||
178 | /// Whether we're looking up a dotted method call (like `v.len()`) or a path | ||
179 | /// (like `Vec::new`). | ||
178 | #[derive(Copy, Clone, Debug, PartialEq, Eq)] | 180 | #[derive(Copy, Clone, Debug, PartialEq, Eq)] |
179 | pub enum LookupMode { | 181 | pub enum LookupMode { |
182 | /// Looking up a method call like `v.len()`: We only consider candidates | ||
183 | /// that have a `self` parameter, and do autoderef. | ||
180 | MethodCall, | 184 | MethodCall, |
185 | /// Looking up a path like `Vec::new` or `Vec::default`: We consider all | ||
186 | /// candidates including associated constants, but don't do autoderef. | ||
181 | Path, | 187 | Path, |
182 | } | 188 | } |
183 | 189 | ||