Rollup merge of #88709 - BoxyUwU:thir-abstract-const, r=lcnr
generic_const_exprs: use thir for abstract consts instead of mir Changes `AbstractConst` building to use `thir` instead of `mir` so that there's less chance of consts unifying when they shouldn't because lowering to mir dropped information (see `abstract-consts-as-cast-5.rs` test) r? `@lcnr`
This commit is contained in:
commit
f5ac5cadd3
35 changed files with 357 additions and 372 deletions
|
@ -303,17 +303,17 @@ rustc_queries! {
|
|||
}
|
||||
|
||||
/// Try to build an abstract representation of the given constant.
|
||||
query mir_abstract_const(
|
||||
query thir_abstract_const(
|
||||
key: DefId
|
||||
) -> Result<Option<&'tcx [mir::abstract_const::Node<'tcx>]>, ErrorReported> {
|
||||
) -> Result<Option<&'tcx [thir::abstract_const::Node<'tcx>]>, ErrorReported> {
|
||||
desc {
|
||||
|tcx| "building an abstract representation for {}", tcx.def_path_str(key),
|
||||
}
|
||||
}
|
||||
/// Try to build an abstract representation of the given constant.
|
||||
query mir_abstract_const_of_const_arg(
|
||||
query thir_abstract_const_of_const_arg(
|
||||
key: (LocalDefId, DefId)
|
||||
) -> Result<Option<&'tcx [mir::abstract_const::Node<'tcx>]>, ErrorReported> {
|
||||
) -> Result<Option<&'tcx [thir::abstract_const::Node<'tcx>]>, ErrorReported> {
|
||||
desc {
|
||||
|tcx|
|
||||
"building an abstract representation for the const argument {}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue