1
Fork 0

Merge hir::GeneratorMovability into ast::Movability.

This commit is contained in:
Camille GILLOT 2019-11-09 18:06:57 +01:00
parent f03cbc313d
commit 5b30da10b6
17 changed files with 32 additions and 42 deletions

View file

@ -1339,10 +1339,14 @@ pub enum CaptureBy {
Ref,
}
/// The movability of a generator / closure literal.
#[derive(Clone, PartialEq, RustcEncodable, RustcDecodable, Debug, Copy)]
/// The movability of a generator / closure literal:
/// whether a generator contains self-references, causing it to be `!Unpin`.
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
RustcEncodable, RustcDecodable, Debug, Copy)]
pub enum Movability {
/// May contain self-references, `!Unpin`.
Static,
/// Must not contain self-references, `Unpin`.
Movable,
}