diff --git a/contrib/semgrep.yml b/contrib/semgrep.yml new file mode 100644 index 000000000..0cb5b3e1e --- /dev/null +++ b/contrib/semgrep.yml @@ -0,0 +1,11 @@ +rules: + +- id: inline-from-impls + patterns: + - pattern: |- + impl From<$F> for $T { fn from(...) -> $SELF { ... } } + - pattern-not-regex: "inline" + message: Use inline attribute on `From` implementations. + languages: + - rust + severity: ERROR