File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,30 @@ lints can be configured and the meaning of the variables.
147
147
To deactivate the “for further information visit * lint-link* ” message you can
148
148
define the ` CLIPPY_DISABLE_DOCS_LINKS ` environment variable.
149
149
150
+ ### Specifying the minimum supported Rust version
151
+
152
+ Projects that intend to support old versions of Rust can disable lints pertaining to newer features by
153
+ specifying the minimum supported Rust version (msrv) in the clippy configuration file.
154
+
155
+ ``` toml
156
+ msrv = " 1.30.0"
157
+ ```
158
+
159
+ The msrv can also be specified as an inner attribute, like below.
160
+
161
+ ``` rust
162
+ #![feature(custom_inner_attributes)]
163
+ #![clippy:: msrv = " 1.30.0" ]
164
+
165
+ fn main () {
166
+ ...
167
+ }
168
+ ```
169
+
170
+ Tilde/Caret version requirements(like ` ^1.0 ` or ` ~1.2 ` ) can be specified as well.
171
+
172
+ Note: ` custom_inner_attributes ` is an unstable feature so it has to be enabled explicitly.
173
+
150
174
### Allowing/denying lints
151
175
152
176
You can add options to your code to ` allow ` /` warn ` /` deny ` Clippy lints:
You can’t perform that action at this time.
0 commit comments