Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0650c40

Browse files
committedSep 21, 2022
Merge commit '7248d06384c6a90de58c04c1f46be88821278d8b' into sync-from-clippy
2 parents b79b7d8 + 7248d06 commit 0650c40

File tree

111 files changed

+1997
-1631
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+1997
-1631
lines changed
 

‎src/tools/clippy/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3800,6 +3800,7 @@ Released 2018-09-13
38003800
[`items_after_statements`]: https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
38013801
[`iter_cloned_collect`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect
38023802
[`iter_count`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_count
3803+
[`iter_kv_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map
38033804
[`iter_next_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_loop
38043805
[`iter_next_slice`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_slice
38053806
[`iter_not_returning_iterator`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_not_returning_iterator

‎src/tools/clippy/CONTRIBUTING.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,23 +110,28 @@ Just make sure to remove the dependencies again before finally making a pull req
110110
[IntelliJ_rust_homepage]: https://intellij-rust.github.io/
111111

112112
### Rust Analyzer
113-
As of [#6869][6869], [`rust-analyzer`][ra_homepage] can understand that Clippy uses compiler-internals
114-
using `extern crate` when `package.metadata.rust-analyzer.rustc_private` is set to `true` in Clippy's `Cargo.toml.`
115-
You will require a `nightly` toolchain with the `rustc-dev` component installed.
116-
Make sure that in the `rust-analyzer` configuration, you set
113+
For [`rust-analyzer`][ra_homepage] to work correctly make sure that in the `rust-analyzer` configuration you set
114+
117115
```json
118116
{ "rust-analyzer.rustc.source": "discover" }
119117
```
120-
and
121-
```json
122-
{ "rust-analyzer.updates.channel": "nightly" }
123-
```
118+
124119
You should be able to see information on things like `Expr` or `EarlyContext` now if you hover them, also
125120
a lot more type hints.
126-
This will work with `rust-analyzer 2021-03-15` shipped in nightly `1.52.0-nightly (107896c32 2021-03-15)` or later.
121+
122+
To have `rust-analyzer` also work in the `clippy_dev` and `lintcheck` crates, add the following configuration
123+
124+
```json
125+
{
126+
"rust-analyzer.linkedProjects": [
127+
"./Cargo.toml",
128+
"clippy_dev/Cargo.toml",
129+
"lintcheck/Cargo.toml",
130+
]
131+
}
132+
```
127133

128134
[ra_homepage]: https://rust-analyzer.github.io/
129-
[6869]: https://github.com/rust-lang/rust-clippy/pull/6869
130135

131136
## How Clippy works
132137

0 commit comments

Comments
 (0)
Please sign in to comment.