Skip to content

Specialize kinds inference for Unsafe<T> #13583

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

Merged
merged 1 commit into from
Apr 22, 2014

Conversation

flaper87
Copy link
Contributor

This patch adds a special rule for Unsafe<T> and makes it Share
regardless of whether T is Share.

[breaking-change]

Closes #13125

cc @nikomatsakis

@sfackler
Copy link
Member

yay!

tc | TC::InteriorUnsafe
// FIXME(#13231): This shouldn't be needed after
// opt-in built-in bounds are implemented.
(tc | TC::InteriorUnsafe) & !TC::ReachesNoShare
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just use (tc | TC::InteriorUnsafe) - TC::ReachesNoShare

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, and can you make it TC::Nonsharable, I guess

This patch adds a special rule for `Unsafe<T>` and makes it `Share`
regardless of whether T is `Share`.

[breaking-change]

Closes rust-lang#13125
bors added a commit that referenced this pull request Apr 22, 2014
This patch adds a special rule for `Unsafe<T>` and makes it `Share`
regardless of whether T is `Share`.

[breaking-change]

Closes #13125

cc @nikomatsakis
@bors bors closed this Apr 22, 2014
@bors bors merged commit 5b4d54e into rust-lang:master Apr 22, 2014
@alexcrichton
Copy link
Member

Awesome, thanks @flaper87!

@flaper87 flaper87 deleted the special-unsafe branch April 22, 2014 17:05
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 17, 2023
…Env-to-runnables-extraEnv, r=Veykril

13583 rename runnable env to runnables extra env

closes rust-lang#13583
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 28, 2024
changelog: don't consider lifetimes in bounded types unused (fix `extra_unused_lifetimes` FP rust-lang#13578)
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 28, 2024
…ifetimes` FP) (rust-lang#13583)

Fixes rust-lang#13578

r? @Alexendoo

changelog: don't consider lifetimes in bounded types unused (fix
`extra_unused_lifetimes` FP rust-lang#13578)
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.

Mutex<T> should be Share even if T isn't
5 participants