Skip to content

Batch up breaking libsyntax changes - #33179

Merged
bors merged 13 commits into
rust-lang:masterfrom
Manishearth:breaking-batch
Apr 24, 2016
Merged

Batch up breaking libsyntax changes#33179
bors merged 13 commits into
rust-lang:masterfrom
Manishearth:breaking-batch

Conversation

@Manishearth

@ManishearthManishearth commented Apr 24, 2016

Copy link
Copy Markdown
Member

nikomatsakisand 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
Copy Markdown
Contributor

r? @nrc

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

@Manishearth

Copy link
Copy Markdown
MemberAuthor

@bors r+

@bors

bors commented Apr 24, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit 4d746a5 has been approved by Manishearth

@bors

bors commented Apr 24, 2016

Copy link
Copy Markdown
Collaborator

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

@bors

bors commented Apr 24, 2016

Copy link
Copy Markdown
Collaborator

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

@Manishearth

Copy link
Copy Markdown
MemberAuthor

@bors p=100

@Manishearth

Copy link
Copy Markdown
MemberAuthor

@bors retry

@tamird

Copy link
Copy Markdown
Contributor

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

@Manishearth

Copy link
Copy Markdown
MemberAuthor

investigating.

@petrochenkov

Copy link
Copy Markdown
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
Copy Markdown
MemberAuthor

perfect, thanks!

@Manishearth

Copy link
Copy Markdown
MemberAuthor

@bors p=0

petrochenkovand 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 fixrust-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
Manishearthforce-pushed the breaking-batch branch 2 times, most recently from 4968bcc to a31658dCompareApril 24, 2016 19:19
@Manishearth

Copy link
Copy Markdown
MemberAuthor

@bors r+ p=100

@bors

bors commented Apr 24, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit a31658d has been approved by Manishearth

@bors

bors commented Apr 24, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit a31658d with merge 1930483...

bors added a commit that referenced this pull request Apr 24, 2016
Sign up for freeto 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

@Manishearth@rust-highfive@bors@tamird@petrochenkov@nrc@nikomatsakis