Add compatibility info to lints
This commit is contained in:
parent
cebc520034
commit
aa4457fa5f
6 changed files with 62 additions and 4 deletions
|
@ -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!
|
||||
```
|
||||
|
|
|
@ -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"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue