Skip to content

Commit 9b31323

Browse files
committed
Fix incorrectly spelled "variadic"
1 parent 9f6dcce commit 9b31323

File tree

14 files changed

+23
-23
lines changed

14 files changed

+23
-23
lines changed

compiler/rustc_ast_passes/src/feature_gate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
402402
gate_feature_post!(self, rustdoc_internals, attr.span, msg);
403403
}
404404

405-
if nested_meta.has_name(sym::tuple_varadic) {
406-
let msg = "`#[doc(tuple_varadic)]` is meant for internal use only";
405+
if nested_meta.has_name(sym::tuple_variadic) {
406+
let msg = "`#[doc(tuple_variadic)]` is meant for internal use only";
407407
gate_feature_post!(self, rustdoc_internals, attr.span, msg);
408408
}
409409
}

compiler/rustc_passes/src/check_attr.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ impl CheckAttrVisitor<'_> {
804804
true
805805
}
806806

807-
fn check_doc_tuple_varadic(&self, meta: &NestedMetaItem, hir_id: HirId) -> bool {
807+
fn check_doc_tuple_variadic(&self, meta: &NestedMetaItem, hir_id: HirId) -> bool {
808808
match self.tcx.hir().find(hir_id).and_then(|node| match node {
809809
hir::Node::Item(item) => Some(&item.kind),
810810
_ => None,
@@ -815,7 +815,7 @@ impl CheckAttrVisitor<'_> {
815815
.sess
816816
.struct_span_err(
817817
meta.span(),
818-
"`#[doc(tuple_varadic)]` can only be used on unary tuples",
818+
"`#[doc(tuple_variadic)]` can only be used on unary tuples",
819819
)
820820
.emit();
821821
return false;
@@ -1095,9 +1095,9 @@ impl CheckAttrVisitor<'_> {
10951095
is_valid = false
10961096
}
10971097

1098-
sym::tuple_varadic
1099-
if !self.check_attr_not_crate_level(meta, hir_id, "tuple_varadic")
1100-
|| !self.check_doc_tuple_varadic(meta, hir_id) =>
1098+
sym::tuple_variadic
1099+
if !self.check_attr_not_crate_level(meta, hir_id, "tuple_variadic")
1100+
|| !self.check_doc_tuple_variadic(meta, hir_id) =>
11011101
{
11021102
is_valid = false
11031103
}
@@ -1156,7 +1156,7 @@ impl CheckAttrVisitor<'_> {
11561156
| sym::notable_trait
11571157
| sym::passes
11581158
| sym::plugins
1159-
| sym::tuple_varadic => {}
1159+
| sym::tuple_variadic => {}
11601160

11611161
sym::test => {
11621162
if !self.check_test_attr(meta, hir_id) {

compiler/rustc_span/src/symbol.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@ symbols! {
14391439
tuple,
14401440
tuple_from_req,
14411441
tuple_indexing,
1442-
tuple_varadic,
1442+
tuple_variadic,
14431443
two_phase,
14441444
ty,
14451445
type_alias_enum_variants,

library/core/src/fmt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2335,7 +2335,7 @@ macro_rules! tuple {
23352335

23362336
macro_rules! maybe_tuple_doc {
23372337
($a:ident @ #[$meta:meta] $item:item) => {
2338-
#[cfg_attr(not(bootstrap), doc(tuple_varadic))]
2338+
#[cfg_attr(not(bootstrap), doc(tuple_variadic))]
23392339
#[doc = "This trait is implemented for tuples up to twelve items long."]
23402340
#[$meta]
23412341
$item

library/core/src/hash/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ mod impls {
900900

901901
macro_rules! maybe_tuple_doc {
902902
($a:ident @ #[$meta:meta] $item:item) => {
903-
#[cfg_attr(not(bootstrap), doc(tuple_varadic))]
903+
#[cfg_attr(not(bootstrap), doc(tuple_variadic))]
904904
#[doc = "This trait is implemented for tuples up to twelve items long."]
905905
#[$meta]
906906
$item

library/core/src/primitive_docs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ impl<T> (T,) {}
965965
// Fake impl that's only really used for docs.
966966
#[cfg(doc)]
967967
#[stable(feature = "rust1", since = "1.0.0")]
968-
#[cfg_attr(not(bootstrap), doc(tuple_varadic))]
968+
#[cfg_attr(not(bootstrap), doc(tuple_variadic))]
969969
/// This trait is implemented on arbitrary-length tuples.
970970
impl<T: Clone> Clone for (T,) {
971971
fn clone(&self) -> Self {
@@ -976,7 +976,7 @@ impl<T: Clone> Clone for (T,) {
976976
// Fake impl that's only really used for docs.
977977
#[cfg(doc)]
978978
#[stable(feature = "rust1", since = "1.0.0")]
979-
#[cfg_attr(not(bootstrap), doc(tuple_varadic))]
979+
#[cfg_attr(not(bootstrap), doc(tuple_variadic))]
980980
/// This trait is implemented on arbitrary-length tuples.
981981
impl<T: Copy> Copy for (T,) {
982982
// empty

library/core/src/tuple.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ macro_rules! tuple_impls {
105105

106106
macro_rules! maybe_tuple_doc {
107107
($a:ident @ #[$meta:meta] $item:item) => {
108-
#[cfg_attr(not(bootstrap), doc(tuple_varadic))]
108+
#[cfg_attr(not(bootstrap), doc(tuple_variadic))]
109109
#[doc = "This trait is implemented for tuples up to twelve items long."]
110110
#[$meta]
111111
$item

library/std/src/primitive_docs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ impl<T> (T,) {}
965965
// Fake impl that's only really used for docs.
966966
#[cfg(doc)]
967967
#[stable(feature = "rust1", since = "1.0.0")]
968-
#[cfg_attr(not(bootstrap), doc(tuple_varadic))]
968+
#[cfg_attr(not(bootstrap), doc(tuple_variadic))]
969969
/// This trait is implemented on arbitrary-length tuples.
970970
impl<T: Clone> Clone for (T,) {
971971
fn clone(&self) -> Self {
@@ -976,7 +976,7 @@ impl<T: Clone> Clone for (T,) {
976976
// Fake impl that's only really used for docs.
977977
#[cfg(doc)]
978978
#[stable(feature = "rust1", since = "1.0.0")]
979-
#[cfg_attr(not(bootstrap), doc(tuple_varadic))]
979+
#[cfg_attr(not(bootstrap), doc(tuple_variadic))]
980980
/// This trait is implemented on arbitrary-length tuples.
981981
impl<T: Copy> Copy for (T,) {
982982
// empty

src/librustdoc/clean/inline.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ pub(crate) fn build_impl(
500500
for_,
501501
items: trait_items,
502502
polarity,
503-
kind: if utils::has_doc_flag(tcx, did, sym::tuple_varadic) {
503+
kind: if utils::has_doc_flag(tcx, did, sym::tuple_variadic) {
504504
ImplKind::TupleVaradic
505505
} else {
506506
ImplKind::Normal

src/librustdoc/clean/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1999,7 +1999,7 @@ fn clean_impl<'tcx>(
19991999
for_,
20002000
items,
20012001
polarity: tcx.impl_polarity(def_id),
2002-
kind: if utils::has_doc_flag(tcx, def_id.to_def_id(), sym::tuple_varadic) {
2002+
kind: if utils::has_doc_flag(tcx, def_id.to_def_id(), sym::tuple_variadic) {
20032003
ImplKind::TupleVaradic
20042004
} else {
20052005
ImplKind::Normal

src/librustdoc/clean/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2407,7 +2407,7 @@ impl ImplKind {
24072407
matches!(self, ImplKind::Blanket(_))
24082408
}
24092409

2410-
pub(crate) fn is_tuple_varadic(&self) -> bool {
2410+
pub(crate) fn is_tuple_variadic(&self) -> bool {
24112411
matches!(self, ImplKind::TupleVaradic)
24122412
}
24132413

src/librustdoc/html/format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ impl clean::Impl {
10761076

10771077
if let clean::Type::Tuple(types) = &self.for_ &&
10781078
let [clean::Type::Generic(name)] = &types[..] &&
1079-
(self.kind.is_tuple_varadic() || self.kind.is_auto()) {
1079+
(self.kind.is_tuple_variadic() || self.kind.is_auto()) {
10801080
primitive_link_fragment(f, PrimitiveType::Tuple, &format!("({name}, ...)"), "#trait-implementations-1", cx)?;
10811081
} else if let Some(ty) = self.kind.as_blanket_ty() {
10821082
fmt_type(ty, f, use_absolute, cx)?;

src/test/ui/feature-gates/feature-gate-rustdoc_internals.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ mod foo {}
44

55
trait Mine {}
66

7-
#[doc(tuple_varadic)] //~ ERROR: `#[doc(tuple_varadic)]` is meant for internal use only
7+
#[doc(tuple_variadic)] //~ ERROR: `#[doc(tuple_variadic)]` is meant for internal use only
88
impl<T> Mine for (T,) {}
99

1010
fn main() {}

src/test/ui/feature-gates/feature-gate-rustdoc_internals.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ LL | #[doc(keyword = "match")]
77
= note: see issue #90418 <https://github.com/rust-lang/rust/issues/90418> for more information
88
= help: add `#![feature(rustdoc_internals)]` to the crate attributes to enable
99

10-
error[E0658]: `#[doc(tuple_varadic)]` is meant for internal use only
10+
error[E0658]: `#[doc(tuple_variadic)]` is meant for internal use only
1111
--> $DIR/feature-gate-rustdoc_internals.rs:7:1
1212
|
13-
LL | #[doc(tuple_varadic)]
13+
LL | #[doc(tuple_variadic)]
1414
| ^^^^^^^^^^^^^^^^^^^^^
1515
|
1616
= note: see issue #90418 <https://github.com/rust-lang/rust/issues/90418> for more information

0 commit comments

Comments
 (0)