| Age | Commit message (Collapse) | Author | Lines |
|
Move existing test for session diagnostic derive to a subdirectory.
Signed-off-by: David Wood <david.wood@huawei.com>
|
|
Extends support for generating `DiagnosticMessage::FluentIdentifier`
messages from `SessionDiagnostic` derive to `#[suggestion]`.
Signed-off-by: David Wood <david.wood@huawei.com>
|
|
Signed-off-by: David Wood <david.wood@huawei.com>
|
|
Extends support for generating `DiagnosticMessage::FluentIdentifier`
messages from `SessionDiagnostic` derive to `#[label]`.
Signed-off-by: David Wood <david.wood@huawei.com>
|
|
In an effort to make it easier to port diagnostics to
`SessionDiagnostic` (for translation) and since translation slugs could
replace error codes, make error codes optional in the
`SessionDiagnostic` derive.
Signed-off-by: David Wood <david.wood@huawei.com>
|
|
A call to `set_arg` is generated for every field of a
`SessionDiagnostic` struct without attributes, but not all types support
being an argument, so `#[no_arg]` is introduced to skip these fields.
Signed-off-by: David Wood <david.wood@huawei.com>
|
|
Small commit renaming `#[message]` to `#[primary_span]` as this more
accurately reflects what it does now.
Signed-off-by: David Wood <david.wood@huawei.com>
|
|
Signed-off-by: David Wood <david.wood@huawei.com>
|
|
Small commit adding backticks around types and annotations in the error
messages from the session diagnostic derive.
Signed-off-by: David Wood <david.wood@huawei.com>
|
|
* Always point at macros, including derive macros
* Point at non-local items that introduce a trait requirement
* On private associated item, point at definition
|
|
The session-derive-errors test ensures the internal SessionDiagnostic
derive macro outputs the right error messages when misused.
The macro relies on the proc_macro2 crate though, which changes its span
behavior depending on whether the channel is nightly or not. This caused
test failures when bumping the channel from nightly to beta/stable.
Since SessionDiagnostic is internal-only we don't care about its
diagnostics quality outside of nightly, as the compiler itself is
developed on nightly. Thus the easiest solution is to ignore that test
on the beta and stable channels.
This also implements `// only-{channel}` and `// ignore-{channel}` in
compiletest to properly support the change.
|
|
When there are multiple macros in use, it can be difficult to tell
which one was responsible for producing an error.
|
|
This was landed on master instead of beta!
|
|
|
|
Co-authored-by: Oliver Scherer <github35764891676564198441@oli-obk.de>
|