about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-05-20 12:35:36 +0000
committerbors <bors@rust-lang.org>2022-05-20 12:35:36 +0000
commit41388bf81a3d5d877de9862657ed8437fc184b44 (patch)
tree9ab30251802ba3d519427c27197ecf0a7ab173af /src/test/codegen/src-hash-algorithm
parentf5229cebb23671ea1221a81646f757a87d1b339a (diff)
parent2b1c1a934c5f22a3e535e55f91a6b2c05394ab55 (diff)
downloadrust-41388bf81a3d5d877de9862657ed8437fc184b44.tar.gz
rust-41388bf81a3d5d877de9862657ed8437fc184b44.zip
Auto merge of #12263 - andylizi:hide-type-hint-closure, r=Veykril
feat: hide type inlay hints for initializations of closures

![hide_closure_initialization](https://user-images.githubusercontent.com/12008103/168470158-6cb77b18-068e-4431-a8b5-e2b22d50d263.gif)

This PR adds an option to hide the inlay hints for `let IDENT_PAT = CLOSURE_EXPR;`, which is a somewhat common coding pattern. Currently the inlay hints for the assigned variable and the closure expression itself are both displayed, making it rather repetitive.

In order to be consistent with closure return type hints, only closures with block bodies will be hid by this option.

Personally I'd feel comfortable making it always enabled (or at least when closure return type hints are enabled), but considering the precedent set in #10761, I introduced an off-by-default option for this.

changelog feature: option to hide type inlay hints for initializations of closures
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions