File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
rustc_error_messages/locales/en-US Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -393,3 +393,6 @@ lint-builtin-clashing-extern-same-name = `{$this_fi}` redeclared with a differen
393393lint-builtin-clashing-extern-diff-name = `{ $this_fi } ` redeclares `{ $orig } ` with a different signature
394394 .previous-decl-label = `{ $orig } ` previously declared here
395395 .mismatch-label = this signature doesn't match the previous declaration
396+
397+ lint-builtin-deref-nullptr = dereferencing a null pointer
398+ .label = this code causes undefined behavior when executed
Original file line number Diff line number Diff line change @@ -3068,8 +3068,8 @@ impl<'tcx> LateLintPass<'tcx> for DerefNullPtr {
30683068 if let rustc_hir:: ExprKind :: Unary ( rustc_hir:: UnOp :: Deref , expr_deref) = expr. kind {
30693069 if is_null_ptr ( cx, expr_deref) {
30703070 cx. struct_span_lint ( DEREF_NULLPTR , expr. span , |lint| {
3071- let mut err = lint. build ( "dereferencing a null pointer" ) ;
3072- err. span_label ( expr. span , "this code causes undefined behavior when executed" ) ;
3071+ let mut err = lint. build ( fluent :: lint :: builtin_deref_nullptr ) ;
3072+ err. span_label ( expr. span , fluent :: lint :: label ) ;
30733073 err. emit ( ) ;
30743074 } ) ;
30753075 }
You can’t perform that action at this time.
0 commit comments