You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of rust-lang#79765 - flip1995:clippyup, r=Manishearth
Update Clippy
Biweekly Clippy update (which I forgot about on Thursday)
This includes a `Cargo.lock` update, so probably needs `rollup=never`.
r? `@Manishearth`
Note that if you've run clippy before, this may only take effect after you've modified a file or ran `cargo clean`.
196
196
197
+
### Specifying the minimum supported Rust version
198
+
199
+
Projects that intend to support old versions of Rust can disable lints pertaining to newer features by
200
+
specifying the minimum supported Rust version (MSRV) in the clippy configuration file.
201
+
202
+
```toml
203
+
msrv = "1.30.0"
204
+
```
205
+
206
+
The MSRV can also be specified as an inner attribute, like below.
207
+
208
+
```rust
209
+
#![feature(custom_inner_attributes)]
210
+
#![clippy::msrv ="1.30.0"]
211
+
212
+
fnmain() {
213
+
...
214
+
}
215
+
```
216
+
217
+
You can also omit the patch version when specifying the MSRV, so `msrv = 1.30`
218
+
is equivalent to `msrv = 1.30.0`.
219
+
220
+
Note: `custom_inner_attributes` is an unstable feature so it has to be enabled explicitly.
221
+
222
+
Lints that recognize this configuration option can be found [here](https://rust-lang.github.io/rust-clippy/master/index.html#msrv)
223
+
197
224
## Contributing
198
225
199
226
If you want to contribute to Clippy, you can find more information in [CONTRIBUTING.md](https://github.com/rust-lang/rust-clippy/blob/master/CONTRIBUTING.md).
0 commit comments