fix weird region in error messages

This commit is contained in:
Folkert 2020-07-21 16:20:03 +02:00
parent b45b39af5e
commit a82cc7f28f
2 changed files with 3 additions and 3 deletions

View file

@ -1019,7 +1019,7 @@ fn constrain_def(env: &Env, def: &Def, body_con: Constraint) -> Constraint {
expr_type,
annotation_expected.clone(),
Category::Storage,
annotation.region,
Region::span_across(&annotation.region, &def.loc_expr.region),
));
// when a def is annotated, and it's body is a closure, treat this