|
1 | 1 | ### Future incompat report
|
2 | 2 |
|
3 |
| -Cargo checks for future-incompatible warnings in all dependencies. These are warnings for |
| 3 | +Cargo checks for future-incompatible warnings in all dependencies. These are warnings for |
4 | 4 | changes that may become hard errors in the future, causing the dependency to
|
5 | 5 | stop building in a future version of rustc. If any warnings are found, a small
|
6 | 6 | notice is displayed indicating that the warnings were found, and provides
|
7 | 7 | instructions on how to display a full report.
|
8 | 8 |
|
| 9 | +For example, you may see something like this at the end of a build: |
| 10 | + |
| 11 | +```text |
| 12 | +warning: the following packages contain code that will be rejected by a future |
| 13 | + version of Rust: rental v0.5.5 |
| 14 | +note: to see what the problems were, use the option `--future-incompat-report`, |
| 15 | + or run `cargo report future-incompatibilities --id 1` |
| 16 | +``` |
| 17 | + |
9 | 18 | A full report can be displayed with the `cargo report future-incompatibilities
|
10 | 19 | --id ID` command, or by running the build again with
|
11 | 20 | the `--future-incompat-report` flag. The developer should then update their
|
12 | 21 | dependencies to a version where the issue is fixed, or work with the
|
13 | 22 | developers of the dependencies to help resolve the issue.
|
14 | 23 |
|
15 |
| -This feature can be configured through a `[future-incompat-report]` |
16 |
| -section in `.cargo/config`. Currently, the supported options are: |
| 24 | +## Configuration |
17 | 25 |
|
18 |
| -``` |
| 26 | +This feature can be configured through a [`[future-incompat-report]`][config] |
| 27 | +section in `.cargo/config.toml`. Currently, the supported options are: |
| 28 | + |
| 29 | +```toml |
19 | 30 | [future-incompat-report]
|
20 |
| -frequency = FREQUENCY |
| 31 | +frequency = "always" |
21 | 32 | ```
|
22 | 33 |
|
23 |
| -The supported values for `FREQUENCY` are `always` and `never`, which control |
| 34 | +The supported values for the frequency are `"always"` and `"never"`, which control |
24 | 35 | whether or not a message is printed out at the end of `cargo build` / `cargo check`.
|
| 36 | + |
| 37 | +[config]: config.md#future-incompat-report |
0 commit comments