diff options
| author | bors <bors@rust-lang.org> | 2022-08-27 08:37:29 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-08-27 08:37:29 +0000 |
| commit | be8bd600009dd087f6c2cd4b354cf016b2072fd3 (patch) | |
| tree | 74d6e9762eb5553f6ae8d25a91881831bc059a45 /src/test/debuginfo/enum-thinlto.rs | |
| parent | 602bec26b0b60b39196108f518c805af14111e2b (diff) | |
| parent | fe93b8d001bf82b0789c7aac33511a5f9bd65045 (diff) | |
| download | rust-be8bd600009dd087f6c2cd4b354cf016b2072fd3.tar.gz rust-be8bd600009dd087f6c2cd4b354cf016b2072fd3.zip | |
Auto merge of #9381 - lukaslueg:issue9361, r=dswij
Don't lint `needless_return` if `return` has attrs Fixes #9361 The lint used to have a mechanic to allow `cfg`-attrs on naked `return`-statements. This was well-intentioned, yet we can have any kind of attribute, e.g. `allow`, `expect` or even custom `derive`. So the mechanic was simply removed. We now never lint on a naked `return`-statement that has attributes on it. Turns out that the ui-test had a Catch22 in it: In `check_expect()` the `#[expect(clippy::needless_return)]` is an attribute on the `return` statement that can and will be rustfixed away without side effects. But any other attribute would also have been removed, which is what #9361 is about. The test proved the wrong thing. Removed the test, the body is tested elsewhere as well. changelog: Ignore [`needless_return`] on `return`s with attrs
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions
