-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Specialize try_destructure_mir_constant
for its sole user (pretty printing)
#113291
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
4dcf988
a0eb348
09b89ef
46cce98
8ac1a67
e1e04a8
3dfc7ec
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 |
---|---|---|
|
@@ -1087,11 +1087,13 @@ rustc_queries! { | |
} | ||
|
||
/// Tries to destructure an `mir::ConstantKind` ADT or array into its variant index | ||
/// and its field values. | ||
query try_destructure_mir_constant( | ||
key: ty::ParamEnvAnd<'tcx, mir::ConstantKind<'tcx>> | ||
/// and its field values. This should only be used for pretty printing. | ||
query try_destructure_mir_constant_for_diagnostics( | ||
key: (ConstValue<'tcx>, Ty<'tcx>) | ||
) -> Option<mir::DestructuredConstant<'tcx>> { | ||
desc { "destructuring MIR constant"} | ||
no_hash | ||
eval_always | ||
Comment on lines
+1095
to
+1096
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. I have no idea what these do so I will just trust they make sense. ;) 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. Mostly turning the query into a glorified function pointer (caching disabled). I think we have a better way nowadays, but I need to look it up |
||
} | ||
|
||
query const_caller_location(key: (rustc_span::Symbol, u32, u32)) -> ConstValue<'tcx> { | ||
|
Uh oh!
There was an error while loading. Please reload this page.