Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit rustc_middle::ty::TyKind docs #80171

Merged
merged 1 commit into from
Dec 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions compiler/rustc_middle/src/ty/sty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ impl BoundRegionKind {
}
}

/// Defines the kinds of types.
///
/// N.B., if you change this, you'll probably want to change the corresponding
/// AST structure in `librustc_ast/ast.rs` as well.
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, TyEncodable, TyDecodable, Debug)]
Expand All @@ -110,7 +112,7 @@ pub enum TyKind<'tcx> {
/// A primitive floating-point type. For example, `f64`.
Float(ast::FloatTy),

/// Structures, enumerations and unions.
/// Algebraic data types (ADT). For example: structures, enumerations and unions.
///
/// InternalSubsts here, possibly against intuition, *may* contain `Param`s.
/// That is, even after substitution it is possible that there are type
Expand Down Expand Up @@ -170,11 +172,11 @@ pub enum TyKind<'tcx> {
/// `|a| yield a`.
Generator(DefId, SubstsRef<'tcx>, hir::Movability),

/// A type representin the types stored inside a generator.
/// A type representing the types stored inside a generator.
/// This should only appear in GeneratorInteriors.
GeneratorWitness(Binder<&'tcx List<Ty<'tcx>>>),

/// The never type `!`
/// The never type `!`.
Never,

/// A tuple type. For example, `(i32, bool)`.
Expand Down