diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-12-20 14:36:53 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-20 14:36:53 +0000 |
commit | d590f6ce12bf4d0311138846e26951b613f0afd4 (patch) | |
tree | d73816f61ccdaa2b9710ff5c7efbb3b62367c9c3 /crates/ra_hir_def/src | |
parent | 81a1b14d78d6078c63dd42c09da5a3e171c85a3a (diff) | |
parent | 76d688a328ab53b6264f9e489b88524377a7271d (diff) |
Merge #2592
2592: Add std::ops::Index support for infering r=edwin0cheng a=edwin0cheng
see also #2534
Seem like this can't fix #2534 for this case:
```rust
fn foo3(bar: [usize; 2]) {
let baz = bar[1]; // <--- baz is still unknown ?
println!("{}", baz);
}
```
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r-- | crates/ra_hir_def/src/path.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ra_hir_def/src/path.rs b/crates/ra_hir_def/src/path.rs index 7302cf0f1..00325cd99 100644 --- a/crates/ra_hir_def/src/path.rs +++ b/crates/ra_hir_def/src/path.rs | |||
@@ -257,6 +257,7 @@ macro_rules! __known_path { | |||
257 | (std::ops::Try) => {}; | 257 | (std::ops::Try) => {}; |
258 | (std::ops::Neg) => {}; | 258 | (std::ops::Neg) => {}; |
259 | (std::ops::Not) => {}; | 259 | (std::ops::Not) => {}; |
260 | (std::ops::Index) => {}; | ||
260 | ($path:path) => { | 261 | ($path:path) => { |
261 | compile_error!("Please register your known path in the path module") | 262 | compile_error!("Please register your known path in the path module") |
262 | }; | 263 | }; |