Merge commit '4f142aa105' into clippyup
This commit is contained in:
parent
2ed404937f
commit
cd0bb7de01
284 changed files with 8555 additions and 4250 deletions
|
|
@ -478,8 +478,27 @@ impl<'tcx> LateLintPass<'tcx> for ManualStrip {
|
|||
```
|
||||
|
||||
Once the `msrv` is added to the lint, a relevant test case should be added to
|
||||
`tests/ui/min_rust_version_attr.rs` which verifies that the lint isn't emitted
|
||||
if the project's MSRV is lower.
|
||||
the lint's test file, `tests/ui/manual_strip.rs` in this example. It should
|
||||
have a case for the version below the MSRV and one with the same contents but
|
||||
for the MSRV version itself.
|
||||
|
||||
```rust
|
||||
#![feature(custom_inner_attributes)]
|
||||
|
||||
...
|
||||
|
||||
fn msrv_1_44() {
|
||||
#![clippy::msrv = "1.44"]
|
||||
|
||||
/* something that would trigger the lint */
|
||||
}
|
||||
|
||||
fn msrv_1_45() {
|
||||
#![clippy::msrv = "1.45"]
|
||||
|
||||
/* something that would trigger the lint */
|
||||
}
|
||||
```
|
||||
|
||||
As a last step, the lint should be added to the lint documentation. This is done
|
||||
in `clippy_lints/src/utils/conf.rs`:
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ the reference file with:
|
|||
cargo dev bless
|
||||
```
|
||||
|
||||
For example, this is necessary, if you fix a typo in an error message of a lint
|
||||
For example, this is necessary if you fix a typo in an error message of a lint,
|
||||
or if you modify a test file to add a test case.
|
||||
|
||||
> _Note:_ This command may update more files than you intended. In that case
|
||||
|
|
@ -101,8 +101,9 @@ cargo dev setup intellij
|
|||
cargo dev dogfood
|
||||
```
|
||||
|
||||
More about intellij command usage and reasons
|
||||
[here](https://github.com/rust-lang/rust-clippy/blob/master/CONTRIBUTING.md#intellij-rust)
|
||||
More about [intellij] command usage and reasons.
|
||||
|
||||
[intellij]: https://github.com/rust-lang/rust-clippy/blob/master/CONTRIBUTING.md#intellij-rust
|
||||
|
||||
## lintcheck
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue