Improve note for the invalid_reference_casting lint
Add link to the book interior mutability chapter, https://doc.rust-lang.org/book/ch15-05-interior-mutability.html.
This commit is contained in:
parent
810573919f
commit
aa7730003e
4 changed files with 62 additions and 0 deletions
|
@ -764,11 +764,13 @@ pub enum InvalidFromUtf8Diag {
|
|||
#[derive(LintDiagnostic)]
|
||||
pub enum InvalidReferenceCastingDiag {
|
||||
#[diag(lint_invalid_reference_casting_borrow_as_mut)]
|
||||
#[note(lint_invalid_reference_casting_note_book)]
|
||||
BorrowAsMut {
|
||||
#[label]
|
||||
orig_cast: Option<Span>,
|
||||
},
|
||||
#[diag(lint_invalid_reference_casting_assign_to_ref)]
|
||||
#[note(lint_invalid_reference_casting_note_book)]
|
||||
AssignToRef {
|
||||
#[label]
|
||||
orig_cast: Option<Span>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue