You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// run-pass// Example taken from RFC 1238 text// https://github.com/rust-lang/rfcs/blob/master/text/1238-nonparametric-dropck.md// #examples-of-code-that-must-continue-to-workuse std::cell::Cell;structConcrete<'a>(#[allow(unused_tuple_struct_fields)]u32,Cell<Option<&'aConcrete<'a>>>);fnmain(){letmut data = Vec::new();
data.push(Concrete(0,Cell::new(None)));
data.push(Concrete(0,Cell::new(None)));
data[0].1.set(Some(&data[1]));
data[1].1.set(Some(&data[0]));}
use std::cell::Cell;structConcrete<'a>(Cell<Option<&'aConcrete<'a>>>);fnmain(){letmut data = Vec::new();
data.push(Concrete(Cell::new(None)));
data[0].0.set(None);}
when I inline the vec.push() via let data = vec![..], the hang goes away 🤔
Activity
matthiaskrgr commentedon Sep 7, 2022
matthiaskrgr commentedon Sep 7, 2022
reduced a bit:
when I inline the
vec.push()vialet data = vec![..], the hang goes away 🤔Auto merge of #9441 - Jarcho:hang_9433, r=Alexendoo