You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crates using placement syntax behind a cfg broken #50832
Some crates were using <- behind a feature flag, so they worked on stable even if the placement syntax was nightly-only. After removing it though they fail to compile even on stable with a syntax error, because <- is not recognized anymore.
This is not the first time this is happening, removal of impl Trait for .. {} caused same consequences (see #46480).
We should probably continue parsing <- and report the error later in AST validation.
Discussed in the @rust-lang/compiler meeting. I think we reached this consensus:
in this case, yes, we should do as @petrochenkov suggests: keep parsing, error in AST validation
if in the future, if it happens that we want to repurpose the syntax, we deal with it then: best of course is to use an edition for it, but maybe by then there no longer exist crates using it
going forward, it would be ideal if we could do some kind of "pre-cfg / expansion" feature check to try and avoid this in the future; that may or may not be feasible though, and we couldn't do it retroactively for all existing things anyway
I am working on rayon-hash. The quick hack would be to just nuke the placement stuff, but I'm trying to do a proper update to catch up to std's code -- fun with git subtree.
But frankly, I don't know of anyone really using rayon-hash anyway.
Activity
kennytm commentedon May 17, 2018
It is already fixed in
mbox 0.5.0and0.4.4.nikomatsakis commentedon May 17, 2018
Oh, that's annoying. We should patch rayon-hash.
petrochenkov commentedon May 17, 2018
This is not the first time this is happening, removal of
impl Trait for .. {}caused same consequences (see #46480).We should probably continue parsing
<-and report the error later in AST validation.nikomatsakis commentedon May 17, 2018
Discussed in the @rust-lang/compiler meeting. I think we reached this consensus:
nikomatsakis commentedon May 17, 2018
Some discussion of the final at or around here in the IRC logs
https://botbot.me/mozilla/rustc/2018-05-17/?msg=100165163&page=3
nikomatsakis commentedon May 17, 2018
triage: P-high
nikomatsakis commentedon May 17, 2018
Would anyone have time to whip up a change to the parser?
cc @rust-lang/compiler @aidanhs
nikomatsakis commentedon May 17, 2018
For reference, the PR that reverted the syntax was #48333
cuviper commentedon May 17, 2018
I am working on rayon-hash. The quick hack would be to just nuke the placement stuff, but I'm trying to do a proper update to catch up to
std's code -- fun withgit subtree.But frankly, I don't know of anyone really using rayon-hash anyway.
cuviper commentedon May 17, 2018
Fixed in rayon-hash 0.3.0.
nikomatsakis commentedon May 23, 2018
I'll handle this.
nikomatsakis commentedon May 24, 2018
Restored in #51052
leoyvens commentedon May 24, 2018
We could try calling more attention to lib authors about this through the API guidelines.
Auto merge of #51052 - nikomatsakis:obsolete-arrow, r=petrochenkov
estebank commentedon Sep 19, 2018
The two regressions where about
<-, but we also reverted theinsyntax as well, which has degraded back a couple of errors, like the following:Would it be ok to create a PR removing the
inparsing while keeping the current<-handling for a while longer?CC #36611 #52964 #51602
Rollup merge of rust-lang#54409 - estebank:remove-in, r=pnkfelix