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