diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-10-02 13:13:53 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-10-02 13:13:53 +0100 |
commit | 6574a6f448e3315343c8db497b5e68033ed4d603 (patch) | |
tree | d4e01a4cefa3d15fb8e393abf3082b2418867fcb /crates/hir_ty/src/autoderef.rs | |
parent | d8e5265309cf92857c996d4f55372e3b431468bf (diff) | |
parent | 97f2905dec269891eb81a75cf0d639408a3f7268 (diff) |
Merge #5988
5988: Postfix completions for fmt-like string literals r=matklad a=popzxc
This pull request adds a bunch of new postfix completions for `format`-like string literls.
For example, `"{32} {some_var:?}".println` will expand to `println!("{} {:?}", 32, some_var)`.
Postfix completions were added for most common format-like macros:
- `println` -> `println!(...)`
- `fmt` -> `format!(...)`
- `panic` -> `panic!(...)`
- `log` macros:
+ `logi` -> `log::info!(...)`
+ `logw` -> `log::warn!(...)`
+ `loge` -> `log::error!(...)`
+ `logt` -> `log::trace!(...)`
+ `logd` -> `log::debug!(...)`
![fmt_postfix](https://user-images.githubusercontent.com/12111581/92998650-a048af80-f523-11ea-8fd8-410146de8caa.gif)
Co-authored-by: Igor Aleksanov <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/autoderef.rs')
0 files changed, 0 insertions, 0 deletions