@@ -43,14 +43,13 @@ mod refine;
43
43
/// - `impl_m`: type of the method we are checking
44
44
/// - `trait_m`: the method in the trait
45
45
/// - `impl_trait_ref`: the TraitRef corresponding to the trait implementation
46
+ #[ instrument( level = "debug" , skip( tcx) ) ]
46
47
pub ( super ) fn compare_impl_method < ' tcx > (
47
48
tcx : TyCtxt < ' tcx > ,
48
49
impl_m : ty:: AssocItem ,
49
50
trait_m : ty:: AssocItem ,
50
51
impl_trait_ref : ty:: TraitRef < ' tcx > ,
51
52
) {
52
- debug ! ( "compare_impl_method(impl_trait_ref={:?})" , impl_trait_ref) ;
53
-
54
53
let _: Result < _ , ErrorGuaranteed > = try {
55
54
check_method_is_structurally_compatible ( tcx, impl_m, trait_m, impl_trait_ref, false ) ?;
56
55
compare_method_predicate_entailment ( tcx, impl_m, trait_m, impl_trait_ref) ?;
@@ -167,8 +166,6 @@ fn compare_method_predicate_entailment<'tcx>(
167
166
trait_m : ty:: AssocItem ,
168
167
impl_trait_ref : ty:: TraitRef < ' tcx > ,
169
168
) -> Result < ( ) , ErrorGuaranteed > {
170
- let trait_to_impl_args = impl_trait_ref. args ;
171
-
172
169
// This node-id should be used for the `body_id` field on each
173
170
// `ObligationCause` (and the `FnCtxt`).
174
171
//
@@ -183,53 +180,43 @@ fn compare_method_predicate_entailment<'tcx>(
183
180
kind : impl_m. kind ,
184
181
} ) ;
185
182
186
- // Create mapping from impl to placeholder .
187
- let impl_to_placeholder_args = GenericArgs :: identity_for_item ( tcx, impl_m. def_id ) ;
188
-
189
- // Create mapping from trait to placeholder.
190
- let trait_to_placeholder_args =
191
- impl_to_placeholder_args . rebase_onto ( tcx , impl_m . container_id ( tcx ) , trait_to_impl_args ) ;
192
- debug ! ( "compare_impl_method: trait_to_placeholder_args={:?}" , trait_to_placeholder_args ) ;
183
+ // Create mapping from trait method to impl method .
184
+ let trait_to_impl_args = GenericArgs :: identity_for_item ( tcx, impl_m. def_id ) . rebase_onto (
185
+ tcx ,
186
+ impl_m . container_id ( tcx ) ,
187
+ impl_trait_ref . args ,
188
+ ) ;
189
+ debug ! ( ?trait_to_impl_args ) ;
193
190
194
191
let impl_m_predicates = tcx. predicates_of ( impl_m. def_id ) ;
195
192
let trait_m_predicates = tcx. predicates_of ( trait_m. def_id ) ;
196
193
197
- // Create obligations for each predicate declared by the impl
198
- // definition in the context of the trait's parameter
199
- // environment. We can't just use `impl_env.caller_bounds`,
200
- // however, because we want to replace all late-bound regions with
201
- // region variables.
202
- let impl_predicates = tcx. predicates_of ( impl_m_predicates. parent . unwrap ( ) ) ;
203
- let mut hybrid_preds = impl_predicates. instantiate_identity ( tcx) ;
204
-
205
- debug ! ( "compare_impl_method: impl_bounds={:?}" , hybrid_preds) ;
206
-
207
194
// This is the only tricky bit of the new way we check implementation methods
208
195
// We need to build a set of predicates where only the method-level bounds
209
196
// are from the trait and we assume all other bounds from the implementation
210
197
// to be previously satisfied.
211
198
//
212
199
// We then register the obligations from the impl_m and check to see
213
200
// if all constraints hold.
214
- hybrid_preds . predicates . extend (
215
- trait_m_predicates
216
- . instantiate_own ( tcx , trait_to_placeholder_args )
217
- . map ( |( predicate, _) | predicate) ,
201
+ let impl_predicates = tcx . predicates_of ( impl_m_predicates . parent . unwrap ( ) ) ;
202
+ let mut hybrid_preds = impl_predicates . instantiate_identity ( tcx ) . predicates ;
203
+ hybrid_preds . extend (
204
+ trait_m_predicates . instantiate_own ( tcx , trait_to_impl_args ) . map ( |( predicate, _) | predicate) ,
218
205
) ;
219
206
220
- // Construct trait parameter environment and then shift it into the placeholder viewpoint.
221
- // The key step here is to update the caller_bounds's predicates to be
222
- // the new hybrid bounds we computed.
223
207
let normalize_cause = traits:: ObligationCause :: misc ( impl_m_span, impl_m_def_id) ;
224
- let param_env = ty:: ParamEnv :: new ( tcx. mk_clauses ( & hybrid_preds. predicates ) , Reveal :: UserFacing ) ;
208
+ let param_env = ty:: ParamEnv :: new ( tcx. mk_clauses ( & hybrid_preds) , Reveal :: UserFacing ) ;
225
209
let param_env = traits:: normalize_param_env_or_error ( tcx, param_env, normalize_cause) ;
210
+ debug ! ( caller_bounds=?param_env. caller_bounds( ) ) ;
226
211
227
212
let infcx = & tcx. infer_ctxt ( ) . build ( ) ;
228
213
let ocx = ObligationCtxt :: new_with_diagnostics ( infcx) ;
229
214
230
- debug ! ( "compare_impl_method: caller_bounds={:?}" , param_env. caller_bounds( ) ) ;
231
-
232
- let impl_m_own_bounds = impl_m_predicates. instantiate_own ( tcx, impl_to_placeholder_args) ;
215
+ // Create obligations for each predicate declared by the impl
216
+ // definition in the context of the hybrid param-env. This makes
217
+ // sure that the impl's method's where clauses are not more
218
+ // restrictive than the trait's method (and the impl itself).
219
+ let impl_m_own_bounds = impl_m_predicates. instantiate_own_identity ( ) ;
233
220
for ( predicate, span) in impl_m_own_bounds {
234
221
let normalize_cause = traits:: ObligationCause :: misc ( span, impl_m_def_id) ;
235
222
let predicate = ocx. normalize ( & normalize_cause, param_env, predicate) ;
@@ -256,7 +243,6 @@ fn compare_method_predicate_entailment<'tcx>(
256
243
// any associated types appearing in the fn arguments or return
257
244
// type.
258
245
259
- // Compute placeholder form of impl and trait method tys.
260
246
let mut wf_tys = FxIndexSet :: default ( ) ;
261
247
262
248
let unnormalized_impl_sig = infcx. instantiate_binder_with_fresh_vars (
@@ -267,9 +253,9 @@ fn compare_method_predicate_entailment<'tcx>(
267
253
268
254
let norm_cause = ObligationCause :: misc ( impl_m_span, impl_m_def_id) ;
269
255
let impl_sig = ocx. normalize ( & norm_cause, param_env, unnormalized_impl_sig) ;
270
- debug ! ( "compare_impl_method: impl_fty={:?}" , impl_sig) ;
256
+ debug ! ( ? impl_sig) ;
271
257
272
- let trait_sig = tcx. fn_sig ( trait_m. def_id ) . instantiate ( tcx, trait_to_placeholder_args ) ;
258
+ let trait_sig = tcx. fn_sig ( trait_m. def_id ) . instantiate ( tcx, trait_to_impl_args ) ;
273
259
let trait_sig = tcx. liberate_late_bound_regions ( impl_m. def_id , trait_sig) ;
274
260
275
261
// Next, add all inputs and output as well-formed tys. Importantly,
@@ -280,9 +266,7 @@ fn compare_method_predicate_entailment<'tcx>(
280
266
// We also have to add the normalized trait signature
281
267
// as we don't normalize during implied bounds computation.
282
268
wf_tys. extend ( trait_sig. inputs_and_output . iter ( ) ) ;
283
- let trait_fty = Ty :: new_fn_ptr ( tcx, ty:: Binder :: dummy ( trait_sig) ) ;
284
-
285
- debug ! ( "compare_impl_method: trait_fty={:?}" , trait_fty) ;
269
+ debug ! ( ?trait_sig) ;
286
270
287
271
// FIXME: We'd want to keep more accurate spans than "the method signature" when
288
272
// processing the comparison between the trait and impl fn, but we sadly lose them
@@ -455,8 +439,6 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
455
439
// just so we don't ICE during instantiation later.
456
440
check_method_is_structurally_compatible ( tcx, impl_m, trait_m, impl_trait_ref, true ) ?;
457
441
458
- let trait_to_impl_args = impl_trait_ref. args ;
459
-
460
442
let impl_m_hir_id = tcx. local_def_id_to_hir_id ( impl_m_def_id) ;
461
443
let return_span = tcx. hir ( ) . fn_decl_by_hir_id ( impl_m_hir_id) . unwrap ( ) . output . span ( ) ;
462
444
let cause =
@@ -466,18 +448,18 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
466
448
kind : impl_m. kind ,
467
449
} ) ;
468
450
469
- // Create mapping from impl to placeholder .
470
- let impl_to_placeholder_args = GenericArgs :: identity_for_item ( tcx, impl_m. def_id ) ;
471
-
472
- // Create mapping from trait to placeholder.
473
- let trait_to_placeholder_args =
474
- impl_to_placeholder_args . rebase_onto ( tcx , impl_m . container_id ( tcx ) , trait_to_impl_args ) ;
451
+ // Create mapping from trait to impl (i.e. impl trait header + impl method identity args) .
452
+ let trait_to_impl_args = GenericArgs :: identity_for_item ( tcx, impl_m. def_id ) . rebase_onto (
453
+ tcx ,
454
+ impl_m . container_id ( tcx ) ,
455
+ impl_trait_ref . args ,
456
+ ) ;
475
457
476
458
let hybrid_preds = tcx
477
459
. predicates_of ( impl_m. container_id ( tcx) )
478
460
. instantiate_identity ( tcx)
479
461
. into_iter ( )
480
- . chain ( tcx. predicates_of ( trait_m. def_id ) . instantiate_own ( tcx, trait_to_placeholder_args ) )
462
+ . chain ( tcx. predicates_of ( trait_m. def_id ) . instantiate_own ( tcx, trait_to_impl_args ) )
481
463
. map ( |( clause, _) | clause) ;
482
464
let param_env = ty:: ParamEnv :: new ( tcx. mk_clauses_from_iter ( hybrid_preds) , Reveal :: UserFacing ) ;
483
465
let param_env = traits:: normalize_param_env_or_error (
@@ -511,7 +493,7 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
511
493
. instantiate_binder_with_fresh_vars (
512
494
return_span,
513
495
infer:: HigherRankedType ,
514
- tcx. fn_sig ( trait_m. def_id ) . instantiate ( tcx, trait_to_placeholder_args ) ,
496
+ tcx. fn_sig ( trait_m. def_id ) . instantiate ( tcx, trait_to_impl_args ) ,
515
497
)
516
498
. fold_with ( & mut collector) ;
517
499
@@ -705,7 +687,7 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
705
687
// Also, we only need to account for a difference in trait and impl args,
706
688
// since we previously enforce that the trait method and impl method have the
707
689
// same generics.
708
- let num_trait_args = trait_to_impl_args . len ( ) ;
690
+ let num_trait_args = impl_trait_ref . args . len ( ) ;
709
691
let num_impl_args = tcx. generics_of ( impl_m. container_id ( tcx) ) . own_params . len ( ) ;
710
692
let ty = match ty. try_fold_with ( & mut RemapHiddenTyRegions {
711
693
tcx,
@@ -1041,12 +1023,7 @@ fn check_region_bounds_on_impl_item<'tcx>(
1041
1023
let trait_generics = tcx. generics_of ( trait_m. def_id ) ;
1042
1024
let trait_params = trait_generics. own_counts ( ) . lifetimes ;
1043
1025
1044
- debug ! (
1045
- "check_region_bounds_on_impl_item: \
1046
- trait_generics={:?} \
1047
- impl_generics={:?}",
1048
- trait_generics, impl_generics
1049
- ) ;
1026
+ debug ! ( ?trait_generics, ?impl_generics) ;
1050
1027
1051
1028
// Must have same number of early-bound lifetime parameters.
1052
1029
// Unfortunately, if the user screws up the bounds, then this
@@ -1710,8 +1687,7 @@ pub(super) fn compare_impl_const_raw(
1710
1687
let trait_const_item = tcx. associated_item ( trait_const_item_def) ;
1711
1688
let impl_trait_ref =
1712
1689
tcx. impl_trait_ref ( impl_const_item. container_id ( tcx) ) . unwrap ( ) . instantiate_identity ( ) ;
1713
-
1714
- debug ! ( "compare_impl_const(impl_trait_ref={:?})" , impl_trait_ref) ;
1690
+ debug ! ( ?impl_trait_ref) ;
1715
1691
1716
1692
compare_number_of_generics ( tcx, impl_const_item, trait_const_item, false ) ?;
1717
1693
compare_generic_param_kinds ( tcx, impl_const_item, trait_const_item, false ) ?;
@@ -1722,6 +1698,7 @@ pub(super) fn compare_impl_const_raw(
1722
1698
/// The equivalent of [compare_method_predicate_entailment], but for associated constants
1723
1699
/// instead of associated functions.
1724
1700
// FIXME(generic_const_items): If possible extract the common parts of `compare_{type,const}_predicate_entailment`.
1701
+ #[ instrument( level = "debug" , skip( tcx) ) ]
1725
1702
fn compare_const_predicate_entailment < ' tcx > (
1726
1703
tcx : TyCtxt < ' tcx > ,
1727
1704
impl_ct : ty:: AssocItem ,
@@ -1736,13 +1713,14 @@ fn compare_const_predicate_entailment<'tcx>(
1736
1713
// because we shouldn't really have to deal with lifetimes or
1737
1714
// predicates. In fact some of this should probably be put into
1738
1715
// shared functions because of DRY violations...
1739
- let impl_args = GenericArgs :: identity_for_item ( tcx, impl_ct. def_id ) ;
1740
- let trait_to_impl_args =
1741
- impl_args. rebase_onto ( tcx, impl_ct. container_id ( tcx) , impl_trait_ref. args ) ;
1716
+ let trait_to_impl_args = GenericArgs :: identity_for_item ( tcx, impl_ct. def_id ) . rebase_onto (
1717
+ tcx,
1718
+ impl_ct. container_id ( tcx) ,
1719
+ impl_trait_ref. args ,
1720
+ ) ;
1742
1721
1743
1722
// Create a parameter environment that represents the implementation's
1744
- // method.
1745
- // Compute placeholder form of impl and trait const tys.
1723
+ // associated const.
1746
1724
let impl_ty = tcx. type_of ( impl_ct_def_id) . instantiate_identity ( ) ;
1747
1725
1748
1726
let trait_ty = tcx. type_of ( trait_ct. def_id ) . instantiate ( tcx, trait_to_impl_args) ;
@@ -1759,14 +1737,14 @@ fn compare_const_predicate_entailment<'tcx>(
1759
1737
// The predicates declared by the impl definition, the trait and the
1760
1738
// associated const in the trait are assumed.
1761
1739
let impl_predicates = tcx. predicates_of ( impl_ct_predicates. parent . unwrap ( ) ) ;
1762
- let mut hybrid_preds = impl_predicates. instantiate_identity ( tcx) ;
1763
- hybrid_preds. predicates . extend (
1740
+ let mut hybrid_preds = impl_predicates. instantiate_identity ( tcx) . predicates ;
1741
+ hybrid_preds. extend (
1764
1742
trait_ct_predicates
1765
1743
. instantiate_own ( tcx, trait_to_impl_args)
1766
1744
. map ( |( predicate, _) | predicate) ,
1767
1745
) ;
1768
1746
1769
- let param_env = ty:: ParamEnv :: new ( tcx. mk_clauses ( & hybrid_preds. predicates ) , Reveal :: UserFacing ) ;
1747
+ let param_env = ty:: ParamEnv :: new ( tcx. mk_clauses ( & hybrid_preds) , Reveal :: UserFacing ) ;
1770
1748
let param_env = traits:: normalize_param_env_or_error (
1771
1749
tcx,
1772
1750
param_env,
@@ -1776,7 +1754,7 @@ fn compare_const_predicate_entailment<'tcx>(
1776
1754
let infcx = tcx. infer_ctxt ( ) . build ( ) ;
1777
1755
let ocx = ObligationCtxt :: new_with_diagnostics ( & infcx) ;
1778
1756
1779
- let impl_ct_own_bounds = impl_ct_predicates. instantiate_own ( tcx , impl_args ) ;
1757
+ let impl_ct_own_bounds = impl_ct_predicates. instantiate_own_identity ( ) ;
1780
1758
for ( predicate, span) in impl_ct_own_bounds {
1781
1759
let cause = ObligationCause :: misc ( span, impl_ct_def_id) ;
1782
1760
let predicate = ocx. normalize ( & cause, param_env, predicate) ;
@@ -1787,20 +1765,15 @@ fn compare_const_predicate_entailment<'tcx>(
1787
1765
1788
1766
// There is no "body" here, so just pass dummy id.
1789
1767
let impl_ty = ocx. normalize ( & cause, param_env, impl_ty) ;
1790
-
1791
- debug ! ( "compare_const_impl: impl_ty={:?}" , impl_ty) ;
1768
+ debug ! ( ?impl_ty) ;
1792
1769
1793
1770
let trait_ty = ocx. normalize ( & cause, param_env, trait_ty) ;
1794
-
1795
- debug ! ( "compare_const_impl: trait_ty={:?}" , trait_ty) ;
1771
+ debug ! ( ?trait_ty) ;
1796
1772
1797
1773
let err = ocx. sup ( & cause, param_env, trait_ty, impl_ty) ;
1798
1774
1799
1775
if let Err ( terr) = err {
1800
- debug ! (
1801
- "checking associated const for compatibility: impl ty {:?}, trait ty {:?}" ,
1802
- impl_ty, trait_ty
1803
- ) ;
1776
+ debug ! ( ?impl_ty, ?trait_ty) ;
1804
1777
1805
1778
// Locate the Span containing just the type of the offending impl
1806
1779
let ( ty, _) = tcx. hir ( ) . expect_impl_item ( impl_ct_def_id) . expect_const ( ) ;
@@ -1845,14 +1818,13 @@ fn compare_const_predicate_entailment<'tcx>(
1845
1818
ocx. resolve_regions_and_report_errors ( impl_ct_def_id, & outlives_env)
1846
1819
}
1847
1820
1821
+ #[ instrument( level = "debug" , skip( tcx) ) ]
1848
1822
pub ( super ) fn compare_impl_ty < ' tcx > (
1849
1823
tcx : TyCtxt < ' tcx > ,
1850
1824
impl_ty : ty:: AssocItem ,
1851
1825
trait_ty : ty:: AssocItem ,
1852
1826
impl_trait_ref : ty:: TraitRef < ' tcx > ,
1853
1827
) {
1854
- debug ! ( "compare_impl_type(impl_trait_ref={:?})" , impl_trait_ref) ;
1855
-
1856
1828
let _: Result < ( ) , ErrorGuaranteed > = try {
1857
1829
compare_number_of_generics ( tcx, impl_ty, trait_ty, false ) ?;
1858
1830
compare_generic_param_kinds ( tcx, impl_ty, trait_ty, false ) ?;
@@ -1864,20 +1836,23 @@ pub(super) fn compare_impl_ty<'tcx>(
1864
1836
1865
1837
/// The equivalent of [compare_method_predicate_entailment], but for associated types
1866
1838
/// instead of associated functions.
1839
+ #[ instrument( level = "debug" , skip( tcx) ) ]
1867
1840
fn compare_type_predicate_entailment < ' tcx > (
1868
1841
tcx : TyCtxt < ' tcx > ,
1869
1842
impl_ty : ty:: AssocItem ,
1870
1843
trait_ty : ty:: AssocItem ,
1871
1844
impl_trait_ref : ty:: TraitRef < ' tcx > ,
1872
1845
) -> Result < ( ) , ErrorGuaranteed > {
1873
- let impl_args = GenericArgs :: identity_for_item ( tcx, impl_ty. def_id ) ;
1874
- let trait_to_impl_args =
1875
- impl_args. rebase_onto ( tcx, impl_ty. container_id ( tcx) , impl_trait_ref. args ) ;
1846
+ let trait_to_impl_args = GenericArgs :: identity_for_item ( tcx, impl_ty. def_id ) . rebase_onto (
1847
+ tcx,
1848
+ impl_ty. container_id ( tcx) ,
1849
+ impl_trait_ref. args ,
1850
+ ) ;
1876
1851
1877
1852
let impl_ty_predicates = tcx. predicates_of ( impl_ty. def_id ) ;
1878
1853
let trait_ty_predicates = tcx. predicates_of ( trait_ty. def_id ) ;
1879
1854
1880
- let impl_ty_own_bounds = impl_ty_predicates. instantiate_own ( tcx , impl_args ) ;
1855
+ let impl_ty_own_bounds = impl_ty_predicates. instantiate_own_identity ( ) ;
1881
1856
if impl_ty_own_bounds. len ( ) == 0 {
1882
1857
// Nothing to check.
1883
1858
return Ok ( ( ) ) ;
@@ -1887,29 +1862,29 @@ fn compare_type_predicate_entailment<'tcx>(
1887
1862
// `ObligationCause` (and the `FnCtxt`). This is what
1888
1863
// `regionck_item` expects.
1889
1864
let impl_ty_def_id = impl_ty. def_id . expect_local ( ) ;
1890
- debug ! ( "compare_type_predicate_entailment: trait_to_impl_args={:?}" , trait_to_impl_args) ;
1865
+ debug ! ( ? trait_to_impl_args) ;
1891
1866
1892
1867
// The predicates declared by the impl definition, the trait and the
1893
1868
// associated type in the trait are assumed.
1894
1869
let impl_predicates = tcx. predicates_of ( impl_ty_predicates. parent . unwrap ( ) ) ;
1895
- let mut hybrid_preds = impl_predicates. instantiate_identity ( tcx) ;
1896
- hybrid_preds. predicates . extend (
1870
+ let mut hybrid_preds = impl_predicates. instantiate_identity ( tcx) . predicates ;
1871
+ hybrid_preds. extend (
1897
1872
trait_ty_predicates
1898
1873
. instantiate_own ( tcx, trait_to_impl_args)
1899
1874
. map ( |( predicate, _) | predicate) ,
1900
1875
) ;
1901
-
1902
- debug ! ( "compare_type_predicate_entailment: bounds={:?}" , hybrid_preds) ;
1876
+ debug ! ( ?hybrid_preds) ;
1903
1877
1904
1878
let impl_ty_span = tcx. def_span ( impl_ty_def_id) ;
1905
1879
let normalize_cause = ObligationCause :: misc ( impl_ty_span, impl_ty_def_id) ;
1906
- let param_env = ty:: ParamEnv :: new ( tcx. mk_clauses ( & hybrid_preds. predicates ) , Reveal :: UserFacing ) ;
1880
+
1881
+ let param_env = ty:: ParamEnv :: new ( tcx. mk_clauses ( & hybrid_preds) , Reveal :: UserFacing ) ;
1907
1882
let param_env = traits:: normalize_param_env_or_error ( tcx, param_env, normalize_cause) ;
1883
+ debug ! ( caller_bounds=?param_env. caller_bounds( ) ) ;
1884
+
1908
1885
let infcx = tcx. infer_ctxt ( ) . build ( ) ;
1909
1886
let ocx = ObligationCtxt :: new_with_diagnostics ( & infcx) ;
1910
1887
1911
- debug ! ( "compare_type_predicate_entailment: caller_bounds={:?}" , param_env. caller_bounds( ) ) ;
1912
-
1913
1888
for ( predicate, span) in impl_ty_own_bounds {
1914
1889
let cause = ObligationCause :: misc ( span, impl_ty_def_id) ;
1915
1890
let predicate = ocx. normalize ( & cause, param_env, predicate) ;
@@ -2009,11 +1984,11 @@ pub(super) fn check_type_bounds<'tcx>(
2009
1984
. explicit_item_bounds ( trait_ty. def_id )
2010
1985
. iter_instantiated_copied ( tcx, rebased_args)
2011
1986
. map ( |( concrete_ty_bound, span) | {
2012
- debug ! ( "check_type_bounds: concrete_ty_bound = {:?}" , concrete_ty_bound) ;
1987
+ debug ! ( ? concrete_ty_bound) ;
2013
1988
traits:: Obligation :: new ( tcx, mk_cause ( span) , param_env, concrete_ty_bound)
2014
1989
} )
2015
1990
. collect ( ) ;
2016
- debug ! ( "check_type_bounds: item_bounds={:?}" , obligations) ;
1991
+ debug ! ( item_bounds=? obligations) ;
2017
1992
2018
1993
// Normalize predicates with the assumption that the GAT may always normalize
2019
1994
// to its definition type. This should be the param-env we use to *prove* the
@@ -2032,7 +2007,7 @@ pub(super) fn check_type_bounds<'tcx>(
2032
2007
} else {
2033
2008
ocx. normalize ( & normalize_cause, normalize_param_env, obligation. predicate )
2034
2009
} ;
2035
- debug ! ( "compare_projection_bounds: normalized predicate = {:?}" , normalized_predicate) ;
2010
+ debug ! ( ? normalized_predicate) ;
2036
2011
obligation. predicate = normalized_predicate;
2037
2012
2038
2013
ocx. register_obligation ( obligation) ;
0 commit comments