We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c630d96 commit 0cffa32Copy full SHA for 0cffa32
src/librustc/middle/ty.rs
@@ -790,6 +790,13 @@ pub enum sty {
790
ty_int(ast::IntTy),
791
ty_uint(ast::UintTy),
792
ty_float(ast::FloatTy),
793
+ /// Substs here, possibly against intuition, *may* contain `ty_param`s.
794
+ /// That is, even after substitution it is possible that there are type
795
+ /// variables. This happens when the `ty_enum` corresponds to an enum
796
+ /// definition and not a concerete use of it. To get the correct `ty_enum`
797
+ /// from the tcx, use the `NodeId` from the `ast::Ty` and look it up in
798
+ /// the `ast_ty_to_ty_cache`. This is probably true for `ty_struct` as
799
+ /// well.`
800
ty_enum(DefId, Substs),
801
ty_box(t),
802
ty_uniq(t),
0 commit comments