Skip to content

Remove specific errors for very old obsolete syntax (#9627) #9712

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
Oct 4, 2013

Conversation

ben0x539
Copy link
Contributor

@ben0x539 ben0x539 commented Oct 4, 2013

Mostly as per a short discussion on irc. (@cmr)

08:46 < cmr> so I'm thinking
Obsolete{Let,With,FieldTerminator,ClassTraits,ModeInFnType,MoveInit,BinaryMove,I
mplSyntax,MutOwnedPointer,MutVector,RecordType,RecordPattern,PostFnTySigil,Newty
pEnum,Mode,ImplicitSelf,LifetimeNotation,Purity,StaticMethod,ConstItem,FixedLeng
thVectorType}
08:46 < cmr> Those are the ones that are older than 0.6
08:46 < cmr> (at least!)

This PR removes these specific "obsolete syntax"/"suggestion for change" errors and just lets the parser run into regular parser errors for long-invalid syntax. I also removed ObsoletePrivSection which apparently dates further back than cmr or I could recall and ObsoleteUnenforcedBound which seemed unused. Also I removed ObsoleteNewtypeEnum.

Replaces existing tests for removed obsolete-syntax errors with tests
for the resulting regular errors, adds a test for each of the removed
parser errors to make sure that obsolete forms don't start working
again, removes some obsolete/superfluous tests that were now failing.

Deletes some amount of dead code in the parser, also includes some small
changes to parser error messages to accomodate new tests.
@ben0x539
Copy link
Contributor Author

ben0x539 commented Oct 4, 2013

git blame suggests that the oldest ObsoleteSyntax error that are still in are ObsoleteUnsafeBlock followed by ObsoleteBareFnType fro January and March respectively. Should those go too? I wasn't sure how fn types even work right now or how they might change in the future.

Did I remove too much? Not enough? Both?

@emberian
Copy link
Member

emberian commented Oct 4, 2013

@ben0x539 thanks! I think those two are fine to stay. The test coverage is nice too!

r? core-review (r+ from me)

bors added a commit that referenced this pull request Oct 4, 2013
Mostly as per a short discussion on irc. (@cmr)

    08:46 < cmr> so I'm thinking
    Obsolete{Let,With,FieldTerminator,ClassTraits,ModeInFnType,MoveInit,BinaryMove,I
    mplSyntax,MutOwnedPointer,MutVector,RecordType,RecordPattern,PostFnTySigil,Newty
    pEnum,Mode,ImplicitSelf,LifetimeNotation,Purity,StaticMethod,ConstItem,FixedLeng
    thVectorType}
    08:46 < cmr> Those are the ones that are older than 0.6
    08:46 < cmr> (at least!)

This PR removes these specific "obsolete syntax"/"suggestion for change" errors and just lets the parser run into regular parser errors for long-invalid syntax. I also removed `ObsoletePrivSection` which apparently dates further back than cmr or I could recall and `ObsoleteUnenforcedBound` which seemed unused. Also I removed `ObsoleteNewtypeEnum`.
ObsoletePurity,
ObsoleteStaticMethod,
ObsoleteConstItem,
ObsoleteFixedLengthVectorType,
Copy link
Member

Choose a reason for hiding this comment

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

Oh my this is so nice to see.

@bors bors closed this Oct 4, 2013
@bors bors merged commit fa41150 into rust-lang:master Oct 4, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 21, 2022
Remove `lib.register_*` and `src/docs*` in `cargo dev update_lints`

Follow up to rust-lang#9709 / rust-lang#9541

There's a good number of PRs with some leftover `src/docs` files for example, and as a reviewer it's something we're used to ignoring so it can easily slip through

r? `@flip1995`

changelog: none
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.

5 participants