diff options
| author | bors <bors@rust-lang.org> | 2022-12-04 01:58:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-12-04 01:58:43 +0000 |
| commit | cb8df45333786fc89cd566bbaa71447bb4b105bd (patch) | |
| tree | 129c61f85a65dedda7e80e19e38ba438867a8586 /library/std/src/sys/unix/stack_overflow.rs | |
| parent | 4c123a06ba3c2ec17d3a4dfa251dccdc5368b712 (diff) | |
| parent | 2701a4076f3d18edc06781d7a9b3091ee5dbd05f (diff) | |
| download | rust-cb8df45333786fc89cd566bbaa71447bb4b105bd.tar.gz rust-cb8df45333786fc89cd566bbaa71447bb4b105bd.zip | |
Auto merge of #10027 - smoelius:fix-10021, r=dswij
Fix 10021 This PR proposes a fix for #10021. The problem is similar to the one that `@mikerite` described in #9505. The compiler is generating an empty substitution for a call, even though the type of `Self` seems to be needed for a predicate. In `@mikerite's` case, the call was to [`IntoFuture::into_future`](https://doc.rust-lang.org/std/future/trait.IntoFuture.html#tymethod.into_future). In this case, the call is to [`Try::branch`](https://doc.rust-lang.org/std/ops/trait.Try.html#tymethod.branch). The proposed fix is to verify that the parameter whose type is changing has an index within the substitution. The strikes me as a reasonable approach, since if the check were to fail, the following code would be a no-op: https://github.com/rust-lang/rust-clippy/blob/4c123a06ba3c2ec17d3a4dfa251dccdc5368b712/clippy_lints/src/methods/unnecessary_to_owned.rs#L420-L428 Like `@mikerite's` original solution, this solution turns ICEs into false negatives. changelog: fix `unnecessary_to_owned` false positive involving `Try::branch`
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
