Add CoroutineClosure to TyKind, AggregateKind, UpvarArgs
This commit is contained in:
parent
a20421734b
commit
c567eddec2
91 changed files with 579 additions and 101 deletions
|
@ -1435,6 +1435,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
|
|||
| ty::Bound(..)
|
||||
| ty::Error(_)
|
||||
| ty::Closure(..)
|
||||
| ty::CoroutineClosure(..)
|
||||
| ty::Coroutine(..)
|
||||
| ty::CoroutineWitness(..)
|
||||
| ty::Placeholder(..)
|
||||
|
|
|
@ -355,7 +355,7 @@ impl<'tcx> LateLintPass<'tcx> for UnusedResults {
|
|||
Some(len) => is_ty_must_use(cx, ty, expr, span)
|
||||
.map(|inner| MustUsePath::Array(Box::new(inner), len)),
|
||||
},
|
||||
ty::Closure(..) => Some(MustUsePath::Closure(span)),
|
||||
ty::Closure(..) | ty::CoroutineClosure(..) => Some(MustUsePath::Closure(span)),
|
||||
ty::Coroutine(def_id, ..) => {
|
||||
// async fn should be treated as "implementor of `Future`"
|
||||
let must_use = if cx.tcx.coroutine_is_async(def_id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue