Skip to content

2024 dependency_on_unit_never_type_fallback doesn't display during 2024 edition migration #132930

Closed
@ehuss

Description

@ehuss

I'm not entirely certain what is wrong with this particular code, but it fails in the 2024 edition without generating any warnings.

[email protected]
https://crater-reports.s3.amazonaws.com/pr-132712/try%23da25749bf5e6ba5ed862ff361c19afff2a986b2d/reg/screenshots-0.8.10/log.txt

The error after updating to 2024 is:

error[E0277]: the trait bound `!: ReadAll` is not satisfied
   --> src/linux/wayland_screenshot.rs:70:11
    |
70  |     proxy.method_call(
    |           ^^^^^^^^^^^ the trait `ReadAll` is not implemented for `!`
    |
    = help: the following other types implement trait `ReadAll`:
              ()
              (A, B)
              (A, B, C)
              (A, B, C, D)
              (A, B, C, D, E)
              (A, B, C, D, E, F)
              (A, B, C, D, E, F, G)
              (A, B, C, D, E, F, G, H)
            and 28 others
    = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
    = help: did you intend to use the type `()` here instead?
note: required by a bound in `Proxy::<'a, C>::method_call`
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/dbus-0.9.7/src/blocking.rs:396:35
    |
396 |     pub fn method_call<'i, 'm, R: ReadAll, A: AppendAll, I: Into<Interface<'i>>, M: Into<Member<'m>>>(&self, i: I, m: M, args: A) -> Result<R, Error> {
    |                                   ^^^^^^^ required by this bound in `Proxy::<'a, C>::method_call`

error[E0277]: the trait bound `!: ReadAll` is not satisfied
   --> src/linux/wayland_screenshot.rs:126:11
    |
126 |     proxy.method_call(
    |           ^^^^^^^^^^^ the trait `ReadAll` is not implemented for `!`
    |
    = help: the following other types implement trait `ReadAll`:
              ()
              (A, B)
              (A, B, C)
              (A, B, C, D)
              (A, B, C, D, E)
              (A, B, C, D, E, F)
              (A, B, C, D, E, F, G)
              (A, B, C, D, E, F, G, H)
            and 28 others
    = note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
    = help: did you intend to use the type `()` here instead?
note: required by a bound in `Proxy::<'a, C>::method_call`
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/dbus-0.9.7/src/blocking.rs:396:35
    |
396 |     pub fn method_call<'i, 'm, R: ReadAll, A: AppendAll, I: Into<Interface<'i>>, M: Into<Member<'m>>>(&self, i: I, m: M, args: A) -> Result<R, Error> {
    |                                   ^^^^^^^ required by this bound in `Proxy::<'a, C>::method_call`

The relevant types are from the dbus crate.

I would expect that if this is related to dependency_on_unit_never_type_fallback that it should generate a warning before migrating to 2024.

Meta

rustc --version --verbose:

rustc 1.84.0-nightly (143ce0920 2024-11-10)
binary: rustc
commit-hash: 143ce0920a2307b19831160a01f06f107610f1b2
commit-date: 2024-11-10
host: aarch64-unknown-linux-gnu
release: 1.84.0-nightly
LLVM version: 19.1.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-edition-2024Area: The 2024 editionC-bugCategory: This is a bug.D-editionDiagnostics: An error or lint that should account for edition differences.F-never_type`#![feature(never_type)]`L-dependency_on_unit_never_type_fallbackLint: dependency_on_unit_never_type_fallback

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions