diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-02-17 01:24:25 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-17 01:24:25 +0000 |
commit | b3c848ee286ddb643fb2d857060cd618a7dc25a7 (patch) | |
tree | e8873ede9e5579085b59dfa716d23438b3f54efc /crates/syntax/test_data/lexer/ok/0006_chars.txt | |
parent | 94f56ebccf2e558c178d2d73161fe78803b6f3e2 (diff) | |
parent | e0eb80eaee9451fa91e16333f31e5b049179b483 (diff) |
Merge #7703
7703: Allow comments between newlines in chaining hints r=Veykril a=unratito
Currently, chaining hints are not generated if there are comments between newlines, which is a very common pattern:
```rust
let vec = (0..10)
// Multiply by 2
.map(|x| x * 2)
// Add 3
.map(|x| x + 3)
.collect::<Vec<i32>>();
```
Besides, it seems a bit weird that this piece of code generates a chaining hint:
```rust
let vec = (0..10)
.collect::<Vec<i32>>();
```
But this one doesn't:
```rust
let vec = (0..10)
// This is a comment
.collect::<Vec<i32>>();
```
Co-authored-by: Paco SoberĂ³n <[email protected]>
Diffstat (limited to 'crates/syntax/test_data/lexer/ok/0006_chars.txt')
0 files changed, 0 insertions, 0 deletions