Monomorphize method types in Typer impl for BlockS
In some obscure circumstances, failure to do this can cause unsubstituted type parameters to show up where they aren't expected and cause an ICE. Closes #18514
This commit is contained in:
parent
0547a407aa
commit
7ea7606874
1 changed files with 5 additions and 1 deletions
|
|
@ -502,7 +502,11 @@ impl<'blk, 'tcx> mc::Typer<'tcx> for BlockS<'blk, 'tcx> {
|
|||
}
|
||||
|
||||
fn node_method_ty(&self, method_call: typeck::MethodCall) -> Option<ty::t> {
|
||||
self.tcx().method_map.borrow().find(&method_call).map(|method| method.ty)
|
||||
self.tcx()
|
||||
.method_map
|
||||
.borrow()
|
||||
.find(&method_call)
|
||||
.map(|method| monomorphize_type(self, method.ty))
|
||||
}
|
||||
|
||||
fn adjustments<'a>(&'a self) -> &'a RefCell<NodeMap<ty::AutoAdjustment>> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue