]> git.proxmox.com Git - rustc.git/blame - src/test/ui/drop/issue-35546.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / drop / issue-35546.rs
CommitLineData
60c5eb7d 1// build-pass
0bf4aa26 2#![allow(dead_code)]
5bcae85e
SL
3// Regression test for #35546. Check that we are able to codegen
4// this. Before we had problems because of the drop glue signature
5// around dropping a trait object (specifically, when dropping the
6// `value` field of `Node<Send>`).
3157f602 7
5bcae85e 8struct Node<T: ?Sized + Send> {
dc9dc135 9 next: Option<Box<Node<dyn Send>>>,
5bcae85e 10 value: T,
a7813a04
XL
11}
12
dc9dc135 13fn clear(head: &mut Option<Box<Node<dyn Send>>>) {
5bcae85e
SL
14 match head.take() {
15 Some(node) => *head = node.next,
16 None => (),
17 }
54a0048b 18}
5bcae85e
SL
19
20fn main() {}