Skip to content

Commit 21187cd

Browse files
committed
rfc, self_in_typedefs: remove migration advice.
1 parent 6c42072 commit 21187cd

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

text/0000-self-in-typedefs.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -309,34 +309,6 @@ error[E0072]: recursive type `List` has infinite size
309309
= help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `List` representable
310310
```
311311

312-
## Migration advice
313-
[migration advice]: #migration-advice
314-
315-
Since the new introduced syntax is often clearer and shorter, especially when
316-
dealing with long type names with many generic parameters, tools like `clippy`
317-
should add new lints that mention the new syntax and ask users to migrate to it.
318-
319-
Such a lint in `clippy` could be called `use_self_in_typedef`
320-
and emit the following warning:
321-
322-
```
323-
warning: the `Self` should be used for clarity in recursive types instead of mentioning the type again
324-
--> src/main.rs:
325-
|
326-
1 | / enum List<T> {
327-
2 | | Nil,
328-
3 | | Cons(T, List<T>)
329-
4 | | }
330-
| |----^
331-
|
332-
= note: #[warn(use_self_in_typedef)] on by default
333-
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/<version>/index.html#use_self_in_typedef
334-
help: consider using `Self` instead of `List<T>`
335-
|
336-
3 | Cons(T, List<T>)
337-
| ^^^^^^^
338-
```
339-
340312
## Teaching the contents of this RFC
341313

342314
[LRWETMLL]: http://cglab.ca/~abeinges/blah/too-many-lists/book/first-layout.html

0 commit comments

Comments
 (0)