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<&'a Concrete<'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]));}
Version
clippy 0.1.65 (c07a8b4 2022-08-26)
Error output
No response
The text was updated successfully, but these errors were encountered:
matthiaskrgr
added
C-bug
Category: Clippy is not doing the correct thing
I-ICE
Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️
labels
Sep 7, 2022
use std::cell::Cell;structConcrete<'a>(Cell<Option<&'a Concrete<'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 🤔
Summary
clippy seems to hang with this code:
Version
Error output
No response
The text was updated successfully, but these errors were encountered: