#[test] fn struct_pinned() {
{ let c = Cell::new(0); let _x = StructPinned { f1: D(&c, 1), f2: D(&c, 2) };
}
{ let c = Cell::new(0); letmut x = StructPinned { f1: D(&c, 1), f2: D(&c, 2) }; let y = Pin::new(&mut x); let _z = y.project_replace(StructPinned { f1: D(&c, 3), f2: D(&c, 4) });
}
}
#[test] fn struct_unpinned() {
{ let c = Cell::new(0); let _x = StructUnpinned { f1: D(&c, 1), f2: D(&c, 2) };
}
{ let c = Cell::new(0); letmut x = StructUnpinned { f1: D(&c, 1), f2: D(&c, 2) }; let y = Pin::new(&mut x); let _z = y.project_replace(StructUnpinned { f1: D(&c, 3), f2: D(&c, 4) });
}
}
#[test] fn tuple_pinned() {
{ let c = Cell::new(0); let _x = TuplePinned(D(&c, 1), D(&c, 2));
}
{ let c = Cell::new(0); letmut x = TuplePinned(D(&c, 1), D(&c, 2)); let y = Pin::new(&mut x); let _z = y.project_replace(TuplePinned(D(&c, 3), D(&c, 4)));
}
}
#[test] fn tuple_unpinned() {
{ let c = Cell::new(0); let _x = TupleUnpinned(D(&c, 1), D(&c, 2));
}
{ let c = Cell::new(0); letmut x = TupleUnpinned(D(&c, 1), D(&c, 2)); let y = Pin::new(&mut x); let _z = y.project_replace(TupleUnpinned(D(&c, 3), D(&c, 4)));
}
}
#[test] fn enum_struct() {
{ let c = Cell::new(0); let _x = Enum::StructPinned { f1: D(&c, 1), f2: D(&c, 2) };
}
{ let c = Cell::new(0); letmut x = Enum::StructPinned { f1: D(&c, 1), f2: D(&c, 2) }; let y = Pin::new(&mut x); let _z = y.project_replace(Enum::StructPinned { f1: D(&c, 3), f2: D(&c, 4) });
}
{ let c = Cell::new(0); let _x = Enum::StructUnpinned { f1: D(&c, 1), f2: D(&c, 2) };
}
{ let c = Cell::new(0); letmut x = Enum::StructUnpinned { f1: D(&c, 1), f2: D(&c, 2) }; let y = Pin::new(&mut x); let _z = y.project_replace(Enum::StructUnpinned { f1: D(&c, 3), f2: D(&c, 4) });
}
}
#[test] fn enum_tuple() {
{ let c = Cell::new(0); let _x = Enum::TuplePinned(D(&c, 1), D(&c, 2));
}
{ let c = Cell::new(0); letmut x = Enum::TuplePinned(D(&c, 1), D(&c, 2)); let y = Pin::new(&mut x); let _z = y.project_replace(Enum::TuplePinned(D(&c, 3), D(&c, 4)));
}
{ let c = Cell::new(0); let _x = Enum::TupleUnpinned(D(&c, 1), D(&c, 2));
}
{ let c = Cell::new(0); letmut x = Enum::TupleUnpinned(D(&c, 1), D(&c, 2)); let y = Pin::new(&mut x); let _z = y.project_replace(Enum::TupleUnpinned(D(&c, 3), D(&c, 4)));
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-06-21)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.