-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
While looking into the precise behavior around !
for #47291, we realized that we still sometimes permit coercion into !
, in the coerce_lub
code:
rust/src/librustc_typeck/check/mod.rs
Lines 3541 to 3544 in 25749ad
// Any expression that produces a value of type `!` must have diverged | |
if ty.is_never() { | |
self.diverges.set(self.diverges.get() | Diverges::Always); | |
} |
@arielb1 tried to remove that earlier #45880 but we missed this case.
Metadata
Metadata
Assignees
Labels
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
nikomatsakis commentedon Apr 30, 2018
cc #35121
nikomatsakis commentedon Apr 30, 2018
It'd be nice to remove this paragraph from the comment on the
diverges
field, too:nikomatsakis commentedon Apr 30, 2018
cc @varkor -- who may do this =)
Auto merge of #50351 - varkor:vestigial-never-conversion, r=<try>
Auto merge of #50351 - varkor:vestigial-never-conversion, r=nikomatsakis
!
to a type (RFC 1216) #35121