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

How does BlockCheckMode differ from Unsafety? #66

Closed
shepmaster opened this issue Nov 11, 2016 · 4 comments
Closed

How does BlockCheckMode differ from Unsafety? #66

shepmaster opened this issue Nov 11, 2016 · 4 comments
Milestone

Comments

@shepmaster
Copy link

pub enum BlockCheckMode {
    Default,
    Unsafe,
}
pub enum Unsafety {
    Unsafe,
    Normal,
}

Other than the ordering and choice of Normal vs Default, do these really differ from each other?

@dtolnay
Copy link
Owner

dtolnay commented Nov 11, 2016

Good catch! Looks like this came from libsyntax where they have:

pub enum BlockCheckMode {
    Default,
    Unsafe(UnsafeSource),
}

pub enum Unsafety {
    Unsafe,
    Normal,
}

It makes so much more sense there because they keep track of:

pub enum UnsafeSource {
    CompilerGenerated,
    UserProvided,
}

We're never going to need UnsafeSource so I will plan to unify these in the next breaking release of syn.

@dtolnay dtolnay added this to the 0.11 milestone Nov 11, 2016
@dtolnay
Copy link
Owner

dtolnay commented Dec 22, 2016

Fixed in 7b03591.

@dtolnay dtolnay closed this as completed Dec 22, 2016
@dtolnay
Copy link
Owner

dtolnay commented Jan 24, 2017

I released this change in 0.11.0.

@RReverser
Copy link

RReverser commented Jan 26, 2017

@dtolnay Looks like you released it in 0.10.7 because @SimonSapin bumped version as part of his commit 07c7341 and thus broke semver - our build started failing with Use of undeclared type or module `BlockCheckMode` when Cargo started auto-pulling 0.10.7 instead of 0.10.6 :(

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

No branches or pull requests

3 participants