Skip to content

[DRAFT] RFC: Attributes galore#18

Closed
Centril wants to merge 3 commits into
masterfrom
rfc/attributes-galore
Closed

[DRAFT] RFC: Attributes galore#18
Centril wants to merge 3 commits into
masterfrom
rfc/attributes-galore

Conversation

@Centril

@Centril Centril commented Nov 25, 2018

Copy link
Copy Markdown
Owner

Rendered

This is a draft version of an RFC for you to review, before a formal proposal is made for consideration.

@Centril

Centril commented Nov 25, 2018

Copy link
Copy Markdown
Owner Author

cc @petrochenkov @kennytm

@petrochenkov

petrochenkov commented Nov 25, 2018

Copy link
Copy Markdown

LGTM, generally, didn't look into the details too much.

Precedence in types needs to be figured out.
Attributes on expressions are not allowed in all positions right now, also due to precedence issues (I never investigated the details though).
Type grammar is somewhat similar to expression grammar, so similar issues may exist as well.

@Centril

Centril commented Nov 25, 2018

Copy link
Copy Markdown
Owner Author

@petrochenkov Cool; I based the changes around type.g; I couldn't think of any notable ambiguities but we might find some during implementation perhaps. The only one that stuck out was where #[foo] A: B where the RFC proposes an interpretation where #[foo] (A: B) as opposed to where (#[foo] A): B.

@petrochenkov

Copy link
Copy Markdown

Yeah, that mirrors the for<'a> A: B ambiguity as well where for<'a> is interpreted as applied to the whole predicate rather than as a part of the type for<'a> A.

@Centril

Centril commented Nov 26, 2018

Copy link
Copy Markdown
Owner Author

Filed as rust-lang#2602. :)

@Centril Centril closed this Nov 26, 2018
Centril pushed a commit that referenced this pull request May 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants