We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 130e2b7 commit 0ca62ccCopy full SHA for 0ca62cc
src/librustc/ty/view.rs
@@ -14,6 +14,9 @@ use rustc_hir::{self as hir, def_id::DefId};
14
15
pub use self::ViewKind::*;
16
17
+/// `View<'tcx, T>` contains a value of `T` but stores the `Ty<'tcx>` ptr that contains the `T`
18
+/// This allows for cheap access to the `Ty<'tcx>` without needing to ask the type interner or
19
+/// losing the `T` type.
20
#[derive(TypeFoldable, Lift)]
21
pub struct View<'tcx, T> {
22
ty: Ty<'tcx>,
0 commit comments