Uh oh!
There was an error while loading. Please reload this page.
Lament the invincibility of the Turbofish - #53562
Conversation
rust-highfive
commented
Aug 21, 2018
(rust_highfive has picked a reviewer for you, use r? to override) |
I must say: "oh noes". |
There was a problem hiding this comment.
I'm not sure if there's some sort of poetic device being used here, but to my untrained eye, "a impetuous" seems like an error.
6b664fa to
865b76aComparellogiq
commented
Aug 21, 2018
A turbofish, often lamented |
865b76a to
7f4442cComparenagisa
commented
Aug 21, 2018
@bors r+ rollup |
bors
commented
Aug 21, 2018
📌 Commit 7f4442c5105f4950cf4c19d37cf39fed5347ee0d has been approved by |
wycats
commented
Aug 21, 2018
@varkor While I definitely agree that this makes it "not a slam dunk", I don't think it means that there is no hope. The case in question is very obscure, would be very unlikely to compile both ways in any real scenario, is easily linted (in the case of ambiguity). It is therefore possible that we could decide to make the change anyway (with a long enough time horizon, and with enough practical surveying), and I wouldn't want someone interested in doing the (harder) work of a transition plan to find this issue and decide that there was no point in even attempting it. |
varkor
commented
Aug 21, 2018
@wycats: I personally would love to see a transition plan, though I think the constraints are difficult. The test case here is just to make sure that if someone does intend to tackle the problem, they're aware of this particular ambiguity. I think there's enough context to make clear the point of the test (the origin should be easily located with a quick search). |
withoutboats
commented
Aug 21, 2018
Wouldn't propose any change to this PR, but I agree with @wycats that this isn't necessarily the hard blocker. I would enumerate these constraints on getting rid of the turbofish:
None of these seem impossible to overcome, but possibly difficult. |
eddyb
commented
Aug 22, 2018
We can "just" make this test fail in Rust 2018, right? Riiight? |
7f4442c to
3d5fef6Comparevarkor
commented
Aug 22, 2018
@bors r=nagisa rollup |
bors
commented
Aug 22, 2018
📌 Commit 3d5fef6 has been approved by |
sugar700
commented
Aug 22, 2018
Something worth nothing is that in C# 2.0, a breaking change was introduced to change the way |
…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-i-m
commented
Aug 22, 2018
@varkor Perhaps the test should include a link to this issue for context? |
Rollup of 10 pull requests Successful merges: - #53418 (Mark some suggestions as MachineApplicable) - #53431 (Moved some feature gate ui tests to correct location) - #53442 (Update version of rls-data used with save-analysis) - #53504 (Set applicability for more suggestions.) - #53541 (Fix missing impl trait display as ret type) - #53544 (Point at the trait argument when using unboxed closure) - #53558 (Normalize source line and column numbers.) - #53562 (Lament the invincibility of the Turbofish) - #53574 (Suggest direct raw-pointer dereference) - #53585 (Remove super old comment on function that parses items) Failed merges: - #53472 (Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.) - #53563 (use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into()) r? @ghost
3d5fef6 to
8e90807CompareCentril
commented
Aug 22, 2018
My world is filled with unbounded sorrow. |
varkor
commented
Aug 22, 2018
@mark-i-m: I added one, but slightly too late for the rollup. We can make the change as a follow-up if need be (though given how much attention has been drawn to it now, I imagine it won't be hard to find if anyone stumbles upon it in the test suite 😄). |
bors
commented
Aug 22, 2018
☔ The latest upstream changes (presumably #53607) made this pull request unmergeable. Please resolve the merge conflicts. |
8e90807 to
b188c2aComparevarkor
commented
Aug 22, 2018
Are things going to go terribly wrong if I re-approve this after it's been merged as a rollup, with the context clarification? Let's see. @bors r=nagisa rollup |
bors
commented
Aug 22, 2018
📌 Commit b188c2a has been approved by |
…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).
…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).
Rollup of 16 pull requests Successful merges: - #53311 (Window Mutex: Document that we properly initialize the SRWLock) - #53503 (Discourage overuse of mem::forget) - #53545 (Fix#50865: ICE on impl-trait returning functions reaching private items) - #53559 (add macro check for lint) - #53562 (Lament the invincibility of the Turbofish) - #53563 (use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into()) - #53592 (docs: minor stylistic changes to str/string docs) - #53594 (Update RELEASES.md to include clippy-preview) - #53600 (Fix a grammatical mistake in "expected generic arguments" errors) - #53614 (update nomicon and book) - #53617 (tidy: Stop requiring a license header) - #53618 (Add missing fmt examples) - #53636 (Prefer `.nth(n)` over `.skip(n).next()`.) - #53644 (Use SmallVec for SmallCStr) - #53664 (Remove unnecessary closure in rustc_mir/build/mod.rs) - #53666 (Added rustc_codegen_llvm to compiler documentation.)
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 if generic arguments were accepted without disambiguation, making for confusing and heartbreaking circumstances.