File tree 2 files changed +5
-2
lines changed
rustc_error_messages/locales/en-US
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
393
393
lint-builtin-clashing-extern-diff-name = `{ $this_fi } ` redeclares `{ $orig } ` with a different signature
394
394
.previous-decl-label = `{ $orig } ` previously declared here
395
395
.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 {
3068
3068
if let rustc_hir:: ExprKind :: Unary ( rustc_hir:: UnOp :: Deref , expr_deref) = expr. kind {
3069
3069
if is_null_ptr ( cx, expr_deref) {
3070
3070
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 ) ;
3073
3073
err. emit ( ) ;
3074
3074
} ) ;
3075
3075
}
You can’t perform that action at this time.
0 commit comments