fix #104510, Remove is_tainted_by_errors since we have ty_error for delay bug
This commit is contained in:
parent
bebd57a960
commit
9c2d4dd529
@ -73,7 +73,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
let ty = self.typeck_results.borrow().expr_ty_adjusted(expr);
|
||||
let ty = self.resolve_vars_if_possible(ty);
|
||||
if ty.has_non_region_infer() {
|
||||
assert!(self.is_tainted_by_errors());
|
||||
self.tcx.ty_error()
|
||||
} else {
|
||||
self.tcx.erase_regions(ty)
|
||||
|
16
src/test/ui/typeck/issue-104510-ice.rs
Normal file
16
src/test/ui/typeck/issue-104510-ice.rs
Normal file
@ -0,0 +1,16 @@
|
||||
// needs-asm-support
|
||||
// only-x86_64
|
||||
|
||||
struct W<T: ?Sized>(Oops);
|
||||
//~^ ERROR cannot find type `Oops` in this scope
|
||||
|
||||
unsafe fn test() {
|
||||
let j = W(());
|
||||
let pointer = &j as *const _;
|
||||
core::arch::asm!(
|
||||
"nop",
|
||||
in("eax") pointer,
|
||||
);
|
||||
}
|
||||
|
||||
fn main() {}
|
9
src/test/ui/typeck/issue-104510-ice.stderr
Normal file
9
src/test/ui/typeck/issue-104510-ice.stderr
Normal file
@ -0,0 +1,9 @@
|
||||
error[E0412]: cannot find type `Oops` in this scope
|
||||
--> $DIR/issue-104510-ice.rs:4:21
|
||||
|
|
||||
LL | struct W<T: ?Sized>(Oops);
|
||||
| ^^^^ not found in this scope
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0412`.
|
Loading…
x
Reference in New Issue
Block a user