New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrectly inferred never type of match expression with diverging arm #6749
Labels
bug
subsystem::type inference & name resolution
Issues related to name resolution and/or type inference
Comments
artemmukhin
added
subsystem::type inference & name resolution
Issues related to name resolution and/or type inference
bug
labels
Jan 28, 2021
From #6829 (comment):
|
bors bot
added a commit
that referenced
this issue
Mar 25, 2021
6829: INSP: Implement unreachable code detection r=dima74 a=ortem This PR introduces `Unreachable code` inspection to detect and remove unreachable code. ![unreachable_code](https://user-images.githubusercontent.com/4854600/107639621-2ce9cc00-6c82-11eb-8a06-114953a733ab.gif) Note that now it might produce some false-positive warnings due to #6749 and #6797, so probably it's better to try fixing these issues before merging this. Some implementation details: * Based on the control-flow graph which is already used for several inspections (move analysis, liveness analysis) * Found unreachable elements are cached by `org.rust.lang.core.types.ExtensionsKt#CONTROL_FLOW_KEY` as well as the graph itself * Does not highlight each unreachable element separately, but merges their text ranges instead in order to highlight the widest range Part of #1612. changelog: Add `Unreachable code` inspection and quick-fix 6969: COMP: Improve dependency completion when using crates local index r=ortem a=avrong <img width="400" src="https://user-images.githubusercontent.com/6342851/111127949-6c5b4f00-8585-11eb-8a1f-e1284d32009d.gif"> changelog: Improve performance of dependencies completion in `Cargo.toml` using crates local index. This feature is disabled by default for now. To use it, enable `org.rust.crates.local.index` experimental feature Co-authored-by: ortem <ortem00@gmail.com> Co-authored-by: Aleksei Trifonov <avrong@avrong.me>
bors bot
added a commit
that referenced
this issue
Mar 25, 2021
6829: INSP: Implement unreachable code detection r=dima74 a=ortem This PR introduces `Unreachable code` inspection to detect and remove unreachable code. ![unreachable_code](https://user-images.githubusercontent.com/4854600/107639621-2ce9cc00-6c82-11eb-8a06-114953a733ab.gif) Note that now it might produce some false-positive warnings due to #6749 and #6797, so probably it's better to try fixing these issues before merging this. Some implementation details: * Based on the control-flow graph which is already used for several inspections (move analysis, liveness analysis) * Found unreachable elements are cached by `org.rust.lang.core.types.ExtensionsKt#CONTROL_FLOW_KEY` as well as the graph itself * Does not highlight each unreachable element separately, but merges their text ranges instead in order to highlight the widest range Part of #1612. changelog: Add `Unreachable code` inspection and quick-fix Co-authored-by: ortem <ortem00@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
subsystem::type inference & name resolution
Issues related to name resolution and/or type inference
Environment
Problem description
The inferred type of
num2
in the following example should bei32
, not!
Might be related to #1743
Steps to reproduce
The text was updated successfully, but these errors were encountered: