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

impl Copy for NoSend/NoSync #19860

Merged
merged 1 commit into from
Dec 17, 2014
Merged

impl Copy for NoSend/NoSync #19860

merged 1 commit into from
Dec 17, 2014

Conversation

japaric
Copy link
Member

@japaric japaric commented Dec 15, 2014

Necessary to implement Copy on structs like this one:

struct Slice<'a, T> {
    _contravariant: marker::ContravariantLifetime<'a>,
    _nosend: marker::NoSend,
    data: *const T,
    length: uint,
}

r? @alexcrichton

bors referenced this pull request Dec 16, 2014
This creates an enormous amount of spew.
bors added a commit that referenced this pull request Dec 16, 2014
impl `Copy` for `NoSend`/`NoSync`

Reviewed-by: alexcrichton
bors referenced this pull request Dec 16, 2014
Using a type alias for iterator implementations is fragile since this
exposes the implementation to users of the iterator, and any changes
could break existing code.

This commit changes the iterators of `VecMap` to use
proper new types, rather than type aliases.  However, since it is
fair-game to treat a type-alias as the aliased type, this is a:

[breaking-change].
bors added a commit that referenced this pull request Dec 16, 2014
impl `Copy` for `NoSend`/`NoSync`

Reviewed-by: alexcrichton
brson added a commit that referenced this pull request Dec 16, 2014
Necessary to implement `Copy` on structs like this one:

``` rust
struct Slice<'a, T> {
    _contravariant: marker::ContravariantLifetime<'a>,
    _nosend: marker::NoSend,
    data: *const T,
    length: uint,
}
```

r? @alexcrichton
bors added a commit that referenced this pull request Dec 17, 2014
impl `Copy` for `NoSend`/`NoSync`

Reviewed-by: alexcrichton
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Dec 17, 2014
Necessary to implement `Copy` on structs like this one:

``` rust
struct Slice<'a, T> {
    _contravariant: marker::ContravariantLifetime<'a>,
    _nosend: marker::NoSend,
    data: *const T,
    length: uint,
}
```

r? @alexcrichton
@bors bors merged commit f63784f into rust-lang:master Dec 17, 2014
@japaric japaric deleted the copy-markers branch December 20, 2014 12:30
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