Remove crashes, add comment
This commit is contained in:
parent
5b1a2b8712
commit
bc5f9520c1
4 changed files with 2 additions and 54 deletions
|
@ -2224,6 +2224,8 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
|
|||
) -> GetSafeTransmuteErrorAndReason {
|
||||
use rustc_transmute::Answer;
|
||||
|
||||
// We don't assemble a transmutability candidate for types that are generic
|
||||
// and we should have ambiguity for types that still have non-region infer.
|
||||
if obligation.predicate.has_non_region_param() || obligation.has_non_region_infer() {
|
||||
return GetSafeTransmuteErrorAndReason::Default;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue