Skip to content

Conversation

@bellau
Copy link
Contributor

@bellau bellau commented Feb 12, 2022

No description provided.

async || {};
move || {};
async move || {};
static || {};
Copy link
Member

Choose a reason for hiding this comment

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

Can you also include static move || {};?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right. I am going to had it too


T![const] if (la == IDENT || la == T![_] || la == T![mut]) => consts::konst(p, m),
T![static] => consts::static_(p, m),
T![static] if (la == IDENT || la == T![_] || la == T![mut]) => consts::static_(p, m),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
T![static] if (la == IDENT || la == T![_] || la == T![mut]) => consts::static_(p, m),
T![static] if (la == IDENT || la == T![mut]) => consts::static_(p, m),

underscore as name is not valid for statics

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without test '_' i have a regression on tests :
tests::parse_inline_err for the file 0013_anonymous_static.rs
the error is not the expected one

Copy link
Member

Choose a reason for hiding this comment

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

Ah we recover in static_ from this, ye I guess this is fine then.

@Veykril
Copy link
Member

Veykril commented Feb 14, 2022

Thanks!
bors r+

@bors
Copy link
Contributor

bors bot commented Feb 14, 2022

@bors bors bot merged commit 014d3ef into rust-lang:master Feb 14, 2022
@Veykril Veykril changed the title Fix Immovable generator syntax (static ||) not recognized #11448 fix: Fix Immovable generator syntax (static ||) not recognized #11448 Feb 14, 2022
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.

4 participants