-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Prevent spurious unreachable pattern
lints
#115937
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,17 @@ LL | WHAT_A_TYPE => 0, | |
= note: the traits must be derived, manual `impl`s are not sufficient | ||
= note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details | ||
|
||
error: aborting due to previous error | ||
error[E0015]: cannot match on `TypeId` in constant functions | ||
--> $DIR/typeid-equality-by-subtyping.rs:18:9 | ||
| | ||
LL | WHAT_A_TYPE => 0, | ||
| ^^^^^^^^^^^ | ||
| | ||
= note: `TypeId` cannot be compared in compile-time, and therefore cannot be used in `match`es | ||
note: impl defined here, but it is not `const` | ||
--> $SRC_DIR/core/src/any.rs:LL:COL | ||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants | ||
|
||
error: aborting due to 2 previous errors | ||
Comment on lines
+10
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is this error coming from? I guess it was there before but got skipped because of previous errors? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh yea. We're actually generating a |
||
|
||
For more information about this error, try `rustc --explain E0015`. |
Uh oh!
There was an error while loading. Please reload this page.