add negative impl
This commit is contained in:
parent
474ec7a3f4
commit
d35ad8d836
1 changed files with 8 additions and 4 deletions
|
@ -9,6 +9,7 @@
|
|||
#![feature(file_buffered)]
|
||||
#![feature(if_let_guard)]
|
||||
#![feature(let_chains)]
|
||||
#![feature(negative_impls)]
|
||||
#![feature(never_type)]
|
||||
#![feature(rustc_attrs)]
|
||||
#![feature(rustdoc_internals)]
|
||||
|
@ -36,7 +37,9 @@ use rustc_infer::infer::{
|
|||
};
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::query::Providers;
|
||||
use rustc_middle::ty::{self, ParamEnv, RegionVid, Ty, TyCtxt, TypingMode, fold_regions};
|
||||
use rustc_middle::ty::{
|
||||
self, ParamEnv, RegionVid, Ty, TyCtxt, TypeFoldable, TypeVisitable, TypingMode, fold_regions,
|
||||
};
|
||||
use rustc_middle::{bug, span_bug};
|
||||
use rustc_mir_dataflow::impls::{
|
||||
EverInitializedPlaces, MaybeInitializedPlaces, MaybeUninitializedPlaces,
|
||||
|
@ -236,13 +239,14 @@ pub enum ClosureOutlivesSubject<'tcx> {
|
|||
/// This abstraction is necessary because the type may include `ReVar` regions,
|
||||
/// which is what we use internally within NLL code, and they can't be used in
|
||||
/// a query response.
|
||||
///
|
||||
/// DO NOT implement `TypeVisitable` or `TypeFoldable` traits, because this
|
||||
/// type is not recognized as a binder for late-bound region.
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub struct ClosureOutlivesSubjectTy<'tcx> {
|
||||
inner: Ty<'tcx>,
|
||||
}
|
||||
// DO NOT implement `TypeVisitable` or `TypeFoldable` traits, because this
|
||||
// type is not recognized as a binder for late-bound region.
|
||||
impl<'tcx, I> !TypeVisitable<I> for ClosureOutlivesSubjectTy<'tcx> {}
|
||||
impl<'tcx, I> !TypeFoldable<I> for ClosureOutlivesSubjectTy<'tcx> {}
|
||||
|
||||
impl<'tcx> ClosureOutlivesSubjectTy<'tcx> {
|
||||
/// All regions of `ty` must be of kind `ReVar` and must represent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue