Add delay span bug
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
This commit is contained in:
parent
a60e267200
commit
fec6ffc816
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
let to = normalize(to);
|
||||
trace!(?from, ?to);
|
||||
if from.has_non_region_infer() || to.has_non_region_infer() {
|
||||
// We can't check anything if there are inference variables.
|
||||
tcx.sess.delay_span_bug(span, "argument to transmute has inference variables");
|
||||
return;
|
||||
}
|
||||
// Transmutes that are only changing lifetimes are always ok.
|
||||
|
|
Loading…
Add table
Reference in a new issue