T: Drop
bound not satisfied from Option::unwrap_or (et. al) when Drop anti-bound is present
#92111
Labels
C-bug
Category: This is a bug.
regression-from-stable-to-nightly
Performance or correctness regression from stable to nightly.
Milestone
Code
I tried this code:
I expected to see this happen: print
DoesNotHaveDrop(0)
(from Debug impl)Instead, this happened: E0277, trait impl
DoesNotHaveDrop: Drop
not foundThis was found by CI in the Ruffle Project: https://github.com/ruffle-rs/ruffle/runs/4576592287?check_suite_focus=true
The issue is caused by the effective anti-bound of Drop, introduced by the manual impl of the
NoDrop
trait, as well as the PR #91928 which introduced~const Drop
bounds for a number of functions inOption
.Version it worked on
It most recently worked on: rustc 1.59.0-nightly (7abab1e 2021-12-18)
Version with regression
rustc --version --verbose
:@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged
The text was updated successfully, but these errors were encountered: