1use derive_where::derive_where;
21use rustc_type_ir_macros::{GenericTypeVisitable, TypeFoldable_Generic, TypeVisitable_Generic};
22use thin_vec::ThinVec;
23
24use crate::search_graph::RequiredDepth;
25use crate::solve::{CandidateSource, Certainty, Goal, GoalSource, QueryResult};
26use crate::{Canonical, CanonicalVarValues, Interner};
27
28#[automatically_derived]
impl<I: Interner, T> ::core::clone::Clone for State<I, T> where I: Interner,
T: ::core::clone::Clone {
#[inline]
fn clone(&self) -> Self {
match self {
State { var_values: ref __field_var_values, data: ref __field_data
} =>
State {
var_values: ::core::clone::Clone::clone(__field_var_values),
data: ::core::clone::Clone::clone(__field_data),
},
}
}
}
#[automatically_derived]
impl<I: Interner, T> ::core::cmp::PartialEq for State<I, T> where I: Interner,
T: ::core::cmp::PartialEq {
#[inline]
fn eq(&self, __other: &Self) -> ::core::primitive::bool {
match (self, __other) {
(State {
var_values: ref __field_var_values, data: ref __field_data },
State {
var_values: ref __other_field_var_values,
data: ref __other_field_data }) =>
true &&
::core::cmp::PartialEq::eq(__field_var_values,
__other_field_var_values) &&
::core::cmp::PartialEq::eq(__field_data,
__other_field_data),
}
}
}
#[automatically_derived]
impl<I: Interner, T> ::core::hash::Hash for State<I, T> where I: Interner,
T: ::core::hash::Hash {
fn hash<__H: ::core::hash::Hasher>(&self, __state: &mut __H) {
match self {
State { var_values: ref __field_var_values, data: ref __field_data
} => {
::core::hash::Hash::hash(__field_var_values, __state);
::core::hash::Hash::hash(__field_data, __state);
}
}
}
}
#[automatically_derived]
impl<I: Interner, T> ::core::fmt::Debug for State<I, T> where I: Interner,
T: ::core::fmt::Debug {
fn fmt(&self, __f: &mut ::core::fmt::Formatter<'_>)
-> ::core::fmt::Result {
match self {
State { var_values: ref __field_var_values, data: ref __field_data
} => {
let mut __builder =
::core::fmt::Formatter::debug_struct(__f, "State");
::core::fmt::DebugStruct::field(&mut __builder, "var_values",
__field_var_values);
::core::fmt::DebugStruct::field(&mut __builder, "data",
__field_data);
::core::fmt::DebugStruct::finish(&mut __builder)
}
}
}
}
#[automatically_derived]
impl<I: Interner, T> ::core::marker::Copy for State<I, T> where I: Interner,
T: Copy {
}#[derive_where(Clone, PartialEq, Hash, Debug; I: Interner, T)]
35#[derive_where(Copy; I: Interner, T: Copy)]
36#[derive(const _: () =
{
impl<I: Interner, T> ::rustc_type_ir::TypeVisitable<I> for State<I, T>
where I: Interner,
CanonicalVarValues<I>: ::rustc_type_ir::TypeVisitable<I>,
T: ::rustc_type_ir::TypeVisitable<I> {
fn visit_with<__V: ::rustc_type_ir::TypeVisitor<I>>(&self,
__visitor: &mut __V) -> __V::Result {
match *self {
State { var_values: ref __binding_0, data: ref __binding_1 }
=> {
{
match ::rustc_type_ir::VisitorResult::branch(::rustc_type_ir::TypeVisitable::visit_with(__binding_0,
__visitor)) {
::core::ops::ControlFlow::Continue(()) => {}
::core::ops::ControlFlow::Break(r) => {
return ::rustc_type_ir::VisitorResult::from_residual(r);
}
}
}
{
match ::rustc_type_ir::VisitorResult::branch(::rustc_type_ir::TypeVisitable::visit_with(__binding_1,
__visitor)) {
::core::ops::ControlFlow::Continue(()) => {}
::core::ops::ControlFlow::Break(r) => {
return ::rustc_type_ir::VisitorResult::from_residual(r);
}
}
}
}
}
<__V::Result as ::rustc_type_ir::VisitorResult>::output()
}
}
};TypeVisitable_Generic, const _: () =
{
unsafe impl<I: Interner, T, __V>
::rustc_type_ir::GenericTypeVisitable<__V> for State<I, T> where
CanonicalVarValues<I>: ::rustc_type_ir::GenericTypeVisitable<__V>,
T: ::rustc_type_ir::GenericTypeVisitable<__V> {
fn generic_visit_with(&self, __visitor: &mut __V) {
match *self {
State { var_values: ref __binding_0, data: ref __binding_1 }
=> {
{
::rustc_type_ir::GenericTypeVisitable::<__V>::generic_visit_with(__binding_0,
__visitor);
}
{
::rustc_type_ir::GenericTypeVisitable::<__V>::generic_visit_with(__binding_1,
__visitor);
}
}
}
}
}
};GenericTypeVisitable, const _: () =
{
impl<I: Interner, T> ::rustc_type_ir::TypeFoldable<I> for State<I, T>
where I: Interner, T: ::rustc_type_ir::TypeFoldable<I>,
CanonicalVarValues<I>: ::rustc_type_ir::TypeFoldable<I>,
T: ::rustc_type_ir::TypeFoldable<I> {
fn try_fold_with<__F: ::rustc_type_ir::FallibleTypeFolder<I>>(self,
__folder: &mut __F) -> Result<Self, __F::Error> {
Ok(match self {
State { var_values: __binding_0, data: __binding_1 } => {
State {
var_values: ::rustc_type_ir::TypeFoldable::try_fold_with(__binding_0,
__folder)?,
data: ::rustc_type_ir::TypeFoldable::try_fold_with(__binding_1,
__folder)?,
}
}
})
}
fn fold_with<__F: ::rustc_type_ir::TypeFolder<I>>(self,
__folder: &mut __F) -> Self {
match self {
State { var_values: __binding_0, data: __binding_1 } => {
State {
var_values: ::rustc_type_ir::TypeFoldable::fold_with(__binding_0,
__folder),
data: ::rustc_type_ir::TypeFoldable::fold_with(__binding_1,
__folder),
}
}
}
}
}
};TypeFoldable_Generic)]
37pub struct State<I: Interner, T> {
38 pub var_values: CanonicalVarValues<I>,
39 pub data: T,
40}
41
42impl<I: Interner, T: Eq> Eq for State<I, T> {}
43
44pub type CanonicalState<I, T> = Canonical<I, State<I, T>>;
45
46#[automatically_derived]
impl<I: Interner> ::core::cmp::PartialEq for GoalEvaluation<I> where
I: Interner {
#[inline]
fn eq(&self, __other: &Self) -> ::core::primitive::bool {
match (self, __other) {
(GoalEvaluation {
uncanonicalized_goal: ref __field_uncanonicalized_goal,
orig_values: ref __field_orig_values,
final_revision: ref __field_final_revision,
result: ref __field_result,
required_depth: ref __field_required_depth }, GoalEvaluation {
uncanonicalized_goal: ref __other_field_uncanonicalized_goal,
orig_values: ref __other_field_orig_values,
final_revision: ref __other_field_final_revision,
result: ref __other_field_result,
required_depth: ref __other_field_required_depth }) =>
true &&
::core::cmp::PartialEq::eq(__field_uncanonicalized_goal,
__other_field_uncanonicalized_goal) &&
::core::cmp::PartialEq::eq(__field_orig_values,
__other_field_orig_values) &&
::core::cmp::PartialEq::eq(__field_final_revision,
__other_field_final_revision) &&
::core::cmp::PartialEq::eq(__field_result,
__other_field_result) &&
::core::cmp::PartialEq::eq(__field_required_depth,
__other_field_required_depth),
}
}
}
const _: () =
{
trait DeriveWhereAssertEq {
fn assert(&self);
}
impl<I: Interner> DeriveWhereAssertEq for GoalEvaluation<I> where
I: Interner {
fn assert(&self) {
struct __AssertEq<__T: ::core::cmp::Eq +
?::core::marker::Sized>(::core::marker::PhantomData<__T>);
let _: __AssertEq<Goal<I, I::Predicate>>;
let _: __AssertEq<ThinVec<I::GenericArg>>;
let _: __AssertEq<I::Probe>;
let _: __AssertEq<QueryResult<I>>;
let _: __AssertEq<RequiredDepth>;
}
}
};
#[automatically_derived]
impl<I: Interner> ::core::cmp::Eq for GoalEvaluation<I> where I: Interner { }
#[automatically_derived]
impl<I: Interner> ::core::hash::Hash for GoalEvaluation<I> where I: Interner {
fn hash<__H: ::core::hash::Hasher>(&self, __state: &mut __H) {
match self {
GoalEvaluation {
uncanonicalized_goal: ref __field_uncanonicalized_goal,
orig_values: ref __field_orig_values,
final_revision: ref __field_final_revision,
result: ref __field_result,
required_depth: ref __field_required_depth } => {
::core::hash::Hash::hash(__field_uncanonicalized_goal,
__state);
::core::hash::Hash::hash(__field_orig_values, __state);
::core::hash::Hash::hash(__field_final_revision, __state);
::core::hash::Hash::hash(__field_result, __state);
::core::hash::Hash::hash(__field_required_depth, __state);
}
}
}
}#[derive_where(PartialEq, Eq, Hash; I: Interner)]
51pub struct GoalEvaluation<I: Interner> {
52 pub uncanonicalized_goal: Goal<I, I::Predicate>,
53 pub orig_values: ThinVec<I::GenericArg>,
54 pub final_revision: I::Probe,
55 pub result: QueryResult<I>,
56 pub required_depth: RequiredDepth,
57}
58
59#[automatically_derived]
impl<I: Interner> ::core::cmp::PartialEq for Probe<I> where I: Interner {
#[inline]
fn eq(&self, __other: &Self) -> ::core::primitive::bool {
match (self, __other) {
(Probe {
steps: ref __field_steps,
kind: ref __field_kind,
final_state: ref __field_final_state }, Probe {
steps: ref __other_field_steps,
kind: ref __other_field_kind,
final_state: ref __other_field_final_state }) =>
true &&
::core::cmp::PartialEq::eq(__field_steps,
__other_field_steps) &&
::core::cmp::PartialEq::eq(__field_kind, __other_field_kind)
&&
::core::cmp::PartialEq::eq(__field_final_state,
__other_field_final_state),
}
}
}
const _: () =
{
trait DeriveWhereAssertEq {
fn assert(&self);
}
impl<I: Interner> DeriveWhereAssertEq for Probe<I> where I: Interner {
fn assert(&self) {
struct __AssertEq<__T: ::core::cmp::Eq +
?::core::marker::Sized>(::core::marker::PhantomData<__T>);
let _: __AssertEq<Vec<ProbeStep<I>>>;
let _: __AssertEq<ProbeKind<I>>;
let _: __AssertEq<CanonicalState<I, ()>>;
}
}
};
#[automatically_derived]
impl<I: Interner> ::core::cmp::Eq for Probe<I> where I: Interner { }
#[automatically_derived]
impl<I: Interner> ::core::hash::Hash for Probe<I> where I: Interner {
fn hash<__H: ::core::hash::Hasher>(&self, __state: &mut __H) {
match self {
Probe {
steps: ref __field_steps,
kind: ref __field_kind,
final_state: ref __field_final_state } => {
::core::hash::Hash::hash(__field_steps, __state);
::core::hash::Hash::hash(__field_kind, __state);
::core::hash::Hash::hash(__field_final_state, __state);
}
}
}
}
#[automatically_derived]
impl<I: Interner> ::core::fmt::Debug for Probe<I> where I: Interner {
fn fmt(&self, __f: &mut ::core::fmt::Formatter<'_>)
-> ::core::fmt::Result {
match self {
Probe {
steps: ref __field_steps,
kind: ref __field_kind,
final_state: ref __field_final_state } => {
let mut __builder =
::core::fmt::Formatter::debug_struct(__f, "Probe");
::core::fmt::DebugStruct::field(&mut __builder, "steps",
__field_steps);
::core::fmt::DebugStruct::field(&mut __builder, "kind",
__field_kind);
::core::fmt::DebugStruct::field(&mut __builder, "final_state",
__field_final_state);
::core::fmt::DebugStruct::finish(&mut __builder)
}
}
}
}#[derive_where(PartialEq, Eq, Hash, Debug; I: Interner)]
63pub struct Probe<I: Interner> {
64 pub steps: Vec<ProbeStep<I>>,
66 pub kind: ProbeKind<I>,
67 pub final_state: CanonicalState<I, ()>,
68}
69
70#[automatically_derived]
impl<I: Interner> ::core::cmp::PartialEq for ProbeStep<I> where I: Interner {
#[inline]
fn eq(&self, __other: &Self) -> ::core::primitive::bool {
if ::core::mem::discriminant(self) ==
::core::mem::discriminant(__other) {
match (self, __other) {
(ProbeStep::AddGoal(ref __field_0, ref __field_1),
ProbeStep::AddGoal(ref __other_field_0,
ref __other_field_1)) =>
true &&
::core::cmp::PartialEq::eq(__field_0, __other_field_0) &&
::core::cmp::PartialEq::eq(__field_1, __other_field_1),
(ProbeStep::NestedProbe(ref __field_0),
ProbeStep::NestedProbe(ref __other_field_0)) =>
true &&
::core::cmp::PartialEq::eq(__field_0, __other_field_0),
(ProbeStep::RecordImplArgs { impl_args: ref __field_impl_args
}, ProbeStep::RecordImplArgs {
impl_args: ref __other_field_impl_args }) =>
true &&
::core::cmp::PartialEq::eq(__field_impl_args,
__other_field_impl_args),
(ProbeStep::MakeCanonicalResponse {
shallow_certainty: ref __field_shallow_certainty },
ProbeStep::MakeCanonicalResponse {
shallow_certainty: ref __other_field_shallow_certainty }) =>
true &&
::core::cmp::PartialEq::eq(__field_shallow_certainty,
__other_field_shallow_certainty),
_ => unsafe { ::core::hint::unreachable_unchecked() },
}
} else { false }
}
}
const _: () =
{
trait DeriveWhereAssertEq {
fn assert(&self);
}
impl<I: Interner> DeriveWhereAssertEq for ProbeStep<I> where
I: Interner {
fn assert(&self) {
struct __AssertEq<__T: ::core::cmp::Eq +
?::core::marker::Sized>(::core::marker::PhantomData<__T>);
let _: __AssertEq<GoalSource>;
let _: __AssertEq<CanonicalState<I, Goal<I, I::Predicate>>>;
let _: __AssertEq<Probe<I>>;
let _: __AssertEq<CanonicalState<I, I::GenericArgs>>;
let _: __AssertEq<Certainty>;
}
}
};
#[automatically_derived]
impl<I: Interner> ::core::cmp::Eq for ProbeStep<I> where I: Interner { }
#[automatically_derived]
impl<I: Interner> ::core::hash::Hash for ProbeStep<I> where I: Interner {
fn hash<__H: ::core::hash::Hasher>(&self, __state: &mut __H) {
match self {
ProbeStep::AddGoal(ref __field_0, ref __field_1) => {
::core::hash::Hash::hash(&::core::mem::discriminant(self),
__state);
::core::hash::Hash::hash(__field_0, __state);
::core::hash::Hash::hash(__field_1, __state);
}
ProbeStep::NestedProbe(ref __field_0) => {
::core::hash::Hash::hash(&::core::mem::discriminant(self),
__state);
::core::hash::Hash::hash(__field_0, __state);
}
ProbeStep::RecordImplArgs { impl_args: ref __field_impl_args } =>
{
::core::hash::Hash::hash(&::core::mem::discriminant(self),
__state);
::core::hash::Hash::hash(__field_impl_args, __state);
}
ProbeStep::MakeCanonicalResponse {
shallow_certainty: ref __field_shallow_certainty } => {
::core::hash::Hash::hash(&::core::mem::discriminant(self),
__state);
::core::hash::Hash::hash(__field_shallow_certainty, __state);
}
}
}
}
#[automatically_derived]
impl<I: Interner> ::core::fmt::Debug for ProbeStep<I> where I: Interner {
fn fmt(&self, __f: &mut ::core::fmt::Formatter<'_>)
-> ::core::fmt::Result {
match self {
ProbeStep::AddGoal(ref __field_0, ref __field_1) => {
let mut __builder =
::core::fmt::Formatter::debug_tuple(__f, "AddGoal");
::core::fmt::DebugTuple::field(&mut __builder, __field_0);
::core::fmt::DebugTuple::field(&mut __builder, __field_1);
::core::fmt::DebugTuple::finish(&mut __builder)
}
ProbeStep::NestedProbe(ref __field_0) => {
let mut __builder =
::core::fmt::Formatter::debug_tuple(__f, "NestedProbe");
::core::fmt::DebugTuple::field(&mut __builder, __field_0);
::core::fmt::DebugTuple::finish(&mut __builder)
}
ProbeStep::RecordImplArgs { impl_args: ref __field_impl_args } =>
{
let mut __builder =
::core::fmt::Formatter::debug_struct(__f, "RecordImplArgs");
::core::fmt::DebugStruct::field(&mut __builder, "impl_args",
__field_impl_args);
::core::fmt::DebugStruct::finish(&mut __builder)
}
ProbeStep::MakeCanonicalResponse {
shallow_certainty: ref __field_shallow_certainty } => {
let mut __builder =
::core::fmt::Formatter::debug_struct(__f,
"MakeCanonicalResponse");
::core::fmt::DebugStruct::field(&mut __builder,
"shallow_certainty", __field_shallow_certainty);
::core::fmt::DebugStruct::finish(&mut __builder)
}
}
}
}#[derive_where(PartialEq, Eq, Hash, Debug; I: Interner)]
71pub enum ProbeStep<I: Interner> {
72 AddGoal(GoalSource, CanonicalState<I, Goal<I, I::Predicate>>),
75 NestedProbe(Probe<I>),
79 RecordImplArgs { impl_args: CanonicalState<I, I::GenericArgs> },
81 MakeCanonicalResponse { shallow_certainty: Certainty },
87}
88
89#[automatically_derived]
impl<I: Interner> ::core::clone::Clone for ProbeKind<I> where I: Interner {
#[inline]
fn clone(&self) -> Self { *self }
}
#[automatically_derived]
impl<I: Interner> ::core::marker::Copy for ProbeKind<I> where I: Interner { }
#[automatically_derived]
impl<I: Interner> ::core::cmp::PartialEq for ProbeKind<I> where I: Interner {
#[inline]
fn eq(&self, __other: &Self) -> ::core::primitive::bool {
if ::core::mem::discriminant(self) ==
::core::mem::discriminant(__other) {
match (self, __other) {
(ProbeKind::Root { result: ref __field_result },
ProbeKind::Root { result: ref __other_field_result }) =>
true &&
::core::cmp::PartialEq::eq(__field_result,
__other_field_result),
(ProbeKind::TraitCandidate {
source: ref __field_source, result: ref __field_result },
ProbeKind::TraitCandidate {
source: ref __other_field_source,
result: ref __other_field_result }) =>
true &&
::core::cmp::PartialEq::eq(__field_source,
__other_field_source) &&
::core::cmp::PartialEq::eq(__field_result,
__other_field_result),
(ProbeKind::OpaqueTypeStorageLookup {
result: ref __field_result },
ProbeKind::OpaqueTypeStorageLookup {
result: ref __other_field_result }) =>
true &&
::core::cmp::PartialEq::eq(__field_result,
__other_field_result),
(ProbeKind::RigidAlias { result: ref __field_result },
ProbeKind::RigidAlias { result: ref __other_field_result })
=>
true &&
::core::cmp::PartialEq::eq(__field_result,
__other_field_result),
_ => true,
}
} else { false }
}
}
const _: () =
{
trait DeriveWhereAssertEq {
fn assert(&self);
}
impl<I: Interner> DeriveWhereAssertEq for ProbeKind<I> where
I: Interner {
fn assert(&self) {
struct __AssertEq<__T: ::core::cmp::Eq +
?::core::marker::Sized>(::core::marker::PhantomData<__T>);
let _: __AssertEq<QueryResult<I>>;
let _: __AssertEq<CandidateSource<I>>;
let _: __AssertEq<QueryResult<I>>;
let _: __AssertEq<QueryResult<I>>;
let _: __AssertEq<QueryResult<I>>;
}
}
};
#[automatically_derived]
impl<I: Interner> ::core::cmp::Eq for ProbeKind<I> where I: Interner { }
#[automatically_derived]
impl<I: Interner> ::core::hash::Hash for ProbeKind<I> where I: Interner {
fn hash<__H: ::core::hash::Hasher>(&self, __state: &mut __H) {
match self {
ProbeKind::Root { result: ref __field_result } => {
::core::hash::Hash::hash(&::core::mem::discriminant(self),
__state);
::core::hash::Hash::hash(__field_result, __state);
}
ProbeKind::NormalizedSelfTyAssembly => {
::core::hash::Hash::hash(&::core::mem::discriminant(self),
__state);
}
ProbeKind::TraitCandidate {
source: ref __field_source, result: ref __field_result } => {
::core::hash::Hash::hash(&::core::mem::discriminant(self),
__state);
::core::hash::Hash::hash(__field_source, __state);
::core::hash::Hash::hash(__field_result, __state);
}
ProbeKind::UnsizeAssembly => {
::core::hash::Hash::hash(&::core::mem::discriminant(self),
__state);
}
ProbeKind::ProjectionCompatibility => {
::core::hash::Hash::hash(&::core::mem::discriminant(self),
__state);
}
ProbeKind::ShadowedEnvProbing => {
::core::hash::Hash::hash(&::core::mem::discriminant(self),
__state);
}
ProbeKind::OpaqueTypeStorageLookup { result: ref __field_result }
=> {
::core::hash::Hash::hash(&::core::mem::discriminant(self),
__state);
::core::hash::Hash::hash(__field_result, __state);
}
ProbeKind::RigidAlias { result: ref __field_result } => {
::core::hash::Hash::hash(&::core::mem::discriminant(self),
__state);
::core::hash::Hash::hash(__field_result, __state);
}
}
}
}
#[automatically_derived]
impl<I: Interner> ::core::fmt::Debug for ProbeKind<I> where I: Interner {
fn fmt(&self, __f: &mut ::core::fmt::Formatter<'_>)
-> ::core::fmt::Result {
match self {
ProbeKind::Root { result: ref __field_result } => {
let mut __builder =
::core::fmt::Formatter::debug_struct(__f, "Root");
::core::fmt::DebugStruct::field(&mut __builder, "result",
__field_result);
::core::fmt::DebugStruct::finish(&mut __builder)
}
ProbeKind::NormalizedSelfTyAssembly =>
::core::fmt::Formatter::write_str(__f,
"NormalizedSelfTyAssembly"),
ProbeKind::TraitCandidate {
source: ref __field_source, result: ref __field_result } => {
let mut __builder =
::core::fmt::Formatter::debug_struct(__f, "TraitCandidate");
::core::fmt::DebugStruct::field(&mut __builder, "source",
__field_source);
::core::fmt::DebugStruct::field(&mut __builder, "result",
__field_result);
::core::fmt::DebugStruct::finish(&mut __builder)
}
ProbeKind::UnsizeAssembly =>
::core::fmt::Formatter::write_str(__f, "UnsizeAssembly"),
ProbeKind::ProjectionCompatibility =>
::core::fmt::Formatter::write_str(__f,
"ProjectionCompatibility"),
ProbeKind::ShadowedEnvProbing =>
::core::fmt::Formatter::write_str(__f, "ShadowedEnvProbing"),
ProbeKind::OpaqueTypeStorageLookup { result: ref __field_result }
=> {
let mut __builder =
::core::fmt::Formatter::debug_struct(__f,
"OpaqueTypeStorageLookup");
::core::fmt::DebugStruct::field(&mut __builder, "result",
__field_result);
::core::fmt::DebugStruct::finish(&mut __builder)
}
ProbeKind::RigidAlias { result: ref __field_result } => {
let mut __builder =
::core::fmt::Formatter::debug_struct(__f, "RigidAlias");
::core::fmt::DebugStruct::field(&mut __builder, "result",
__field_result);
::core::fmt::DebugStruct::finish(&mut __builder)
}
}
}
}#[derive_where(Clone, Copy, PartialEq, Eq, Hash, Debug; I: Interner)]
93#[derive(const _: () =
{
impl<I: Interner> ::rustc_type_ir::TypeVisitable<I> for ProbeKind<I>
where I: Interner,
QueryResult<I>: ::rustc_type_ir::TypeVisitable<I>,
CandidateSource<I>: ::rustc_type_ir::TypeVisitable<I> {
fn visit_with<__V: ::rustc_type_ir::TypeVisitor<I>>(&self,
__visitor: &mut __V) -> __V::Result {
match *self {
ProbeKind::Root { result: ref __binding_0 } => {
{
match ::rustc_type_ir::VisitorResult::branch(::rustc_type_ir::TypeVisitable::visit_with(__binding_0,
__visitor)) {
::core::ops::ControlFlow::Continue(()) => {}
::core::ops::ControlFlow::Break(r) => {
return ::rustc_type_ir::VisitorResult::from_residual(r);
}
}
}
}
ProbeKind::NormalizedSelfTyAssembly => {}
ProbeKind::TraitCandidate {
source: ref __binding_0, result: ref __binding_1 } => {
{
match ::rustc_type_ir::VisitorResult::branch(::rustc_type_ir::TypeVisitable::visit_with(__binding_0,
__visitor)) {
::core::ops::ControlFlow::Continue(()) => {}
::core::ops::ControlFlow::Break(r) => {
return ::rustc_type_ir::VisitorResult::from_residual(r);
}
}
}
{
match ::rustc_type_ir::VisitorResult::branch(::rustc_type_ir::TypeVisitable::visit_with(__binding_1,
__visitor)) {
::core::ops::ControlFlow::Continue(()) => {}
::core::ops::ControlFlow::Break(r) => {
return ::rustc_type_ir::VisitorResult::from_residual(r);
}
}
}
}
ProbeKind::UnsizeAssembly => {}
ProbeKind::ProjectionCompatibility => {}
ProbeKind::ShadowedEnvProbing => {}
ProbeKind::OpaqueTypeStorageLookup { result: ref __binding_0
} => {
{
match ::rustc_type_ir::VisitorResult::branch(::rustc_type_ir::TypeVisitable::visit_with(__binding_0,
__visitor)) {
::core::ops::ControlFlow::Continue(()) => {}
::core::ops::ControlFlow::Break(r) => {
return ::rustc_type_ir::VisitorResult::from_residual(r);
}
}
}
}
ProbeKind::RigidAlias { result: ref __binding_0 } => {
{
match ::rustc_type_ir::VisitorResult::branch(::rustc_type_ir::TypeVisitable::visit_with(__binding_0,
__visitor)) {
::core::ops::ControlFlow::Continue(()) => {}
::core::ops::ControlFlow::Break(r) => {
return ::rustc_type_ir::VisitorResult::from_residual(r);
}
}
}
}
}
<__V::Result as ::rustc_type_ir::VisitorResult>::output()
}
}
};TypeVisitable_Generic, const _: () =
{
unsafe impl<I: Interner, __V>
::rustc_type_ir::GenericTypeVisitable<__V> for ProbeKind<I> where
QueryResult<I>: ::rustc_type_ir::GenericTypeVisitable<__V>,
CandidateSource<I>: ::rustc_type_ir::GenericTypeVisitable<__V>,
QueryResult<I>: ::rustc_type_ir::GenericTypeVisitable<__V>,
QueryResult<I>: ::rustc_type_ir::GenericTypeVisitable<__V>,
QueryResult<I>: ::rustc_type_ir::GenericTypeVisitable<__V> {
fn generic_visit_with(&self, __visitor: &mut __V) {
match *self {
ProbeKind::Root { result: ref __binding_0 } => {
{
::rustc_type_ir::GenericTypeVisitable::<__V>::generic_visit_with(__binding_0,
__visitor);
}
}
ProbeKind::NormalizedSelfTyAssembly => {}
ProbeKind::TraitCandidate {
source: ref __binding_0, result: ref __binding_1 } => {
{
::rustc_type_ir::GenericTypeVisitable::<__V>::generic_visit_with(__binding_0,
__visitor);
}
{
::rustc_type_ir::GenericTypeVisitable::<__V>::generic_visit_with(__binding_1,
__visitor);
}
}
ProbeKind::UnsizeAssembly => {}
ProbeKind::ProjectionCompatibility => {}
ProbeKind::ShadowedEnvProbing => {}
ProbeKind::OpaqueTypeStorageLookup { result: ref __binding_0
} => {
{
::rustc_type_ir::GenericTypeVisitable::<__V>::generic_visit_with(__binding_0,
__visitor);
}
}
ProbeKind::RigidAlias { result: ref __binding_0 } => {
{
::rustc_type_ir::GenericTypeVisitable::<__V>::generic_visit_with(__binding_0,
__visitor);
}
}
}
}
}
};GenericTypeVisitable, const _: () =
{
impl<I: Interner> ::rustc_type_ir::TypeFoldable<I> for ProbeKind<I>
where I: Interner,
QueryResult<I>: ::rustc_type_ir::TypeFoldable<I>,
CandidateSource<I>: ::rustc_type_ir::TypeFoldable<I> {
fn try_fold_with<__F: ::rustc_type_ir::FallibleTypeFolder<I>>(self,
__folder: &mut __F) -> Result<Self, __F::Error> {
Ok(match self {
ProbeKind::Root { result: __binding_0 } => {
ProbeKind::Root {
result: ::rustc_type_ir::TypeFoldable::try_fold_with(__binding_0,
__folder)?,
}
}
ProbeKind::NormalizedSelfTyAssembly => {
ProbeKind::NormalizedSelfTyAssembly
}
ProbeKind::TraitCandidate {
source: __binding_0, result: __binding_1 } => {
ProbeKind::TraitCandidate {
source: ::rustc_type_ir::TypeFoldable::try_fold_with(__binding_0,
__folder)?,
result: ::rustc_type_ir::TypeFoldable::try_fold_with(__binding_1,
__folder)?,
}
}
ProbeKind::UnsizeAssembly => { ProbeKind::UnsizeAssembly }
ProbeKind::ProjectionCompatibility => {
ProbeKind::ProjectionCompatibility
}
ProbeKind::ShadowedEnvProbing => {
ProbeKind::ShadowedEnvProbing
}
ProbeKind::OpaqueTypeStorageLookup { result: __binding_0 }
=> {
ProbeKind::OpaqueTypeStorageLookup {
result: ::rustc_type_ir::TypeFoldable::try_fold_with(__binding_0,
__folder)?,
}
}
ProbeKind::RigidAlias { result: __binding_0 } => {
ProbeKind::RigidAlias {
result: ::rustc_type_ir::TypeFoldable::try_fold_with(__binding_0,
__folder)?,
}
}
})
}
fn fold_with<__F: ::rustc_type_ir::TypeFolder<I>>(self,
__folder: &mut __F) -> Self {
match self {
ProbeKind::Root { result: __binding_0 } => {
ProbeKind::Root {
result: ::rustc_type_ir::TypeFoldable::fold_with(__binding_0,
__folder),
}
}
ProbeKind::NormalizedSelfTyAssembly => {
ProbeKind::NormalizedSelfTyAssembly
}
ProbeKind::TraitCandidate {
source: __binding_0, result: __binding_1 } => {
ProbeKind::TraitCandidate {
source: ::rustc_type_ir::TypeFoldable::fold_with(__binding_0,
__folder),
result: ::rustc_type_ir::TypeFoldable::fold_with(__binding_1,
__folder),
}
}
ProbeKind::UnsizeAssembly => { ProbeKind::UnsizeAssembly }
ProbeKind::ProjectionCompatibility => {
ProbeKind::ProjectionCompatibility
}
ProbeKind::ShadowedEnvProbing => {
ProbeKind::ShadowedEnvProbing
}
ProbeKind::OpaqueTypeStorageLookup { result: __binding_0 }
=> {
ProbeKind::OpaqueTypeStorageLookup {
result: ::rustc_type_ir::TypeFoldable::fold_with(__binding_0,
__folder),
}
}
ProbeKind::RigidAlias { result: __binding_0 } => {
ProbeKind::RigidAlias {
result: ::rustc_type_ir::TypeFoldable::fold_with(__binding_0,
__folder),
}
}
}
}
}
};TypeFoldable_Generic)]
94pub enum ProbeKind<I: Interner> {
95 Root { result: QueryResult<I> },
97 NormalizedSelfTyAssembly,
99 TraitCandidate { source: CandidateSource<I>, result: QueryResult<I> },
101 UnsizeAssembly,
104 ProjectionCompatibility,
110 ShadowedEnvProbing,
112 OpaqueTypeStorageLookup { result: QueryResult<I> },
114 RigidAlias { result: QueryResult<I> },
116}