Skip to content

Commit 69a17b1

Browse files
committed
Rename feature diagnostic_on_unmatch_args to diagnostic_on_unmatched_args
1 parent 3657326 commit 69a17b1

19 files changed

Lines changed: 22 additions & 19 deletions

compiler/rustc_attr_parsing/src/attributes/diagnostic/on_unmatched_args.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ impl AttributeParser for OnUnmatchedArgsParser {
1818
template!(List: &[r#"/*opt*/ message = "...", /*opt*/ label = "...", /*opt*/ note = "...""#]),
1919
AttributeStability::Stable, // Unstable, stability checked manually in the parser
2020
|this, cx, args| {
21-
if !cx.features().diagnostic_on_unmatch_args() {
21+
if !cx.features().diagnostic_on_unmatched_args() {
2222
return;
2323
}
2424

compiler/rustc_feature/src/removed.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ declare_features! (
106106
(removed, deprecated_safe, "1.95.0", Some(94978), Some("never properly implemented, in the way of attribute refactor"), 152554),
107107
/// Allows deriving traits as per `SmartPointer` specification
108108
(removed, derive_smart_pointer, "1.84.0", Some(123430), Some("replaced by `CoercePointee`"), 131284),
109+
/// Allows macros to customize macro argument matcher diagnostics.
110+
(removed, diagnostic_on_unmatch_args, "CURRENT_RUSTC_VERSION", Some(155642), Some("renamed to `diagnostic_on_unmatched_args`"), 157887),
109111
/// Tells rustdoc to automatically generate `#[doc(cfg(...))]`.
110112
(removed, doc_auto_cfg, "1.92.0", Some(43781), Some("merged into `doc_cfg`"), 138907),
111113
/// Allows `#[doc(cfg_hide(...))]`.

compiler/rustc_feature/src/unstable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ declare_features! (
515515
/// Allows giving unresolved imports a custom diagnostic message
516516
(unstable, diagnostic_on_unknown, "1.96.0", Some(152900)),
517517
/// Allows macros to customize macro argument matcher diagnostics.
518-
(unstable, diagnostic_on_unmatch_args, "1.97.0", Some(155642)),
518+
(unstable, diagnostic_on_unmatched_args, "1.97.0", Some(155642)),
519519
/// Allows `#[doc(cfg(...))]`.
520520
(unstable, doc_cfg, "1.21.0", Some(43781)),
521521
/// Allows `#[doc(masked)]`.

compiler/rustc_resolve/src/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
719719
(sym::on_move, Some(sym::diagnostic_on_move)),
720720
(sym::on_const, Some(sym::diagnostic_on_const)),
721721
(sym::on_unknown, Some(sym::diagnostic_on_unknown)),
722-
(sym::on_unmatched_args, Some(sym::diagnostic_on_unmatch_args)),
722+
(sym::on_unmatched_args, Some(sym::diagnostic_on_unmatched_args)),
723723
(sym::on_type_error, Some(sym::diagnostic_on_type_error)),
724724
];
725725

compiler/rustc_span/src/symbol.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,7 @@ symbols! {
816816
diagnostic_on_type_error,
817817
diagnostic_on_unknown,
818818
diagnostic_on_unmatch_args,
819+
diagnostic_on_unmatched_args,
819820
dialect,
820821
direct,
821822
discriminant_kind,

library/core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
#![feature(deprecated_suggestion)]
132132
#![feature(derive_const)]
133133
#![feature(diagnostic_on_const)]
134-
#![feature(diagnostic_on_unmatch_args)]
134+
#![feature(diagnostic_on_unmatched_args)]
135135
#![feature(doc_cfg)]
136136
#![feature(doc_notable_trait)]
137137
#![feature(extern_types)]

src/doc/unstable-book/src/language-features/diagnostic-on-unmatch-args.md renamed to src/doc/unstable-book/src/language-features/diagnostic-on-unmatched-args.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# `diagnostic_on_unmatch_args`
1+
# `diagnostic_on_unmatched_args`
22

33
The tracking issue for this feature is: [#155642]
44

55
[#155642]: https://github.com/rust-lang/rust/issues/155642
66

77
------------------------
88

9-
The `diagnostic_on_unmatch_args` feature adds the
9+
The `diagnostic_on_unmatched_args` feature adds the
1010
`#[diagnostic::on_unmatched_args(...)]` attribute for declarative macros.
1111
It lets a macro definition customize diagnostics for matcher failures after all arms have been
1212
tried, such as incomplete invocations or trailing extra arguments.
@@ -16,7 +16,7 @@ It is currently used for errors emitted by declarative macro matching itself; fr
1616
errors still use their existing diagnostics.
1717

1818
```rust,compile_fail
19-
#![feature(diagnostic_on_unmatch_args)]
19+
#![feature(diagnostic_on_unmatched_args)]
2020
2121
#[diagnostic::on_unmatched_args(
2222
message = "invalid arguments to {This} macro invocation",

tests/ui/diagnostic_namespace/on_unmatched_args/auxiliary/other.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(diagnostic_on_unmatch_args)]
1+
#![feature(diagnostic_on_unmatched_args)]
22

33
#[macro_export]
44
#[diagnostic::on_unmatched_args(

tests/ui/diagnostic_namespace/on_unmatched_args/message_and_label.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(diagnostic_on_unmatch_args)]
1+
#![feature(diagnostic_on_unmatched_args)]
22

33
#[diagnostic::on_unmatched_args(
44
message = "invalid arguments to {This} macro invocation",

tests/ui/diagnostic_namespace/on_unmatched_args/notes_on_extra_args.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(diagnostic_on_unmatch_args)]
1+
#![feature(diagnostic_on_unmatched_args)]
22

33
#[diagnostic::on_unmatched_args(
44
message = "{This}! expects exactly two arguments",

0 commit comments

Comments
 (0)