Skip to content
New issue

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

Impls Finalize, Trace for PhantomData and Rc<[T]> #61

Merged
merged 3 commits into from
Jul 22, 2021

Conversation

remexre
Copy link
Contributor

@remexre remexre commented Sep 24, 2017

I knew I forgot something in #58...

Also fixes a typo.

@remexre remexre changed the title Impls Finalize, Trace for PhantomData Impls Finalize, Trace for PhantomData and Rc<[T]> Jul 22, 2021
@remexre
Copy link
Contributor Author

remexre commented Jul 22, 2021

Updated to merge cleanly against 0.4.1, added an Rc<[T]> impl too, since that's missing.

@Manishearth Manishearth merged commit 9e93c18 into Manishearth:master Jul 22, 2021
@andersk
Copy link
Collaborator

andersk commented Jul 22, 2021

This Rc<[T]> impl is another instance of #134.

use gc::Gc;
use std::rc::Rc;

fn main() {
    let r: Rc<[Gc<()>]> = Rc::new([Gc::new(())]);
    Gc::new((Rc::clone(&r), r));
    // → thread 'main' panicked at 'Can't double-unroot a Gc<T>'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants