about summary refs log tree commit diff
path: root/library/std/src/sys/windows/stack_overflow_uwp.rs
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2022-02-07 14:08:31 +0000
committerGitHub <noreply@github.com>2022-02-07 14:08:31 +0000
commit557d300e1b8b3faabcf0611d0c452a52dd69f3d2 (patch)
treed05f5ce7a927a42df07e7a41294eee97823a7487 /library/std/src/sys/windows/stack_overflow_uwp.rs
parentaee13fb7c50faba1db567736c1b17cbc4716c74d (diff)
parent82a012299dcf6fefc107cbb7036465fe94ec1e2d (diff)
downloadrust-557d300e1b8b3faabcf0611d0c452a52dd69f3d2.tar.gz
rust-557d300e1b8b3faabcf0611d0c452a52dd69f3d2.zip
Rollup merge of #91530 - bobrippling:suggest-1-tuple-parens, r=camelid
Suggest 1-tuple parentheses on exprs without existing parens

A follow-on from #86116, split out from #90677.

This alters the suggestion to add a trailing comma to create a 1-tuple - previously we would only apply this if the relevant expression was parenthesised. We now make the suggestion regardless of parentheses, which reduces the fragility of the check (w.r.t formatting).

e.g.
```rust
let a: Option<(i32,)> = Some(3);
```

gets the below suggestion:

```rust
let a: Option<(i32,)> = Some((3,));
//                           ^ ^^
```

This change also improves the suggestion in other ways, such as by only making the suggestion if the types would match after the suggestion is applied and making the suggestion a multipart suggestion.
Diffstat (limited to 'library/std/src/sys/windows/stack_overflow_uwp.rs')
0 files changed, 0 insertions, 0 deletions