1 // Copyright (c) Facebook, Inc. and its affiliates.
3 // This source code is licensed under the MIT license found in the
4 // LICENSE file in the "hack" directory of this source tree.
6 #[allow(unused_imports)]
12 use type_parameter_env::TypeParameterEnv;
13 use typing_inference_env::TypingInferenceEnv;
14 use typing_logic::SubtypeProp;
15 use typing_tyvar_occurrences::TypingTyvarOccurrences;
17 const INFERENCE_ENV: TypingInferenceEnv<'_> = TypingInferenceEnv {
20 subtype_prop: SubtypeProp::default_ref(),
21 tyvar_occurrences: &TYVAR_OCCURRENCES,
22 allow_solve_globals: false,
25 const TYVAR_OCCURRENCES: TypingTyvarOccurrences<'_> = TypingTyvarOccurrences {
26 tyvar_occurrences: IMap::empty(),
27 tyvars_in_tyvar: IMap::empty(),
30 const TPENV: TypeParameterEnv<'_> = TypeParameterEnv {
31 tparams: SMap::empty(),
35 impl Default for SavedEnv<'_> {
36 fn default() -> Self {
38 tcopt: Default::default(),
39 inference_env: &INFERENCE_ENV,
41 condition_types: Default::default(),
42 pessimize: Default::default(),