Future breakage from use of `Infallible` and `!` conflicting impls.
- Dominant language
- Rust
- Stars
- 2.6k
- Forks
- 223
- Avg merge
- 18m
- Merged PRs (30d)
- 1
Description
Hello, I want to give you a heads-up on behalf of the rust-lang project. A planned change will affect the volo-http crate in a future Rust version.
We are planning to make the `Infallible` type a type-alias to `!` (the never type) in the future when the latter is stabilized. This [has been documented](https://doc.rust-lang.org/nightly/std/convert/enum.Infallible.html#future-compatibility) for a long time and those plans are coming closer to stabilization (https://github.com/rust-lang/rust/issues/155924).
[crater-run](https://crater-reports.s3.amazonaws.com/155501-infallible-never-with-reservation/try%231bdcb63291ccffc030f8223f6f978568dd240e3e/reg/volo-http-0.5.5/log.txt) report:
```
[INFO] checking volo-http-0.5.5 against try#1bdcb63291ccffc030f8223f6f978568dd240e3e for 155501-infallible-never-with-reservation
[...]
[INFO] [stdout] error[E0119]: conflicting implementations of trait `IntoResponse` for type `!`
[INFO] [stdout] --> src/server/response/into_response.rs:61:1
[INFO] [stdout] |
[INFO] [stdout] 55 | impl IntoResponse for Infallible {
[INFO] [stdout] | -------------------------------- first implementation here
[INFO] [stdout] ...
[INFO] [stdout] 61 | / impl IntoResponse for T
[INFO] [stdout] 62 | | where
[INFO] [stdout] 63 | | T: TryInto,
[INFO] [stdout] 64 | | T::Error: IntoResponse,
[INFO] [stdout] | |___________________________^ conflicting implementation for `!`
[INFO] [stdout] |
[INFO] [stdout] = note: permitting this impl would forbid us from adding `impl From for T` later; see rust-lang/rust#64715 for details
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] error[E0119]: conflicting implementations of trait `IntoResponse` for type `!`
[INFO] [stdout] --> src/server/response/into_response.rs:61:1
[INFO] [stdout] |
[INFO] [stdout] 55 | impl IntoResponse for Infallible {
[INFO] [stdout] | -------------------------------- first implementation here
[INFO] [stdout] ...
[INFO] [stdout] 61 | / impl IntoResponse for T
[INFO] [stdout] 62 | | where
[INFO] [stdout] 63 | | T: TryInto,
[INFO] [stdout] 64 | | T::Error: IntoResponse,
[INFO] [stdout] | |___________________________^ conflicting implementation for `!`
[INFO] [stdout] |
[INFO] [stdout] = note: permitting this impl would forbid us from adding `impl From for T` later; see rust-lang/rust#64715 for details
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] For more information about this error, try `rustc --explain E0119`.
[INFO] [stdout]
[INFO] [stderr] error: could not compile `volo-http` (lib) due to 1 previous error
[INFO] [stderr] warning: build failed, waiting for other jobs to finish...
[INFO] [stdout] For more information about this error, try `rustc --explain E0119`.
[INFO] [stdout]
[INFO] [stderr] error: could not compile `volo-http` (lib test) due to 1 previous error
```
Contributor guide
Assessment
This issue has not been assessed yet.