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

Batch up breaking libsyntax changes #33179

Merged
merged 13 commits into from
Apr 24, 2016
Merged

Conversation

nikomatsakis and others added 2 commits April 24, 2016 18:10
Track the span corresponding to the `|...|` part of the closure.
…arth

 Track the span corresponding to the `|...|` part of the closure.

lifted from rust-lang#32756
cc rust-lang#31645

libsyntax-[breaking change]
@rust-highfive
Copy link
Collaborator

r? @nrc

(rust_highfive has picked a reviewer for you, use r? to override)

@Manishearth
Copy link
Member Author

@bors r+

@bors
Copy link
Contributor

bors commented Apr 24, 2016

📌 Commit 4d746a5 has been approved by Manishearth

@bors
Copy link
Contributor

bors commented Apr 24, 2016

⌛ Testing commit 4d746a5 with merge 024761d...

@bors
Copy link
Contributor

bors commented Apr 24, 2016

💔 Test failed - auto-win-msvc-64-cargotest

@Manishearth
Copy link
Member Author

@bors p=100

@Manishearth
Copy link
Member Author

@bors retry

@tamird
Copy link
Contributor

tamird commented Apr 24, 2016

bunch of failures in parse-fail in travis; seems legit?

@Manishearth
Copy link
Member Author

investigating.

@petrochenkov
Copy link
Contributor

Looks like interaction between #33041 and recently landed #33020
I'll rebase my PR now and fix the errors previously unreported by compiletest.

@Manishearth
Copy link
Member Author

perfect, thanks!

@Manishearth
Copy link
Member Author

@bors p=0

petrochenkov and others added 11 commits April 24, 2016 20:59
Lift some restrictions on type parameters in paths
Sanity check import paths for type parameters
Simplify the macro used for generation of keywords
Make `Keyword::ident` private
syntax: Merge PathParsingMode::NoTypesAllowed and PathParsingMode::ImportPrefix
syntax: Rename PathParsingMode and its variants to better express their purpose
syntax: Remove obsolete error message about 'self lifetime
syntax: Remove ALLOW_MODULE_PATHS workaround
syntax/resolve: Adjust some error messages
resolve: Compare unhygienic (not renamed) names with keywords::Invalid, invalid identifiers may appear to be valid after renaming
 Paths are mostly parsed without taking whitespaces into account, e.g. `std :: vec :: Vec :: new ()` parses successfully, however, there are some special cases involving keywords `super`, `self` and `Self`. For example, `self::` is considered a path start only if there are no spaces between `self` and `::`. These restrictions probably made sense when `self` and friends weren't keywords, but now they are unnecessary.

The first two commits remove this special treatment of whitespaces by removing `token::IdentStyle` entirely and therefore fix rust-lang#14109.
This change also affects naked `self` and `super` (which are not tightly followed by `::`, obviously) they can now be parsed as paths, however they are still not resolved correctly in imports (cc @jseyfried, see `compile-fail/use-keyword.rs`), so rust-lang#29036 is not completely fixed.

The third commit also makes `super`, `self`, `Self` and `static` keywords nominally (before this they acted as keywords for all purposes) and removes most of remaining \"special idents\".

The last commit (before tests) contains some small improvements - some qualified paths with type parameters are parsed correctly, `parse_path` is not used for parsing single identifiers, imports are sanity checked for absence of type parameters - such type parameters can be generated by syntax extensions or by macros when rust-lang#10415 is fixed (~~soon!~~already!).

This patch changes some pretty basic things in `libsyntax`, like `token::Token` and the keyword list, so it's a plugin-[breaking-change].

r? @eddyb
@Manishearth Manishearth force-pushed the breaking-batch branch 2 times, most recently from 4968bcc to a31658d Compare April 24, 2016 19:19
@Manishearth
Copy link
Member Author

@bors r+ p=100

@bors
Copy link
Contributor

bors commented Apr 24, 2016

📌 Commit a31658d has been approved by Manishearth

@bors
Copy link
Contributor

bors commented Apr 24, 2016

⌛ Testing commit a31658d with merge 1930483...

bors added a commit that referenced this pull request Apr 24, 2016
Batch up breaking libsyntax changes

Contains:

 - #33125
 - #33041
 - #33157

cc #31645
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.

7 participants