@@ -992,14 +992,6 @@ fn check_fn<'a, 'gcx, 'tcx>(inherited: &'a Inherited<'a, 'gcx, 'tcx>,
992
992
993
993
// Add formal parameters.
994
994
for ( arg_ty, arg) in fn_sig. inputs ( ) . iter ( ) . zip ( & body. arguments ) {
995
- // The type of the argument must be well-formed.
996
- //
997
- // NB -- this is now checked in wfcheck, but that
998
- // currently only results in warnings, so we issue an
999
- // old-style WF obligation here so that we still get the
1000
- // errors that we used to get.
1001
- fcx. register_old_wf_obligation ( arg_ty, arg. pat . span , traits:: MiscObligation ) ;
1002
-
1003
995
// Check the pattern.
1004
996
fcx. check_pat_arg ( & arg. pat , arg_ty, true ) ;
1005
997
fcx. write_ty ( arg. id , arg_ty) ;
@@ -1977,17 +1969,6 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
1977
1969
}
1978
1970
}
1979
1971
1980
- /// Registers an obligation for checking later, during regionck, that the type `ty` must
1981
- /// outlive the region `r`.
1982
- pub fn register_region_obligation ( & self ,
1983
- ty : Ty < ' tcx > ,
1984
- region : ty:: Region < ' tcx > ,
1985
- cause : traits:: ObligationCause < ' tcx > )
1986
- {
1987
- let mut fulfillment_cx = self . fulfillment_cx . borrow_mut ( ) ;
1988
- fulfillment_cx. register_region_obligation ( ty, region, cause) ;
1989
- }
1990
-
1991
1972
/// Registers an obligation for checking later, during regionck, that the type `ty` must
1992
1973
/// outlive the region `r`.
1993
1974
pub fn register_wf_obligation ( & self ,
@@ -2002,21 +1983,6 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
2002
1983
ty:: Predicate :: WellFormed ( ty) ) ) ;
2003
1984
}
2004
1985
2005
- pub fn register_old_wf_obligation ( & self ,
2006
- ty : Ty < ' tcx > ,
2007
- span : Span ,
2008
- code : traits:: ObligationCauseCode < ' tcx > )
2009
- {
2010
- // Registers an "old-style" WF obligation that uses the
2011
- // implicator code. This is basically a buggy version of
2012
- // `register_wf_obligation` that is being kept around
2013
- // temporarily just to help with phasing in the newer rules.
2014
- //
2015
- // FIXME(#27579) all uses of this should be migrated to register_wf_obligation eventually
2016
- let cause = traits:: ObligationCause :: new ( span, self . body_id , code) ;
2017
- self . register_region_obligation ( ty, self . tcx . types . re_empty , cause) ;
2018
- }
2019
-
2020
1986
/// Registers obligations that all types appearing in `substs` are well-formed.
2021
1987
pub fn add_wf_bounds ( & self , substs : & Substs < ' tcx > , expr : & hir:: Expr )
2022
1988
{
0 commit comments