Movability doesn't need to be a query anymore
This commit is contained in:
@@ -567,7 +567,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||
ty::Coroutine(coroutine_def_id, _)
|
||||
if self.tcx().lang_items().unpin_trait() == Some(def_id) =>
|
||||
{
|
||||
match self.tcx().movability(coroutine_def_id) {
|
||||
match self.tcx().coroutine_movability(coroutine_def_id) {
|
||||
hir::Movability::Static => {
|
||||
// Immovable coroutines are never `Unpin`, so
|
||||
// suppress the normal auto-impl candidate for it.
|
||||
|
||||
@@ -2185,7 +2185,7 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
|
||||
}
|
||||
|
||||
ty::Coroutine(coroutine_def_id, args) => {
|
||||
match self.tcx().movability(coroutine_def_id) {
|
||||
match self.tcx().coroutine_movability(coroutine_def_id) {
|
||||
hir::Movability::Static => None,
|
||||
hir::Movability::Movable => {
|
||||
if self.tcx().features().coroutine_clone {
|
||||
|
||||
Reference in New Issue
Block a user