about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Wood <david.wood@huawei.com>2022-04-02 06:18:48 +0100
committerDavid Wood <david.wood@huawei.com>2022-04-05 07:01:03 +0100
commitc6a3349bd737a211f9adbfc161ff89a9b66f97ef (patch)
tree68a2d79b601f6165899f10508a3f99ff3b97b7ad
parent141f8404a8dc2a6c00aafc917c11071275ee82ef (diff)
downloadrust-c6a3349bd737a211f9adbfc161ff89a9b66f97ef.tar.gz
rust-c6a3349bd737a211f9adbfc161ff89a9b66f97ef.zip
typeck: remove now-unnecessary parameter from diag
Removes `expected_pluralize` parameter from diagnostic struct which is
no longer necessary as the Fluent message can determine the correct
pluralization.

Signed-off-by: David Wood <david.wood@huawei.com>
-rw-r--r--compiler/rustc_typeck/src/check/intrinsic.rs3
-rw-r--r--compiler/rustc_typeck/src/errors.rs1
2 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_typeck/src/check/intrinsic.rs b/compiler/rustc_typeck/src/check/intrinsic.rs
index 74f6f50d412..cd6b1115ed8 100644
--- a/compiler/rustc_typeck/src/check/intrinsic.rs
+++ b/compiler/rustc_typeck/src/check/intrinsic.rs
@@ -7,7 +7,7 @@ use crate::errors::{
 };
 use crate::require_same_types;
 
-use rustc_errors::{pluralize, struct_span_err};
+use rustc_errors::struct_span_err;
 use rustc_hir as hir;
 use rustc_middle::traits::{ObligationCause, ObligationCauseCode};
 use rustc_middle::ty::subst::Subst;
@@ -43,7 +43,6 @@ fn equate_intrinsic_type<'tcx>(
                 span,
                 found,
                 expected,
-                expected_pluralize: pluralize!(expected),
                 descr,
             });
             false
diff --git a/compiler/rustc_typeck/src/errors.rs b/compiler/rustc_typeck/src/errors.rs
index 72733e087c2..0b78aea9f05 100644
--- a/compiler/rustc_typeck/src/errors.rs
+++ b/compiler/rustc_typeck/src/errors.rs
@@ -30,7 +30,6 @@ pub struct WrongNumberOfGenericArgumentsToIntrinsic<'a> {
     pub span: Span,
     pub found: usize,
     pub expected: usize,
-    pub expected_pluralize: &'a str,
     pub descr: &'a str,
 }