Skip to content

Commit 0d519ab

Browse files
committed
Slightly change to wording around the definition of the #[diagnostic]
namespace This hopefully addresses both concerns raised by petrochenkov: > Does #[diagnostic::something] behave like #[rustfmt::skip] from name resolution / macro expansion point of view? By specifying that `#[diagnostic]` is a built-in tool attribute > How many of these attributes will exist - 2, 3, 5? > Why is it necessary to add a mechanism for grouping them instead of just using built-in attributes? By being explicit about that this namespace also serves an organizational need by defining a common set of rules. This hopefully allows the language team to delegate the decisions about the design of specific attributes to other teams.
1 parent 4b112aa commit 0d519ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

text/3366-diagnostic-attribute-namespace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ I expect the new attributes to be documented on the existing [Diagnostics](https
6969

7070
## The `#[diagnostic]` attribute namespace
7171

72-
This RFC proposes to introduce a new `#[diagnostic]` attribute namespace. This namespace is supposed to contain different attributes, which allow users to hint the compiler to emit specific diagnostic messages in certain cases like type mismatches, unsatisfied trait bounds or similar situations. By collecting such attributes in a common namespace it is easier for users to find useful attributes and it is easier for the language team to establish a set of common rules for these attributes.
72+
This RFC proposes to introduce a new built-in `#[diagnostic]` tool attribute namespace. This namespace is supposed to contain different attributes, which allow users to hint the compiler to emit specific diagnostic messages in certain cases like type mismatches, unsatisfied trait bounds or similar situations. By collecting such attributes in a common namespace it is easier for users to find useful attributes and it is easier for the language team to establish a set of common rules for these attributes. This opens the possibility to delegate the design of specific attributes to other teams later on.
7373

7474
Attributes in this namespace are generally expected to be formed like:
7575
```rust

0 commit comments

Comments
 (0)