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

Don't require unsafe blocks for Share mut items #13348

Closed
wants to merge 3 commits into from

Commits on Apr 11, 2014

  1. Configuration menu
    Copy the full SHA
    2b98349 View commit details
    Browse the repository at this point in the history
  2. Use a visitor env instead of an instance flag

    Instead of having an `unsafe_block` field in the `EffectVisitor`, use an
    env to hold this information. Envs are clone before walking a
    sub-expression, this helps keeping flags isolated and per-expression.
    flaper87 committed Apr 11, 2014
    Configuration menu
    Copy the full SHA
    e04c03d View commit details
    Browse the repository at this point in the history
  3. Allow taking &-pointers of Share mut static items

    In general, it's not allowed to access mutable static items outside an
    unsafe block. However, taking an immutable address of a mutable static
    items whose type implements `Share` is considered a safe operation. This
    is enforced by `rustc::middle::effect`
    
    Closes rust-lang#13232
    flaper87 committed Apr 11, 2014
    Configuration menu
    Copy the full SHA
    1d0fa72 View commit details
    Browse the repository at this point in the history