@@ -85,13 +85,30 @@ Some messages are emitted via [lints](#lints), where the user can control the
8585level. Most diagnostics are hard-coded such that the user cannot control the
8686level.
8787
88+ Usually it is obvious whether a diagnostic should be "fixed" or a lint, but
89+ there are some grey areas.
90+ 
91+ Here are a few examples:
92+ 
93+ -  Borrow checker errors: these are fixed errors. The user cannot adjust the
94+   level of these diagnostics to silence the borrow checker.
95+ -  Dead code: this is a lint. While the user probably doesn't want dead code in
96+   their crate, making this a hard error would make refactoring and development
97+   very painful.
98+ -  [ safe_packed_borrows future compatibility warning] [ safe_packed_borrows ] :
99+   this is a silencable lint related to safety. It was judged that the making
100+   this a hard (fixed) error would cause too much breakage, so instead a
101+   warning is emitted that eventually will be turned into a hard error.
102+ 
88103Hard-coded warnings (those using the ` span_warn `  methods) should be avoided
89104for normal code, preferring to use lints instead. Some cases, such as warnings
90105with CLI flags, will require the use of hard-coded warnings.
91106
92107See the ` deny `  [ lint level] ( #diagnostic-levels )  below for guidelines when to
93108use an error-level lint instead of a fixed error.
94109
110+ [ safe_packed_borrows ] : https://github.com/rust-lang/rust/issues/46043 
111+ 
95112## Diagnostic output style guide  
96113
97114-  Write in plain simple English. If your message, when shown on a – possibly
0 commit comments