Skip to content

Commit

Permalink
Add doc to ty::View
Browse files Browse the repository at this point in the history
  • Loading branch information
Marwes committed Jan 5, 2020
1 parent db2359b commit b55bab2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/librustc/ty/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ use crate::{

pub use self::ViewKind::*;

/// `View<'tcx, T>` contains a value of `T` but stores the `Ty<'tcx>` ptr that contains the `T`
/// This allows for cheap access to the `Ty<'tcx>` without needing to ask the type interner or
/// losing the `T` type.
#[derive(TypeFoldable, Lift)]
pub struct View<'tcx, T> {
ty: Ty<'tcx>,
Expand Down

0 comments on commit b55bab2

Please sign in to comment.