@@ -16,12 +16,12 @@ use crate::ty::{self, GenericArgs, TyCtxt};
1616impl < ' tcx > TyCtxt < ' tcx > {
1717 /// Evaluates a constant without providing any generic parameters. This is useful to evaluate consts
1818 /// that can't take any generic arguments like const items or enum discriminants. If a
19- /// generic parameter is used within the constant `ErrorHandled::ToGeneric ` will be returned.
19+ /// generic parameter is used within the constant `ErrorHandled::TooGeneric ` will be returned.
2020 #[ instrument( skip( self ) , level = "debug" ) ]
2121 pub fn const_eval_poly ( self , def_id : DefId ) -> EvalToConstValueResult < ' tcx > {
2222 // In some situations def_id will have generic parameters within scope, but they aren't allowed
2323 // to be used. So we can't use `Instance::mono`, instead we feed unresolved generic parameters
24- // into `const_eval` which will return `ErrorHandled::ToGeneric ` if any of them are
24+ // into `const_eval` which will return `ErrorHandled::TooGeneric ` if any of them are
2525 // encountered.
2626 let args = GenericArgs :: identity_for_item ( self , def_id) ;
2727 let instance = ty:: Instance :: new ( def_id, args) ;
@@ -32,12 +32,12 @@ impl<'tcx> TyCtxt<'tcx> {
3232
3333 /// Evaluates a constant without providing any generic parameters. This is useful to evaluate consts
3434 /// that can't take any generic arguments like const items or enum discriminants. If a
35- /// generic parameter is used within the constant `ErrorHandled::ToGeneric ` will be returned.
35+ /// generic parameter is used within the constant `ErrorHandled::TooGeneric ` will be returned.
3636 #[ instrument( skip( self ) , level = "debug" ) ]
3737 pub fn const_eval_poly_to_alloc ( self , def_id : DefId ) -> EvalToAllocationRawResult < ' tcx > {
3838 // In some situations def_id will have generic parameters within scope, but they aren't allowed
3939 // to be used. So we can't use `Instance::mono`, instead we feed unresolved generic parameters
40- // into `const_eval` which will return `ErrorHandled::ToGeneric ` if any of them are
40+ // into `const_eval` which will return `ErrorHandled::TooGeneric ` if any of them are
4141 // encountered.
4242 let args = GenericArgs :: identity_for_item ( self , def_id) ;
4343 let instance = ty:: Instance :: new ( def_id, args) ;
@@ -201,12 +201,12 @@ impl<'tcx> TyCtxt<'tcx> {
201201impl < ' tcx > TyCtxtEnsure < ' tcx > {
202202 /// Evaluates a constant without providing any generic parameters. This is useful to evaluate consts
203203 /// that can't take any generic arguments like const items or enum discriminants. If a
204- /// generic parameter is used within the constant `ErrorHandled::ToGeneric ` will be returned.
204+ /// generic parameter is used within the constant `ErrorHandled::TooGeneric ` will be returned.
205205 #[ instrument( skip( self ) , level = "debug" ) ]
206206 pub fn const_eval_poly ( self , def_id : DefId ) {
207207 // In some situations def_id will have generic parameters within scope, but they aren't allowed
208208 // to be used. So we can't use `Instance::mono`, instead we feed unresolved generic parameters
209- // into `const_eval` which will return `ErrorHandled::ToGeneric ` if any of them are
209+ // into `const_eval` which will return `ErrorHandled::TooGeneric ` if any of them are
210210 // encountered.
211211 let args = GenericArgs :: identity_for_item ( self . tcx , def_id) ;
212212 let instance = ty:: Instance :: new ( def_id, self . tcx . erase_regions ( args) ) ;
0 commit comments