Skip to content

we still sometimes permit coercion into ! #50350

Closed
@nikomatsakis

Description

@nikomatsakis

While looking into the precise behavior around ! for #47291, we realized that we still sometimes permit coercion into !, in the coerce_lub code:

// 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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions