This compiles, but if you uncomment the Provider import, it fails because both Error and Provider contain a method named provide (I consider this a flaw in the standard library API... rust-lang/rust#99301rust-lang/rust#96024).
error[E0034]: multiple applicable items in scope --> src/main.rs:11:5 |11 | 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 |11 | Provider::provide(&x, Error): std::io::Error, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~help: disambiguate the associated function for candidate #2 |11 | std::error::Error::provide(&x, Error): std::io::Error, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered:
This compiles, but if you uncomment the
Provider
import, it fails because bothError
andProvider
contain a method namedprovide
(I consider this a flaw in the standard library API... rust-lang/rust#99301 rust-lang/rust#96024).The text was updated successfully, but these errors were encountered: