-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
we still sometimes permit coercion into !
#50350
Labels
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
nikomatsakis
added
the
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
label
Apr 30, 2018
cc #35121 |
It'd be nice to remove this paragraph from the comment on the /// - To permit assignment into a local variable or other place
/// (including the "return slot") of type `!`. This is allowed
/// if **either** the type of value being assigned is `!`, which
/// means the current code is dead, **or** the expression's
/// diverging flag is true, which means that a diverging value was
/// wrapped (e.g., `let x: ! = foo(return)`). |
cc @varkor -- who may do this =) |
bors
added a commit
that referenced
this issue
May 1, 2018
Remove vestigial diverging !-coercion Such conversions are no longer permitted. Fixes #50350. r? @nikomatsakis
bors
added a commit
that referenced
this issue
May 15, 2018
Remove vestigial diverging !-coercion Such conversions are no longer permitted. Fixes #50350. r? @nikomatsakis
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While looking into the precise behavior around
!
for #47291, we realized that we still sometimes permit coercion into!
, in thecoerce_lub
code:rust/src/librustc_typeck/check/mod.rs
Lines 3541 to 3544 in 25749ad
@arielb1 tried to remove that earlier #45880 but we missed this case.
The text was updated successfully, but these errors were encountered: