Mock std String and Result types in tests for ok-wrapping diagnostic

This commit is contained in:
Phil Ellison 2019-08-11 13:25:36 +01:00 committed by Aleksey Kladov
parent bacb938ab0
commit d025016f92
3 changed files with 65 additions and 16 deletions

View file

@ -106,12 +106,10 @@ impl<'a, 'b> ExprValidator<'a, 'b> {
Some(m) => m,
None => return,
};
let ret = match &mismatch.expected {
Ty::Apply(t) => t,
_ => return,
};
let ret_enum = match ret.ctor {
TypeCtor::Adt(AdtDef::Enum(e)) => e,
_ => return,