Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing lifetime #1439

Merged
merged 3 commits into from
Aug 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/diagnostics/diagnostic-structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ In the end, the `SessionDiagnostic` derive will generate an implementation of
`SessionDiagnostic` that looks like the following:

```rust,ignore
impl SessionDiagnostic for FieldAlreadyDeclared {
impl SessionDiagnostic<'_> for FieldAlreadyDeclared {
fn into_diagnostic(self, sess: &'_ rustc_session::Session) -> DiagnosticBuilder<'_> {
let mut diag = sess.struct_err(rustc_errors::fluent::typeck::field_already_declared);
diag.set_span(self.span);
Expand Down Expand Up @@ -161,21 +161,21 @@ tcx.sess.emit_err(FieldAlreadyDeclared {
- See [translation documentation](./translation.md).
- `code = "..."` (_Optional_)
- Specifies the error code.
- `#[note]` or `#[note = "..."]` (_Optional_)
- `#[note]` or `#[note(...)]` (_Optional_)
- _Applied to struct or `Span`/`()` fields._
- Adds a note subdiagnostic.
- Value is the Fluent attribute (relative to the Fluent message specified by
`slug`) for the note's message
- Defaults to `note`.
- If applied to a `Span` field, creates a spanned note.
- `#[help]` or `#[help = "..."]` (_Optional_)
- `#[help]` or `#[help(...)]` (_Optional_)
- _Applied to struct or `Span`/`()` fields._
- Adds a help subdiagnostic.
- Value is the Fluent attribute (relative to the Fluent message specified by
`slug`) for the help's message.
- Defaults to `help`.
- If applied to a `Span` field, creates a spanned help.
- `#[label]` or `#[label = "..."]` (_Optional_)
- `#[label]` or `#[label(...)]` (_Optional_)
- _Applied to `Span` fields._
- Adds a label subdiagnostic.
- Value is the Fluent attribute (relative to the Fluent message specified by
Expand Down