Uh oh!
There was an error while loading. Please reload this page.
Fix dead code warning when inline const is used in pattern - #88036
Conversation
rust-highfive
commented
Aug 14, 2021
(rust-highfive has picked a reviewer for you, use r? to override) |
petrochenkov
commented
Aug 14, 2021
I'd never guess that |
bors
commented
Aug 14, 2021
📌 Commit 17d18e3822d5e5876fbf9d2ddd6d2b4a6783e117 has been approved by |
nbdd0121
commented
Aug 14, 2021
Actually this approach doesn't catch |
nbdd0121
commented
Aug 14, 2021
Added a test case for using inline const in range pattern |
nbdd0121
commented
Aug 14, 2021
It's surprising to me as well, but I guess that's probably the easiest way to implement it since it'll need to have a |
Uh oh!
There was an error while loading. Please reload this page.
petrochenkov
commented
Aug 15, 2021
Yeah, it's a better approach, it should also fix cases like constfnone() -> i32{1}structS<constC:i32>;fnmain(){matchS::<1>{S::<{one()}> => {}}}Could you actually add this case too? @bors r- |
nbdd0121
commented
Aug 15, 2021
Added and merged |
petrochenkov
commented
Aug 15, 2021
Thanks! |
bors
commented
Aug 15, 2021
📌 Commit e62ecdc has been approved by |
Fix dead code warning when inline const is used in pattern Fixesrust-lang#78171
…laumeGomez Rollup of 10 pull requests Successful merges: - rust-lang#87818 (Fix anchors display in rustdoc) - rust-lang#87983 (Use more accurate spans when proposing adding lifetime to item) - rust-lang#88012 (Change WASI's `RawFd` from `u32` to `c_int` (`i32`).) - rust-lang#88031 (Make `BuildHasher` object safe) - rust-lang#88036 (Fix dead code warning when inline const is used in pattern) - rust-lang#88082 (Take into account jobs number for rustdoc GUI tests) - rust-lang#88109 (Fix environment variable getter docs) - rust-lang#88111 (Add background-color on clickable definitions in source code) - rust-lang#88129 (Fix dataflow graphviz bug, make dataflow graphviz modules public) - rust-lang#88136 (Move private_unused.rs test to impl-trait) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes#78171