@@ -120,7 +120,7 @@ future-compatibility warnings. These are a special category of lint warning.
120
120
Adding a new future-compatibility warning can be done as follows.
121
121
122
122
``` rust
123
- // 1. Define the lint in `src/librustc_middle /lint/builtin.rs`:
123
+ // 1. Define the lint in `src/librustc /lint/builtin.rs`:
124
124
declare_lint! {
125
125
pub YOUR_ERROR_HERE ,
126
126
Warn ,
@@ -230,12 +230,14 @@ lint name is mentioned (in the compiler, we use the upper-case name, and a macro
230
230
automatically generates the lower-case string; so searching for
231
231
` overlapping_inherent_impls ` would not find much).
232
232
233
+ > NOTE: these exact files don't exist anymore, but the procedure is still the same.
234
+
233
235
#### Remove the lint.
234
236
235
237
The first reference you will likely find is the lint definition [ in
236
- ` librustc_middle /lint/builtin.rs` that resembles this] [ defsource ] :
238
+ ` librustc /lint/builtin.rs` that resembles this] [ defsource ] :
237
239
238
- [ defsource ] : https://github.com/rust-lang/rust/blob/085d71c3efe453863739c1fb68fd9bd1beff214f/src/librustc_middle /lint/builtin.rs#L171-L175
240
+ [ defsource ] : https://github.com/rust-lang/rust/blob/085d71c3efe453863739c1fb68fd9bd1beff214f/src/librustc /lint/builtin.rs#L171-L175
239
241
240
242
``` rust
241
243
declare_lint! {
@@ -249,7 +251,7 @@ This `declare_lint!` macro creates the relevant data structures. Remove it. You
249
251
will also find that there is a mention of ` OVERLAPPING_INHERENT_IMPLS ` later in
250
252
the file as [ part of a ` lint_array! ` ] [ lintarraysource ] ; remove it too,
251
253
252
- [ lintarraysource ] : https://github.com/rust-lang/rust/blob/085d71c3efe453863739c1fb68fd9bd1beff214f/src/librustc_middle /lint/builtin.rs#L252-L290
254
+ [ lintarraysource ] : https://github.com/rust-lang/rust/blob/085d71c3efe453863739c1fb68fd9bd1beff214f/src/librustc /lint/builtin.rs#L252-L290
253
255
254
256
Next, you see see [ a reference to ` OVERLAPPING_INHERENT_IMPLS ` in
255
257
` librustc_lint/lib.rs ` ] [ futuresource ] . This defining the lint as a "future
0 commit comments