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

clone: managed boxes need to clone by shallow copy #5763

Closed
wants to merge 1 commit into from
Closed

clone: managed boxes need to clone by shallow copy #5763

wants to merge 1 commit into from

Conversation

thestinger
Copy link
Contributor

Performing a deep copy isn't ever desired for a persistent data
structure, and it requires a more complex implementation to do
correctly. A deep copy needs to check for cycles to avoid an infinite
loop.

@thestinger
Copy link
Contributor Author

@nikomatsakis: r? I had to fix a broken test, and added some docstrings

@metajack
Copy link
Contributor

metajack commented Apr 8, 2013

This should not have the trait bound. There's no need to T to implement Clone if the copy is shallow.

Performing a deep copy isn't ever desired for a persistent data
structure, and it requires a more complex implementation to do
correctly. A deep copy needs to check for cycles to avoid an infinite
loop.
@thestinger
Copy link
Contributor Author

@metajack: good point, fixed

bors added a commit that referenced this pull request Apr 8, 2013
Performing a deep copy isn't ever desired for a persistent data
structure, and it requires a more complex implementation to do
correctly. A deep copy needs to check for cycles to avoid an infinite
loop.
@bors bors closed this Apr 8, 2013
nikomatsakis added a commit to nikomatsakis/rust that referenced this pull request Aug 7, 2014
…e `'b:'a`,

meaning `'b outlives 'a`. Syntax currently does nothing but is needed for full
fix to rust-lang#5763. To use this syntax, the issue_5763_bootstrap feature guard is
required.
bors added a commit that referenced this pull request Aug 7, 2014
…kfelix

Introduce syntax for lifetime bounds like `'b:'a`, meaning `'b outlives 'a`. Syntax currently does nothing but is needed for full fix to #5763. To use this syntax, the issue_5763_bootstrap feature guard is required.
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 14, 2020
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