Auto merge of #70743 - oli-obk:eager_const_to_pat_conversion, r=eddyb

Fully destructure constants into patterns

r? `@varkor`

as discussed in 192789924

we should probably crater it once reviewed
This commit is contained in:
bors 2020-09-26 06:44:28 +00:00
commit fd15e6180d
66 changed files with 796 additions and 435 deletions

View file

@ -742,6 +742,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" }
}