Add compatibility info to lints

This commit is contained in:
Ryan Levick 2021-04-13 16:55:54 +02:00
parent cebc520034
commit aa4457fa5f
6 changed files with 62 additions and 4 deletions

View file

@ -18,7 +18,7 @@ simply a heap allocated type called `Foo`.
To fix this issue, add `dyn` before the trait name.
```
```edition2021
trait Foo {}
fn test(arg: Box<dyn Foo>) {} // ok!
```

View file

@ -14,7 +14,7 @@ ranges which are now signified using `..=`.
To make this code compile replace the `...` with `..=`.
```
```edition2021
match 2u8 {
0..=9 => println!("Got a number less than 10"), // ok!
_ => println!("Got a number 10 or more"),