File tree 1 file changed +6
-2
lines changed
compiler/rustc_infer/src/infer
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -936,7 +936,9 @@ impl<'tcx> InferCtxt<'tcx> {
936
936
{
937
937
let origin = & ObligationCause :: dummy ( ) ;
938
938
self . probe ( |_| {
939
- self . at ( origin, param_env) . sub ( DefineOpaqueTypes :: No , expected, actual) . is_ok ( )
939
+ // We're only answering whether there could be a subtyping relation, and with
940
+ // opaque types, "there could be one", via registering a hidden type.
941
+ self . at ( origin, param_env) . sub ( DefineOpaqueTypes :: Yes , expected, actual) . is_ok ( )
940
942
} )
941
943
}
942
944
@@ -945,7 +947,9 @@ impl<'tcx> InferCtxt<'tcx> {
945
947
T : at:: ToTrace < ' tcx > ,
946
948
{
947
949
let origin = & ObligationCause :: dummy ( ) ;
948
- self . probe ( |_| self . at ( origin, param_env) . eq ( DefineOpaqueTypes :: No , a, b) . is_ok ( ) )
950
+ // We're only answering whether the types could be the same, and with
951
+ // opaque types, "they can be the same", via registering a hidden type.
952
+ self . probe ( |_| self . at ( origin, param_env) . eq ( DefineOpaqueTypes :: Yes , a, b) . is_ok ( ) )
949
953
}
950
954
951
955
#[ instrument( skip( self ) , level = "debug" ) ]
You can’t perform that action at this time.
0 commit comments