Skip to content

Commit d37ccef

Browse files
committed
Name two *_no_binding_modifiers rulesets
1 parent 580bdf1 commit d37ccef

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/rulesets/ty_based.rs

+19-1
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,16 @@ pub static KNOWN_TY_BASED_BUNDLES: &[BundleDoc<RuleOptions>] = &[
503503
name: "stateless_no_temporaries",
504504
ruleset: RuleOptions::STATELESS_NO_TEMPORARIES,
505505
doc: "A reasonable proposal; like `stateless` but \
506-
forbids `ref` bindings that create temporaries",
506+
forbids `ref` bindings that create temporaries",
507+
},
508+
BundleDoc {
509+
name: "stateless_no_binding_modifiers",
510+
ruleset: RuleOptions {
511+
ref_binding_on_inherited: RefBindingOnInheritedBehavior::Error,
512+
mut_binding_on_inherited: MutBindingOnInheritedBehavior::Error,
513+
..RuleOptions::STATELESS
514+
},
515+
doc: "Like `stateless` but forbids `ref` and `mut` bindings on inherited references.",
507516
},
508517
BundleDoc {
509518
name: "stateless_2021",
@@ -525,6 +534,15 @@ pub static KNOWN_TY_BASED_BUNDLES: &[BundleDoc<RuleOptions>] = &[
525534
ruleset: RuleOptions::ERGO2024,
526535
doc: "The accepted RFC3627 behavior",
527536
},
537+
BundleDoc {
538+
name: "rfc3627_no_binding_modifiers",
539+
ruleset: RuleOptions {
540+
ref_binding_on_inherited: RefBindingOnInheritedBehavior::Error,
541+
mut_binding_on_inherited: MutBindingOnInheritedBehavior::Error,
542+
..RuleOptions::ERGO2024
543+
},
544+
doc: "Like RFC3627 but forbids `ref` and `mut` bindings on inherited references.",
545+
},
528546
BundleDoc {
529547
name: "rfc3627_2021",
530548
ruleset: RuleOptions::RFC3627_2021,

0 commit comments

Comments
 (0)