Make coherence more tolerant of error types.
Fixes #29857. Fixes #30589.
This commit is contained in:
parent
64a8ffeffa
commit
b4f5ddba67
8 changed files with 174 additions and 1 deletions
|
|
@ -330,8 +330,11 @@ fn ty_is_local_constructor<'tcx>(tcx: &ty::ctxt<'tcx>,
|
|||
tt.principal_def_id().is_local()
|
||||
}
|
||||
|
||||
ty::TyClosure(..) |
|
||||
ty::TyError => {
|
||||
true
|
||||
}
|
||||
|
||||
ty::TyClosure(..) => {
|
||||
tcx.sess.bug(
|
||||
&format!("ty_is_local invoked on unexpected type: {:?}",
|
||||
ty))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue