diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2024-12-31 14:12:48 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-31 14:12:48 +1100 |
| commit | f3748c4fe0a9d19532eef6ae6ea06ea2c25bf6a1 (patch) | |
| tree | b8dd5cc214ff2c5ddbdd4a07146cb38ff32abfe6 | |
| parent | a93bef61618c87ed2ebab391a2994bc622d79e44 (diff) | |
| parent | 0a0f5d3310f68d5d8532b387d7274f2319b38ac2 (diff) | |
| download | rust-f3748c4fe0a9d19532eef6ae6ea06ea2c25bf6a1.tar.gz rust-f3748c4fe0a9d19532eef6ae6ea06ea2c25bf6a1.zip | |
Rollup merge of #134934 - Noname-Official:patch-1, r=saethlin
Fix typos
| -rw-r--r-- | compiler/rustc_middle/src/mir/interpret/queries.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_middle/src/mir/interpret/queries.rs b/compiler/rustc_middle/src/mir/interpret/queries.rs index f7f38575bd0..4c47d9636d3 100644 --- a/compiler/rustc_middle/src/mir/interpret/queries.rs +++ b/compiler/rustc_middle/src/mir/interpret/queries.rs @@ -16,12 +16,12 @@ use crate::ty::{self, GenericArgs, TyCtxt}; impl<'tcx> TyCtxt<'tcx> { /// Evaluates a constant without providing any generic parameters. This is useful to evaluate consts /// that can't take any generic arguments like const items or enum discriminants. If a - /// generic parameter is used within the constant `ErrorHandled::ToGeneric` will be returned. + /// generic parameter is used within the constant `ErrorHandled::TooGeneric` will be returned. #[instrument(skip(self), level = "debug")] pub fn const_eval_poly(self, def_id: DefId) -> EvalToConstValueResult<'tcx> { // In some situations def_id will have generic parameters within scope, but they aren't allowed // to be used. So we can't use `Instance::mono`, instead we feed unresolved generic parameters - // into `const_eval` which will return `ErrorHandled::ToGeneric` if any of them are + // into `const_eval` which will return `ErrorHandled::TooGeneric` if any of them are // encountered. let args = GenericArgs::identity_for_item(self, def_id); let instance = ty::Instance::new(def_id, args); @@ -32,12 +32,12 @@ impl<'tcx> TyCtxt<'tcx> { /// Evaluates a constant without providing any generic parameters. This is useful to evaluate consts /// that can't take any generic arguments like const items or enum discriminants. If a - /// generic parameter is used within the constant `ErrorHandled::ToGeneric` will be returned. + /// generic parameter is used within the constant `ErrorHandled::TooGeneric` will be returned. #[instrument(skip(self), level = "debug")] pub fn const_eval_poly_to_alloc(self, def_id: DefId) -> EvalToAllocationRawResult<'tcx> { // In some situations def_id will have generic parameters within scope, but they aren't allowed // to be used. So we can't use `Instance::mono`, instead we feed unresolved generic parameters - // into `const_eval` which will return `ErrorHandled::ToGeneric` if any of them are + // into `const_eval` which will return `ErrorHandled::TooGeneric` if any of them are // encountered. let args = GenericArgs::identity_for_item(self, def_id); let instance = ty::Instance::new(def_id, args); @@ -201,12 +201,12 @@ impl<'tcx> TyCtxt<'tcx> { impl<'tcx> TyCtxtEnsure<'tcx> { /// Evaluates a constant without providing any generic parameters. This is useful to evaluate consts /// that can't take any generic arguments like const items or enum discriminants. If a - /// generic parameter is used within the constant `ErrorHandled::ToGeneric` will be returned. + /// generic parameter is used within the constant `ErrorHandled::TooGeneric` will be returned. #[instrument(skip(self), level = "debug")] pub fn const_eval_poly(self, def_id: DefId) { // In some situations def_id will have generic parameters within scope, but they aren't allowed // to be used. So we can't use `Instance::mono`, instead we feed unresolved generic parameters - // into `const_eval` which will return `ErrorHandled::ToGeneric` if any of them are + // into `const_eval` which will return `ErrorHandled::TooGeneric` if any of them are // encountered. let args = GenericArgs::identity_for_item(self.tcx, def_id); let instance = ty::Instance::new(def_id, self.tcx.erase_regions(args)); |
