提交 1a7b00d5 编写于 作者: J John Kåre Alsaker

Don't look for niches inside generator types. Fixes #47253

上级 795594cd
......@@ -2295,6 +2295,13 @@ fn find_niche<C>(&self, cx: C, count: u128)
}, niche_start))
};
// Locals variables which live across yields are stored
// in the generator type as fields. These may be uninitialized
// so we don't look for niches there.
if let ty::TyGenerator(..) = self.ty.sty {
return Ok(None);
}
match self.abi {
Abi::Scalar(ref scalar) => {
return Ok(scalar_component(scalar, Size::from_bytes(0)));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册