We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Box<Box<T>>
Box<Trait>
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust-lang/rust#39230 changed some things around with boxed, especially that there is a "Drop impl" now: https://github.com/rust-lang/rust/blame/master/src/liballoc/boxed.rs#L297 (it's empty, doesn't drop its contents)
Drop
We should just wait for rustc to fix it.
repro:
#![feature(box_syntax)] struct DroppableStruct; static mut DROPPED: bool = false; impl Drop for DroppableStruct { fn drop(&mut self) { unsafe { DROPPED = true; } } } trait MyTrait { fn dummy(&self) { } } impl MyTrait for Box<DroppableStruct> {} struct Whatever { w: Box<MyTrait+'static> } impl Whatever { fn new(w: Box<MyTrait+'static>) -> Whatever { Whatever { w: w } } } fn main() { { let f: Box<_> = box DroppableStruct; let _a = Whatever::new(box f as Box<MyTrait>); } assert!(unsafe { DROPPED }); }
The text was updated successfully, but these errors were encountered:
We don't plan to fix this in rustc, you have to check if it's a Box specifically.
Box
Sorry, something went wrong.
Merge pull request rust-lang#129 from cuviper/serde-no_std
a2054dc
Build serde without default features
Successfully merging a pull request may close this issue.
Uh oh!
There was an error while loading. Please reload this page.
rust-lang/rust#39230 changed some things around with boxed, especially that there is a "
Drop
impl" now: https://github.com/rust-lang/rust/blame/master/src/liballoc/boxed.rs#L297 (it's empty, doesn't drop its contents)We should just wait for rustc to fix it.
repro:
The text was updated successfully, but these errors were encountered: