Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify meaning of MachineApplicable suggestions. #85852

Merged
merged 1 commit into from
Jun 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion compiler/rustc_lint_defs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ macro_rules! pluralize {
/// before applying the suggestion.
#[derive(Copy, Clone, Debug, PartialEq, Hash, Encodable, Decodable)]
pub enum Applicability {
/// The suggestion is definitely what the user intended. This suggestion should be
/// The suggestion is definitely what the user intended, or maintains the exact meaning of the code.
/// This suggestion should be automatically applied.
///
/// In case of multiple `MachineApplicable` suggestions (whether as part of
/// the same `multipart_suggestion` or not), all of them should be
/// automatically applied.
Comment on lines +31 to 33
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, is this true? People have wanted to do mutually exclusive suggestions in the past: https://discord.com/channels/442252698964721669/446773253953028107/651615006898782233

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is true at present. We resolved that if we want to support multiple exclusive machine-applicable suggestions, we would have to add a new mechanism (see this comment for more details).

MachineApplicable,

Expand Down