Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Multiple applicable provide methods in scope" #190

Merged
merged 6 commits into from Sep 13, 2022
Merged

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Sep 13, 2022

Fixes #185.

Currently fails with:

    error[E0034]: multiple applicable items in scope
       --> tests/test_backtrace.rs:165:13
        |
    165 |             x: std::io::Error,
        |             ^ multiple `provide` found
        |
        = note: candidate #1 is defined in an impl of the trait `Provider` for the type `E`
        = note: candidate #2 is defined in an impl of the trait `std::error::Error` for the type `std::io::Error`
    help: disambiguate the associated function for candidate #1
        |
    165 |             Provider::provide(&x, Error): std::io::Error,
        |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    help: disambiguate the associated function for candidate #2
        |
    165 |             std::error::Error::provide(&x, Error): std::io::Error,
        |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@gakonst
Copy link

gakonst commented Sep 21, 2022

Did this PR somehow break things? I added thiserror on a new crate and got:

error[E0554]: `#![feature]` may not be used on the stable release channel
   --> /Users/georgios/.cargo/registry/src/github.com-1ecc6299db9ec823/thiserror-1.0.35/src/lib.rs:211:34
    |
211 | #![cfg_attr(provide_any, feature(provide_any))]
    |                                  ^^^^^^^^^^^

For more information about this error, try `rustc --explain E0554`.
rustc --version
rustc 1.63.0 (4b91a6ea7 2022-08-08)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple applicable provide methods in scope
2 participants