Uh oh!
There was an error while loading. Please reload this page.
Lower constant patterns with ascribed types. - #58161
Conversation
Uh oh!
There was an error while loading. Please reload this page.
arielb1
commented
Feb 6, 2019
r=me with comment in place |
Uh oh!
There was an error while loading. Please reload this page.
This commit fixes a bug introduced by rust-lang#55937 which started checking user type annotations for associated type patterns. Where lowering a associated constant expression would previously return a `PatternKind::Constant`, it now returns a `PatternKind::AscribeUserType` with a `PatternKind::Constant` inside, this commit unwraps that to access the constant pattern inside and behaves as before.
arielb1
commented
Feb 6, 2019
So @matthewjasper had complained that the r=me with that |
arielb1
commented
Feb 8, 2019
bors
commented
Feb 8, 2019
📌 Commit 6717727 has been approved by |
arielb1
commented
Feb 8, 2019
beta-nominating because this fixes a regression in beta. |
bors
commented
Feb 8, 2019
⌛ Testing commit 6717727 with merge 7fcc7a28ebc267130f91107187c3073658f8482e... |
bors
commented
Feb 8, 2019
💔 Test failed - checks-travis |
rust-highfive
commented
Feb 8, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
arielb1
commented
Feb 8, 2019
@bors retry |
arielb1
commented
Feb 8, 2019
cc @kennytm looks spurious |
Lower constant patterns with ascribed types. Fixes#57960. This PR fixes a bug introduced by #55937 which started checking user type annotations for associated type patterns. Where lowering a associated constant expression would previously return a `PatternKind::Constant`, it now returns a `PatternKind::AscribeUserType` with a `PatternKind::Constant` inside, this PR unwraps that to access the constant pattern inside and behaves as before. r? @pnkfelix
bors
commented
Feb 8, 2019
bors
commented
Feb 8, 2019
☀️ Test successful - checks-travis, status-appveyor |
This commit builds on the fix from rust-lang#58161 (which fixed miscompilation caused by the introduction of `AscribeUserType` patterns for associated constants) to start checking these patterns are well-formed for ranges (previous fix just ignored them so that miscompilation wouldn't occur).
Check user type annotations for range patterns. Fixesrust-lang#58299. This PR builds on the fix from rust-lang#58161 (which fixed miscompilation caused by the introduction of `AscribeUserType` patterns for associated constants) to start checking these patterns are well-formed for ranges (previous fix just ignored them so that miscompilation wouldn't occur). r? @arielb1
pnkfelix
commented
Feb 14, 2019
triage, beta-accepted. |
[beta] Rollup backports Cherry-picked: * #58207: Make `intern_lazy_const` actually intern its argument. * #58161: Lower constant patterns with ascribed types. * #57908: resolve: Fix span arithmetics in the import conflict error * #57835: typeck: remove leaky nested probe during trait object method resolution * #57885: Avoid committing to autoderef in object method probing * #57646: Fixes text becoming invisible when element targetted Rolled up: * #58522: [BETA] Update cargo r? @ghost
[beta] Rollup backports Cherry-picked: * #58207: Make `intern_lazy_const` actually intern its argument. * #58161: Lower constant patterns with ascribed types. * #57908: resolve: Fix span arithmetics in the import conflict error * #57835: typeck: remove leaky nested probe during trait object method resolution * #57885: Avoid committing to autoderef in object method probing * #57646: Fixes text becoming invisible when element targetted Rolled up: * #58522: [BETA] Update cargo r? @ghost
Fixes#57960.
This PR fixes a bug introduced by #55937 which started checking user
type annotations for associated type patterns. Where lowering a
associated constant expression would previously return a
PatternKind::Constant, it now returns aPatternKind::AscribeUserTypewith a
PatternKind::Constantinside, this PR unwraps that toaccess the constant pattern inside and behaves as before.
r? @pnkfelix