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

[Do not merge] Allow generic parameters to be specified in expressions without :: #53511

Closed
wants to merge 3 commits into from

Conversation

varkor
Copy link
Member

@varkor varkor commented Aug 19, 2018

Note: this PR is an experiment in making the :: generics disambiguation in expressions optional. It is not intended to be merged. Any serious consideration of such a change would be subject to the full RFC process.


I was almost ready to move on, then I realised I had made a silly mistake in the last experiment. I wanted to just see whether this small optimisation made a difference or not.

(I closed the old branch on #53074, so I had to open a new PR.)

r? @varkor (not sure if this works, to avoid pinging anyone unnecessarily)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 19, 2018
@varkor
Copy link
Member Author

varkor commented Aug 19, 2018

@bors try

@bors
Copy link
Contributor

bors commented Aug 19, 2018

⌛ Trying commit 255468e with merge ea8007c6cfa49b8dce63680b3993b974bbc0c6d4...

@Mark-Simulacrum
Copy link
Member

You can r? @ghost as well, same as we do for rollup PRs automatically.

@varkor
Copy link
Member Author

varkor commented Aug 20, 2018

You can r? @ghost as well, same as we do for rollup PRs automatically.

Ah, neat, thanks!

@bors
Copy link
Contributor

bors commented Aug 20, 2018

☀️ Test successful - status-travis
State: approved= try=True

@varkor
Copy link
Member Author

varkor commented Aug 20, 2018

@rust-timer build ea8007c6cfa49b8dce63680b3993b974bbc0c6d4

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Success: Queued ea8007c6cfa49b8dce63680b3993b974bbc0c6d4 with parent f28f648, comparison URL.

@varkor
Copy link
Member Author

varkor commented Aug 20, 2018

@bors try

@bors
Copy link
Contributor

bors commented Aug 20, 2018

⌛ Trying commit ca4eb90 with merge 670e75fae5ca5024e3e2ec5903f7c41a0fe58e62...

@rust-highfive

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Aug 20, 2018

☀️ Test successful - status-travis
State: approved= try=True

@varkor
Copy link
Member Author

varkor commented Aug 20, 2018

@rust-timer build 670e75fae5ca5024e3e2ec5903f7c41a0fe58e62

@rust-timer
Copy link
Collaborator

Success: Queued 670e75fae5ca5024e3e2ec5903f7c41a0fe58e62 with parent bf1e461, comparison URL.

@varkor
Copy link
Member Author

varkor commented Aug 21, 2018

rust-lang/rfcs#2527 has now been opened following the discoveries here.

@varkor
Copy link
Member Author

varkor commented Aug 21, 2018

While this is feasible from a performance perspective, there are additional grammar ambiguities I had not considered. Sadly this experiment must remain that.

@varkor varkor closed this Aug 21, 2018
bors added a commit that referenced this pull request Aug 21, 2018
[Do not merge] Optional turbofish breakage test

As an academic exercise, to satisfy ourselves that we completely understand the lay of the land, we'd like to see how often ambiguous cases arise in real-world Rust code. (Following on from #53511.)

@rust-lang/infra: is it possible to get a check-only crater run for this change?

r? @ghost
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Aug 22, 2018
…nagisa

Lament the invincibility of the Turbofish

Here a test case is added to ensure that any others attempting to drive the Turbofish to extinction have second thoughts. Previously the [entire test suite would succeed](rust-lang#53511) if generic arguments were accepted without disambiguation, making for [confusing and heartbreaking circumstances](rust-lang/rfcs#2527).
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Aug 22, 2018
…nagisa

Lament the invincibility of the Turbofish

Here a test case is added to ensure that any others attempting to drive the Turbofish to extinction have second thoughts. Previously the [entire test suite would succeed](rust-lang#53511) if generic arguments were accepted without disambiguation, making for [confusing and heartbreaking circumstances](rust-lang/rfcs#2527).
kennytm added a commit to kennytm/rust that referenced this pull request Aug 24, 2018
…nagisa

Lament the invincibility of the Turbofish

Here a test case is added to ensure that any others attempting to drive the Turbofish to extinction have second thoughts. Previously the [entire test suite would succeed](rust-lang#53511) if generic arguments were accepted without disambiguation, making for [confusing and heartbreaking circumstances](rust-lang/rfcs#2527).
bors added a commit that referenced this pull request Sep 13, 2018
[Do not merge] Optional turbofish breakage test

As an academic exercise, to satisfy ourselves that we completely understand the lay of the land, we'd like to see how often ambiguous cases arise in real-world Rust code. (Following on from #53511.)

@rust-lang/infra: is it possible to get a check-only crater run for this change?

r? @ghost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants