about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNoName <106477298+Noname-Official@users.noreply.github.com>2024-12-30 19:58:55 +0100
committerGitHub <noreply@github.com>2024-12-30 19:58:55 +0100
commit0a0f5d3310f68d5d8532b387d7274f2319b38ac2 (patch)
treee360f9de311ab7a8f65f686de552055bbf3887c9
parent93722f7ed56bcf27839a6355074095c4320b7d37 (diff)
downloadrust-0a0f5d3310f68d5d8532b387d7274f2319b38ac2.tar.gz
rust-0a0f5d3310f68d5d8532b387d7274f2319b38ac2.zip
Fix typos
-rw-r--r--compiler/rustc_middle/src/mir/interpret/queries.rs12
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));