| commit | 8f8ef0384b7539276cb14cda78e60be5d2c6cebb | [log] [tgz] |
|---|---|---|
| author | A4-Tacks <wdsjxhno1001@163.com> | Fri Sep 05 06:30:28 2025 +0800 |
| committer | A4-Tacks <wdsjxhno1001@163.com> | Fri Sep 05 06:30:28 2025 +0800 |
| tree | 8578143bf91eeb8442cda10b3e1fd05b36f59a77 | |
| parent | 1f4e5e82ff426cf49311c059263a53b010a8908b [diff] |
Fix precedence parenthesis for replace_arith_op
Example
---
```rust
fn main() {
let x = 1*x $0+ 2;
}
```
**Before this PR**:
```rust
fn main() {
let x = 1*x.wrapping_add(2);
}
```
**After this PR**:
```rust
fn main() {
let x = (1*x).wrapping_add(2);
}
```
rust-analyzer is a modular compiler frontend for the Rust language. It is a part of a larger rls-2.0 effort to create excellent IDE support for Rust.
https://rust-analyzer.github.io/book/installation.html
If you want to contribute to rust-analyzer check out the CONTRIBUTING.md or if you are just curious about how things work under the hood, see the Contributing section of the manual.
If you want to use rust-analyzer's language server with your editor of choice, check the manual. It also contains some tips & tricks to help you be more productive when using rust-analyzer.
See the security and privacy sections of the manual.
For usage and troubleshooting requests, please use “IDEs and Editors” category of the Rust forum:
https://users.rust-lang.org/c/ide/14
For questions about development and implementation, join rust-analyzer working group on Zulip:
https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer
rust-analyzer is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.