File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -441,6 +441,22 @@ The possible values of [`Applicability`][appl] are:
441441
442442[ appl ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_errors/enum.Applicability.html
443443
444+ ### Suggestion Style Guide
445+
446+ - Suggestions should not be a question. In particular, language like "did you
447+ mean" should be avoided. Sometimes, it's unclear why a particular suggestion
448+ is being made. In these cases, it's better to be upfront about what the
449+ suggestion is.
450+
451+ Compare "did you mean: ` Foo ` " vs. "there is a struct with a similar name: ` Foo ` ".
452+
453+ - The message should not contain any phrases like "the following", "as shown",
454+ etc. Use the span to convey what is being talked about.
455+ - The message may contain further instruction such as "to do xyz, use" or "to do
456+ xyz, use abc".
457+ - The message may contain a name of a function, variable, or type, but avoid
458+ whole expressions.
459+
444460## Lints
445461
446462The compiler linting infrastructure is defined in the [ ` rustc::lint ` ] [ rlint ]
You can’t perform that action at this time.
0 commit comments