Skip to content

Fix parsing of extern crate self and declaration qualifiers - #28

Closed
faysou wants to merge 2 commits into
aacebo:masterfrom
faysou:fix-extern-crate-self
Closed

faysou wants to merge 2 commits into
aacebo:masterfrom
faysou:fix-extern-crate-self

Conversation

@faysou

@faysou faysou commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

extern crate self as name; parses and formats with the same alias. Lookahead accepts the same crate names as parsing.

Negative polarity is accepted for trait impls, while impl !Type {} is rejected. Trait aliases reject unsafe and auto qualifiers.

The extern, impl, and trait test modules pass.

Related to #25.

@faysou faysou mentioned this pull request Nov 20, 2026
Parse and skip `extern crate self as name;` while continuing to reject
other keywords in the crate name.
A negative marker applies to a trait impl. Trait aliases accept their
bounds without the qualifiers used by trait declarations.
@faysou
faysou force-pushed the fix-extern-crate-self branch from dceaced to 8368423 Compare November 21, 2026 07:02
@faysou faysou closed this Nov 21, 2026
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.

1 participant