diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-01-03 00:40:30 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-03 00:40:30 +0000 |
| commit | d89a4f0e93562a4bdf8d93abd87200731cbf731b (patch) | |
| tree | 87da0ad2c8d2b69da70acaafbf846a6243b17e06 /src/test/codegen/src-hash-algorithm | |
| parent | df3d3d8a74e9c4780cec9f6a2bd687406dade8af (diff) | |
| parent | 03291db8013b3ad75b610669538c0c8cf6639d14 (diff) | |
| download | rust-d89a4f0e93562a4bdf8d93abd87200731cbf731b.tar.gz rust-d89a4f0e93562a4bdf8d93abd87200731cbf731b.zip | |
Merge #11173
11173: Allow adding partially resolved types r=Veykril a=SomeoneToIgnore Sometimes when writing something like `let foo = Arc::new(Mutex::new(CrazyGenerics::new(HashMap::new())))`, I want/have to specify an explicit type for the expression. Using turbofish isn't very readable and not always appreciated by guidelines, so `let foo: T` has to be filled. To ease that, the PR enables the `add_explicit_type` assist on types that contain unknown types and some generics. Fully unresolved types, arrays with unknown types and other known cases behave the same. `_` placeholder was chosen to replace an unknown type: ```rust let foo = HashMap::new(); // after assist usage, turns into let foo: HashMap<_, _> = HashMap::new(); ``` Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions
