Rip out legacy reactivity from the typechecker and HackC
[hiphop-php.git] / hphp / hack / src / oxidized_by_ref / gen / typing_defs_core.rs
blob46b3c3fff2b548d7a5754a543cdb5f6007d5f139
1 // Copyright (c) Facebook, Inc. and its affiliates.
2 //
3 // This source code is licensed under the MIT license found in the
4 // LICENSE file in the "hack" directory of this source tree.
5 //
6 // @generated SignedSource<<30b35198b2ff91df27f01498536e02bd>>
7 //
8 // To regenerate this file, run:
9 //   hphp/hack/src/oxidized_regen.sh
11 use arena_trait::TrivialDrop;
12 use no_pos_hash::NoPosHash;
13 use ocamlrep_derive::FromOcamlRep;
14 use ocamlrep_derive::FromOcamlRepIn;
15 use ocamlrep_derive::ToOcamlRep;
16 use serde::Serialize;
18 #[allow(unused_imports)]
19 use crate::*;
21 pub use crate::t_shape_map;
22 pub use crate::typing_reason as reason;
24 #[derive(
25     Clone,
26     Copy,
27     Debug,
28     Eq,
29     FromOcamlRepIn,
30     Hash,
31     NoPosHash,
32     Ord,
33     PartialEq,
34     PartialOrd,
35     Serialize,
36     ToOcamlRep
38 pub struct PosId<'a>(
39     pub &'a pos_or_decl::PosOrDecl<'a>,
40     pub &'a ast_defs::Id_<'a>,
42 impl<'a> TrivialDrop for PosId<'a> {}
44 #[derive(
45     Clone,
46     Copy,
47     Debug,
48     Eq,
49     FromOcamlRepIn,
50     Hash,
51     NoPosHash,
52     Ord,
53     PartialEq,
54     PartialOrd,
55     Serialize,
56     ToOcamlRep
58 pub enum CeVisibility<'a> {
59     Vpublic,
60     Vprivate(&'a str),
61     Vprotected(&'a str),
63 impl<'a> TrivialDrop for CeVisibility<'a> {}
65 #[derive(
66     Clone,
67     Copy,
68     Debug,
69     Eq,
70     FromOcamlRepIn,
71     Hash,
72     NoPosHash,
73     Ord,
74     PartialEq,
75     PartialOrd,
76     Serialize,
77     ToOcamlRep
79 pub enum IfcFunDecl<'a> {
80     FDPolicied(Option<&'a str>),
81     FDInferFlows,
83 impl<'a> TrivialDrop for IfcFunDecl<'a> {}
85 #[derive(
86     Clone,
87     Copy,
88     Debug,
89     Eq,
90     FromOcamlRep,
91     FromOcamlRepIn,
92     Hash,
93     NoPosHash,
94     Ord,
95     PartialEq,
96     PartialOrd,
97     Serialize,
98     ToOcamlRep
100 pub enum Exact {
101     Exact,
102     Nonexact,
104 impl TrivialDrop for Exact {}
106 #[derive(
107     Clone,
108     Copy,
109     Debug,
110     Eq,
111     FromOcamlRep,
112     FromOcamlRepIn,
113     Hash,
114     NoPosHash,
115     Ord,
116     PartialEq,
117     PartialOrd,
118     Serialize,
119     ToOcamlRep
121 pub enum ValKind {
122     Lval,
123     LvalSubexpr,
124     Other,
126 impl TrivialDrop for ValKind {}
128 #[derive(
129     Clone,
130     Copy,
131     Debug,
132     Eq,
133     FromOcamlRep,
134     FromOcamlRepIn,
135     Hash,
136     NoPosHash,
137     Ord,
138     PartialEq,
139     PartialOrd,
140     Serialize,
141     ToOcamlRep
143 pub enum FunTparamsKind {
144     /// If ft_tparams is empty, the containing fun_type is a concrete function type.
145     /// Otherwise, it is a generic function and ft_tparams specifies its type parameters.
146     FTKtparams,
147     /// The containing fun_type is a concrete function type which is an
148     /// instantiation of a generic function with at least one reified type
149     /// parameter. This means that the function requires explicit type arguments
150     /// at every invocation, and ft_tparams specifies the type arguments with
151     /// which the generic function was instantiated, as well as whether each
152     /// explicit type argument must be reified.
153     FTKinstantiatedTargs,
155 impl TrivialDrop for FunTparamsKind {}
157 #[derive(
158     Clone,
159     Copy,
160     Debug,
161     Eq,
162     FromOcamlRep,
163     FromOcamlRepIn,
164     Hash,
165     NoPosHash,
166     Ord,
167     PartialEq,
168     PartialOrd,
169     Serialize,
170     ToOcamlRep
172 pub enum ShapeKind {
173     ClosedShape,
174     OpenShape,
176 impl TrivialDrop for ShapeKind {}
178 #[derive(
179     Clone,
180     Copy,
181     Debug,
182     Eq,
183     FromOcamlRepIn,
184     Hash,
185     NoPosHash,
186     Ord,
187     PartialEq,
188     PartialOrd,
189     Serialize,
190     ToOcamlRep
192 pub struct PosString<'a>(pub &'a pos_or_decl::PosOrDecl<'a>, pub &'a str);
193 impl<'a> TrivialDrop for PosString<'a> {}
195 pub type TByteString<'a> = str;
197 #[derive(
198     Clone,
199     Copy,
200     Debug,
201     Eq,
202     FromOcamlRepIn,
203     Hash,
204     NoPosHash,
205     Ord,
206     PartialEq,
207     PartialOrd,
208     Serialize,
209     ToOcamlRep
211 pub struct PosByteString<'a>(pub &'a pos_or_decl::PosOrDecl<'a>, pub &'a bstr::BStr);
212 impl<'a> TrivialDrop for PosByteString<'a> {}
214 #[derive(
215     Clone,
216     Copy,
217     Debug,
218     Eq,
219     FromOcamlRepIn,
220     Hash,
221     NoPosHash,
222     Ord,
223     PartialEq,
224     PartialOrd,
225     Serialize,
226     ToOcamlRep
228 pub enum TshapeFieldName<'a> {
229     TSFlitInt(&'a PosString<'a>),
230     TSFlitStr(&'a PosByteString<'a>),
231     TSFclassConst(&'a (PosId<'a>, PosString<'a>)),
233 impl<'a> TrivialDrop for TshapeFieldName<'a> {}
235 #[derive(
236     Clone,
237     Copy,
238     Debug,
239     Eq,
240     FromOcamlRep,
241     FromOcamlRepIn,
242     Hash,
243     NoPosHash,
244     Ord,
245     PartialEq,
246     PartialOrd,
247     Serialize,
248     ToOcamlRep
250 pub enum ParamMode {
251     FPnormal,
252     FPinout,
254 impl TrivialDrop for ParamMode {}
256 #[derive(
257     Clone,
258     Copy,
259     Debug,
260     Eq,
261     FromOcamlRep,
262     FromOcamlRepIn,
263     Hash,
264     NoPosHash,
265     Ord,
266     PartialEq,
267     PartialOrd,
268     Serialize,
269     ToOcamlRep
271 pub enum XhpAttrTag {
272     Required,
273     Lateinit,
275 impl TrivialDrop for XhpAttrTag {}
277 #[derive(
278     Clone,
279     Copy,
280     Debug,
281     Eq,
282     FromOcamlRepIn,
283     Hash,
284     NoPosHash,
285     Ord,
286     PartialEq,
287     PartialOrd,
288     Serialize,
289     ToOcamlRep
291 pub struct XhpAttr {
292     pub tag: Option<XhpAttrTag>,
293     pub has_default: bool,
295 impl TrivialDrop for XhpAttr {}
297 /// Denotes the categories of requirements we apply to constructor overrides.
299 /// In the default case, we use Inconsistent. If a class has <<__ConsistentConstruct>>,
300 /// or if it inherits a class that has <<__ConsistentConstruct>>, we use inherited.
301 /// If we have a new final class that doesn't extend from <<__ConsistentConstruct>>,
302 /// then we use Final. Only classes that are Inconsistent or Final can have reified
303 /// generics.
304 #[derive(
305     Clone,
306     Copy,
307     Debug,
308     Eq,
309     FromOcamlRep,
310     FromOcamlRepIn,
311     Hash,
312     NoPosHash,
313     Ord,
314     PartialEq,
315     PartialOrd,
316     Serialize,
317     ToOcamlRep
319 pub enum ConsistentKind {
320     Inconsistent,
321     ConsistentConstruct,
322     FinalClass,
324 impl TrivialDrop for ConsistentKind {}
326 #[derive(
327     Clone,
328     Copy,
329     Debug,
330     Eq,
331     FromOcamlRepIn,
332     Hash,
333     NoPosHash,
334     Ord,
335     PartialEq,
336     PartialOrd,
337     Serialize,
338     ToOcamlRep
340 pub enum DependentType {
341     DTthis,
342     DTexpr(ident::Ident),
344 impl TrivialDrop for DependentType {}
346 #[derive(
347     Clone,
348     Debug,
349     Eq,
350     FromOcamlRepIn,
351     Hash,
352     NoPosHash,
353     Ord,
354     PartialEq,
355     PartialOrd,
356     Serialize,
357     ToOcamlRep
359 pub struct UserAttribute<'a> {
360     pub name: PosId<'a>,
361     pub classname_params: &'a [&'a str],
363 impl<'a> TrivialDrop for UserAttribute<'a> {}
365 #[derive(
366     Clone,
367     Debug,
368     Eq,
369     FromOcamlRepIn,
370     Hash,
371     NoPosHash,
372     Ord,
373     PartialEq,
374     PartialOrd,
375     Serialize,
376     ToOcamlRep
378 pub struct Tparam<'a> {
379     pub variance: oxidized::ast_defs::Variance,
380     pub name: PosId<'a>,
381     pub tparams: &'a [&'a Tparam<'a>],
382     pub constraints: &'a [(oxidized::ast_defs::ConstraintKind, &'a Ty<'a>)],
383     pub reified: oxidized::aast::ReifyKind,
384     pub user_attributes: &'a [&'a UserAttribute<'a>],
386 impl<'a> TrivialDrop for Tparam<'a> {}
388 #[derive(
389     Clone,
390     Debug,
391     Eq,
392     FromOcamlRepIn,
393     Hash,
394     NoPosHash,
395     Ord,
396     PartialEq,
397     PartialOrd,
398     Serialize,
399     ToOcamlRep
401 pub struct WhereConstraint<'a>(
402     pub &'a Ty<'a>,
403     pub oxidized::ast_defs::ConstraintKind,
404     pub &'a Ty<'a>,
406 impl<'a> TrivialDrop for WhereConstraint<'a> {}
408 #[derive(Clone, Debug, FromOcamlRepIn, Hash, NoPosHash, Serialize, ToOcamlRep)]
409 pub struct Ty<'a>(pub &'a reason::Reason<'a>, pub Ty_<'a>);
410 impl<'a> TrivialDrop for Ty<'a> {}
412 /// A shape may specify whether or not fields are required. For example, consider
413 /// this typedef:
415 /// ```
416 /// type ShapeWithOptionalField = shape(?'a' => ?int);
417 /// ```
419 /// With this definition, the field 'a' may be unprovided in a shape. In this
420 /// case, the field 'a' would have sf_optional set to true.
421 #[derive(
422     Clone,
423     Debug,
424     Eq,
425     FromOcamlRepIn,
426     Hash,
427     NoPosHash,
428     Ord,
429     PartialEq,
430     PartialOrd,
431     Serialize,
432     ToOcamlRep
434 pub struct ShapeFieldType<'a> {
435     pub optional: bool,
436     pub ty: &'a Ty<'a>,
438 impl<'a> TrivialDrop for ShapeFieldType<'a> {}
440 #[derive(
441     Clone,
442     Copy,
443     Eq,
444     FromOcamlRepIn,
445     Hash,
446     NoPosHash,
447     Ord,
448     PartialEq,
449     PartialOrd,
450     Serialize,
451     ToOcamlRep
453 pub enum Ty_<'a> {
454     /// The late static bound type of a class
455     Tthis,
456     /// Either an object type or a type alias, ty list are the arguments
457     Tapply(&'a (PosId<'a>, &'a [&'a Ty<'a>])),
458     /// "Any" is the type of a variable with a missing annotation, and "mixed" is
459     /// the type of a variable annotated as "mixed". THESE TWO ARE VERY DIFFERENT!
460     /// Any unifies with anything, i.e., it is both a supertype and subtype of any
461     /// other type. You can do literally anything to it; it's the "trust me" type.
462     /// Mixed, on the other hand, is only a supertype of everything. You need to do
463     /// a case analysis to figure out what it is (i.e., its elimination form).
464     ///
465     /// Here's an example to demonstrate:
466     ///
467     /// ```
468     /// function f($x): int {
469     ///   return $x + 1;
470     /// }
471     /// ```
472     ///
473     /// In that example, $x has type Tany. This unifies with anything, so adding
474     /// one to it is allowed, and returning that as int is allowed.
475     ///
476     /// In contrast, if $x were annotated as mixed, adding one to that would be
477     /// a type error -- mixed is not a subtype of int, and you must be a subtype
478     /// of int to take part in addition. (The converse is true though -- int is a
479     /// subtype of mixed.) A case analysis would need to be done on $x, via
480     /// is_int or similar.
481     ///
482     /// mixed exists only in the decl_phase phase because it is desugared into ?nonnull
483     /// during the localization phase.
484     Tmixed,
485     Tlike(&'a Ty<'a>),
486     Tany(tany_sentinel::TanySentinel),
487     Terr,
488     Tnonnull,
489     /// A dynamic type is a special type which sometimes behaves as if it were a
490     /// top type; roughly speaking, where a specific value of a particular type is
491     /// expected and that type is dynamic, anything can be given. We call this
492     /// behaviour "coercion", in that the types "coerce" to dynamic. In other ways it
493     /// behaves like a bottom type; it can be used in any sort of binary expression
494     /// or even have object methods called from it. However, it is in fact neither.
495     ///
496     /// it captures dynamicism within function scope.
497     /// See tests in typecheck/dynamic/ for more examples.
498     Tdynamic,
499     /// Nullable, called "option" in the ML parlance.
500     Toption(&'a Ty<'a>),
501     /// All the primitive types: int, string, void, etc.
502     Tprim(&'a aast::Tprim),
503     /// A wrapper around fun_type, which contains the full type information for a
504     /// function, method, lambda, etc.
505     Tfun(&'a FunType<'a>),
506     /// Tuple, with ordered list of the types of the elements of the tuple.
507     Ttuple(&'a [&'a Ty<'a>]),
508     /// Whether all fields of this shape are known, types of each of the
509     /// known arms.
510     Tshape(
511         &'a (
512             ShapeKind,
513             t_shape_map::TShapeMap<'a, &'a ShapeFieldType<'a>>,
514         ),
515     ),
516     Tvar(ident::Ident),
517     /// The type of a generic parameter. The constraints on a generic parameter
518     /// are accessed through the lenv.tpenv component of the environment, which
519     /// is set up when checking the body of a function or method. See uses of
520     /// Typing_phase.add_generic_parameters_and_constraints. The list denotes
521     /// type arguments.
522     Tgeneric(&'a (&'a str, &'a [&'a Ty<'a>])),
523     /// Union type.
524     /// The values that are members of this type are the union of the values
525     /// that are members of the components of the union.
526     /// Some examples (writing | for binary union)
527     ///   Tunion []  is the "nothing" type, with no values
528     ///   Tunion [int;float] is the same as num
529     ///   Tunion [null;t] is the same as Toption t
530     Tunion(&'a [&'a Ty<'a>]),
531     Tintersection(&'a [&'a Ty<'a>]),
532     /// Tdarray (ty1, ty2) => "darray<ty1, ty2>"
533     Tdarray(&'a (&'a Ty<'a>, &'a Ty<'a>)),
534     /// Tvarray (ty) => "varray<ty>"
535     Tvarray(&'a Ty<'a>),
536     /// Tvarray_or_darray (ty1, ty2) => "varray_or_darray<ty1, ty2>"
537     TvarrayOrDarray(&'a (&'a Ty<'a>, &'a Ty<'a>)),
538     /// Tvec_or_dict (ty1, ty2) => "vec_or_dict<ty1, ty2>"
539     TvecOrDict(&'a (&'a Ty<'a>, &'a Ty<'a>)),
540     /// Name of class, name of type const, remaining names of type consts
541     Taccess(&'a TaccessType<'a>),
542     /// This represents a type alias that lacks necessary type arguments. Given
543     /// type Foo<T1,T2> = ...
544     /// Tunappliedalias "Foo" stands for usages of plain Foo, without supplying
545     /// further type arguments. In particular, Tunappliedalias always stands for
546     /// a higher-kinded type. It is never used for an alias like
547     /// type Foo2 = ...
548     /// that simply doesn't require type arguments.
549     TunappliedAlias(&'a str),
550     /// The type of an opaque type or enum. Outside their defining files or
551     /// when they represent enums, they are "opaque", which means that they
552     /// only unify with themselves. Within a file, uses of newtypes are
553     /// expanded to their definitions (unless the newtype is an enum).
554     ///
555     /// However, it is possible to have a constraint that allows us to relax
556     /// opaqueness. For example:
557     ///
558     ///   newtype MyType as int = ...
559     ///
560     /// or
561     ///
562     ///   enum MyType: int as int { ... }
563     ///
564     /// Outside of the file where the type was defined, this translates to:
565     ///
566     ///   Tnewtype ((pos, "MyType"), [], Tprim Tint)
567     ///
568     /// which means that MyType is abstract, but is a subtype of int as well.
569     /// When the constraint is omitted, the third parameter is set to mixed.
570     ///
571     /// The second parameter is the list of type arguments to the type.
572     Tnewtype(&'a (&'a str, &'a [&'a Ty<'a>], &'a Ty<'a>)),
573     /// see dependent_type
574     Tdependent(&'a (DependentType, &'a Ty<'a>)),
575     /// Tobject is an object type compatible with all objects. This type is also
576     /// compatible with some string operations (since a class might implement
577     /// __toString), but not with string type hints.
578     ///
579     /// Tobject is currently used to type code like:
580     ///   ../test/typecheck/return_unknown_class.php
581     Tobject,
582     /// An instance of a class or interface, ty list are the arguments
583     /// If exact=Exact, then this represents instances of *exactly* this class
584     /// If exact=Nonexact, this also includes subclasses
585     Tclass(&'a (PosId<'a>, Exact, &'a [&'a Ty<'a>])),
587 impl<'a> TrivialDrop for Ty_<'a> {}
589 #[derive(
590     Clone,
591     Debug,
592     Eq,
593     FromOcamlRepIn,
594     Hash,
595     NoPosHash,
596     Ord,
597     PartialEq,
598     PartialOrd,
599     Serialize,
600     ToOcamlRep
602 pub struct TaccessType<'a>(pub &'a Ty<'a>, pub PosId<'a>);
603 impl<'a> TrivialDrop for TaccessType<'a> {}
605 #[derive(
606     Clone,
607     Copy,
608     Debug,
609     Eq,
610     FromOcamlRepIn,
611     Hash,
612     NoPosHash,
613     Ord,
614     PartialEq,
615     PartialOrd,
616     Serialize,
617     ToOcamlRep
619 pub enum Capability<'a> {
620     CapDefaults(&'a pos_or_decl::PosOrDecl<'a>),
621     CapTy(&'a Ty<'a>),
623 impl<'a> TrivialDrop for Capability<'a> {}
625 /// Companion to fun_params type, intended to consolidate checking of
626 /// implicit params for functions.
627 #[derive(
628     Clone,
629     Debug,
630     Eq,
631     FromOcamlRepIn,
632     Hash,
633     NoPosHash,
634     Ord,
635     PartialEq,
636     PartialOrd,
637     Serialize,
638     ToOcamlRep
640 pub struct FunImplicitParams<'a> {
641     pub capability: Capability<'a>,
643 impl<'a> TrivialDrop for FunImplicitParams<'a> {}
645 /// The type of a function AND a method.
646 /// A function has a min and max arity because of optional arguments
647 #[derive(
648     Clone,
649     Debug,
650     Eq,
651     FromOcamlRepIn,
652     Hash,
653     NoPosHash,
654     Ord,
655     PartialEq,
656     PartialOrd,
657     Serialize,
658     ToOcamlRep
660 pub struct FunType<'a> {
661     pub arity: FunArity<'a>,
662     pub tparams: &'a [&'a Tparam<'a>],
663     pub where_constraints: &'a [&'a WhereConstraint<'a>],
664     pub params: &'a FunParams<'a>,
665     pub implicit_params: &'a FunImplicitParams<'a>,
666     /// Carries through the sync/async information from the aast
667     pub ret: &'a PossiblyEnforcedTy<'a>,
668     pub flags: typing_defs_flags::FunTypeFlags,
669     pub ifc_decl: IfcFunDecl<'a>,
671 impl<'a> TrivialDrop for FunType<'a> {}
673 /// Arity information for a fun_type; indicating the minimum number of
674 /// args expected by the function and the maximum number of args for
675 /// standard, non-variadic functions or the type of variadic argument taken
676 #[derive(
677     Clone,
678     Copy,
679     Debug,
680     Eq,
681     FromOcamlRepIn,
682     Hash,
683     NoPosHash,
684     Ord,
685     PartialEq,
686     PartialOrd,
687     Serialize,
688     ToOcamlRep
690 pub enum FunArity<'a> {
691     Fstandard,
692     /// PHP5.6-style ...$args finishes the func declaration.
693     /// min ; variadic param type
694     Fvariadic(&'a FunParam<'a>),
696 impl<'a> TrivialDrop for FunArity<'a> {}
698 #[derive(
699     Clone,
700     Debug,
701     Eq,
702     FromOcamlRepIn,
703     Hash,
704     NoPosHash,
705     Ord,
706     PartialEq,
707     PartialOrd,
708     Serialize,
709     ToOcamlRep
711 pub struct PossiblyEnforcedTy<'a> {
712     /// True if consumer of this type enforces it at runtime
713     pub enforced: bool,
714     pub type_: &'a Ty<'a>,
716 impl<'a> TrivialDrop for PossiblyEnforcedTy<'a> {}
718 #[derive(
719     Clone,
720     Debug,
721     Eq,
722     FromOcamlRepIn,
723     Hash,
724     NoPosHash,
725     Ord,
726     PartialEq,
727     PartialOrd,
728     Serialize,
729     ToOcamlRep
731 pub struct FunParam<'a> {
732     pub pos: &'a pos_or_decl::PosOrDecl<'a>,
733     pub name: Option<&'a str>,
734     pub type_: &'a PossiblyEnforcedTy<'a>,
735     pub flags: typing_defs_flags::FunParamFlags,
737 impl<'a> TrivialDrop for FunParam<'a> {}
739 pub type FunParams<'a> = [&'a FunParam<'a>];
741 #[derive(
742     Clone,
743     Copy,
744     Debug,
745     Eq,
746     FromOcamlRep,
747     FromOcamlRepIn,
748     Hash,
749     NoPosHash,
750     Ord,
751     PartialEq,
752     PartialOrd,
753     Serialize,
754     ToOcamlRep
756 pub enum DestructureKind {
757     ListDestructure,
758     SplatUnpack,
760 impl TrivialDrop for DestructureKind {}
762 #[derive(
763     Clone,
764     Debug,
765     Eq,
766     FromOcamlRepIn,
767     Hash,
768     NoPosHash,
769     Ord,
770     PartialEq,
771     PartialOrd,
772     Serialize,
773     ToOcamlRep
775 pub struct Destructure<'a> {
776     /// This represents the standard parameters of a function or the fields in a list
777     /// destructuring assignment. Example:
778     ///
779     /// function take(bool $b, float $f = 3.14, arraykey ...$aks): void {}
780     /// function f((bool, float, int, string) $tup): void {
781     ///   take(...$tup);
782     /// }
783     ///
784     /// corresponds to the subtyping assertion
785     ///
786     /// (bool, float, int, string) <: splat([#1], [opt#2], ...#3)
787     pub required: &'a [&'a Ty<'a>],
788     /// Represents the optional parameters in a function, only used for splats
789     pub optional: &'a [&'a Ty<'a>],
790     /// Represents a function's variadic parameter, also only used for splats
791     pub variadic: Option<&'a Ty<'a>>,
792     /// list() destructuring allows for partial matches on lists, even when the operation
793     /// might throw i.e. list($a) = vec[];
794     pub kind: DestructureKind,
796 impl<'a> TrivialDrop for Destructure<'a> {}
798 #[derive(
799     Clone,
800     Debug,
801     Eq,
802     FromOcamlRepIn,
803     Hash,
804     NoPosHash,
805     Ord,
806     PartialEq,
807     PartialOrd,
808     Serialize,
809     ToOcamlRep
811 pub struct HasMember<'a> {
812     pub name: nast::Sid<'a>,
813     pub type_: &'a Ty<'a>,
814     /// This is required to check ambiguous object access, where sometimes
815     /// HHVM would access the private member of a parent class instead of the
816     /// one from the current class.
817     pub class_id: &'a nast::ClassId_<'a>,
818     pub explicit_targs: Option<&'a [&'a nast::Targ<'a>]>,
820 impl<'a> TrivialDrop for HasMember<'a> {}
822 #[derive(
823     Clone,
824     Copy,
825     Debug,
826     Eq,
827     FromOcamlRepIn,
828     Hash,
829     NoPosHash,
830     Ord,
831     PartialEq,
832     PartialOrd,
833     Serialize,
834     ToOcamlRep
836 pub enum ConstraintType_<'a> {
837     ThasMember(&'a HasMember<'a>),
838     /// The type of container destructuring via list() or splat `...`
839     Tdestructure(&'a Destructure<'a>),
840     TCunion(&'a (&'a Ty<'a>, ConstraintType<'a>)),
841     TCintersection(&'a (&'a Ty<'a>, ConstraintType<'a>)),
843 impl<'a> TrivialDrop for ConstraintType_<'a> {}
845 #[derive(
846     Clone,
847     Copy,
848     Debug,
849     FromOcamlRepIn,
850     Hash,
851     NoPosHash,
852     Serialize,
853     ToOcamlRep
855 pub struct ConstraintType<'a>(pub &'a reason::Reason<'a>, pub &'a ConstraintType_<'a>);
856 impl<'a> TrivialDrop for ConstraintType<'a> {}
858 #[derive(
859     Clone,
860     Copy,
861     Debug,
862     Eq,
863     FromOcamlRepIn,
864     Hash,
865     NoPosHash,
866     Ord,
867     PartialEq,
868     PartialOrd,
869     Serialize,
870     ToOcamlRep
872 pub enum InternalType<'a> {
873     LoclType(&'a Ty<'a>),
874     ConstraintType(ConstraintType<'a>),
876 impl<'a> TrivialDrop for InternalType<'a> {}