1
Fork 0

wip emit errors during AbstractConst building

This commit is contained in:
Bastian Kauschke 2020-09-19 22:17:52 +02:00
parent 59fb88d061
commit d4039c55c9
5 changed files with 125 additions and 80 deletions

View file

@ -247,7 +247,7 @@ rustc_queries! {
/// Try to build an abstract representation of the given constant.
query mir_abstract_const(
key: DefId
) -> Option<&'tcx [mir::abstract_const::Node<'tcx>]> {
) -> Result<Option<&'tcx [mir::abstract_const::Node<'tcx>]>, ErrorReported> {
desc {
|tcx| "building an abstract representation for {}", tcx.def_path_str(key),
}
@ -255,7 +255,7 @@ rustc_queries! {
/// Try to build an abstract representation of the given constant.
query mir_abstract_const_of_const_arg(
key: (LocalDefId, DefId)
) -> Option<&'tcx [mir::abstract_const::Node<'tcx>]> {
) -> Result<Option<&'tcx [mir::abstract_const::Node<'tcx>]>, ErrorReported> {
desc {
|tcx|
"building an abstract representation for the const argument {}",