mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
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:
@@ -502,7 +502,11 @@ fn node_ty(&self, id: ast::NodeId) -> mc::McResult<ty::t> {
|
||||
}
|
||||
|
||||
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>> {
|
||||
|
||||
Reference in New Issue
Block a user