Add a query for dereferencing constants of reference type
This commit is contained in:
parent
b54f122a1c
commit
34c62e0abc
3 changed files with 53 additions and 1 deletions
|
@ -749,6 +749,14 @@ rustc_queries! {
|
|||
desc { "destructure constant" }
|
||||
}
|
||||
|
||||
/// Dereference a constant reference or raw pointer and turn the result into a constant
|
||||
/// again.
|
||||
query deref_const(
|
||||
key: ty::ParamEnvAnd<'tcx, &'tcx ty::Const<'tcx>>
|
||||
) -> &'tcx ty::Const<'tcx> {
|
||||
desc { "deref constant" }
|
||||
}
|
||||
|
||||
query const_caller_location(key: (rustc_span::Symbol, u32, u32)) -> ConstValue<'tcx> {
|
||||
desc { "get a &core::panic::Location referring to a span" }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue