Skip to content

use irrefutable pattern for stack_pin_init - #172

Open
nbdd0121 wants to merge 1 commit into
mainfrom
stack_pin_init
Open

use irrefutable pattern for stack_pin_init#172
nbdd0121 wants to merge 1 commit into
mainfrom
stack_pin_init

Conversation

@nbdd0121

Copy link
Copy Markdown
Member

The let binding will produce a "unreachable expression" warning with Infallible becoming an alias of !. For this macro, all we need to know is that the error type is uninhabited, so replace this with a irrefutable pattern instead.

Alternative to #171

In Rust 1.100.0, `Infallible` will become an alias of `!`. The let
binding in `stack_pin_init` will thus become unreachable and produce a
"unreachable expression" warning for subsequent match, and thus will fail
`-Dwarnings` build. For this macro, all we need to know is that the error
type is uninhabited, so replace this with a irrefutable pattern instead.

Reported-by: Mohamad Alsadhan <mo@sdhn.cc>
Closes: #171
Signed-off-by: Gary Guo <gary@garyguo.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant