Skip to content

Commit

Permalink
Name two *_no_binding_modifiers rulesets
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadrieril committed Jan 26, 2025
1 parent 580bdf1 commit d37ccef
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/rulesets/ty_based.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,16 @@ pub static KNOWN_TY_BASED_BUNDLES: &[BundleDoc<RuleOptions>] = &[
name: "stateless_no_temporaries",
ruleset: RuleOptions::STATELESS_NO_TEMPORARIES,
doc: "A reasonable proposal; like `stateless` but \
forbids `ref` bindings that create temporaries",
forbids `ref` bindings that create temporaries",
},
BundleDoc {
name: "stateless_no_binding_modifiers",
ruleset: RuleOptions {
ref_binding_on_inherited: RefBindingOnInheritedBehavior::Error,
mut_binding_on_inherited: MutBindingOnInheritedBehavior::Error,
..RuleOptions::STATELESS
},
doc: "Like `stateless` but forbids `ref` and `mut` bindings on inherited references.",
},
BundleDoc {
name: "stateless_2021",
Expand All @@ -525,6 +534,15 @@ pub static KNOWN_TY_BASED_BUNDLES: &[BundleDoc<RuleOptions>] = &[
ruleset: RuleOptions::ERGO2024,
doc: "The accepted RFC3627 behavior",
},
BundleDoc {
name: "rfc3627_no_binding_modifiers",
ruleset: RuleOptions {
ref_binding_on_inherited: RefBindingOnInheritedBehavior::Error,
mut_binding_on_inherited: MutBindingOnInheritedBehavior::Error,
..RuleOptions::ERGO2024
},
doc: "Like RFC3627 but forbids `ref` and `mut` bindings on inherited references.",
},
BundleDoc {
name: "rfc3627_2021",
ruleset: RuleOptions::RFC3627_2021,
Expand Down

0 comments on commit d37ccef

Please sign in to comment.