@@ -1657,6 +1657,46 @@ This will fail because the compiler does not know which instance of `Foo` to
16571657call `bar` on. Change `Foo::bar()` to `Foo::<T>::bar()` to resolve the error.
16581658"## ,
16591659
1660+ E0283 : r##"
1661+ This error occurs when the compiler doesn't have enough information
1662+ to unambiguously choose an implementation.
1663+
1664+ For example:
1665+
1666+ ```
1667+ trait Generator {
1668+ fn create() -> u32;
1669+ }
1670+
1671+ struct Impl;
1672+ impl Generator for Impl {
1673+ fn create() -> u32 { 1 }
1674+ }
1675+
1676+ struct AnotherImpl;
1677+ impl Generator for AnotherImpl {
1678+ fn create() -> u32 { 2 }
1679+ }
1680+
1681+ fn main() {
1682+ let cont: u32 = Generator::create();
1683+ // error, impossible to choose one of Generator trait implementation
1684+ // Impl or AnotherImpl? Maybe anything else?
1685+ }
1686+ ```
1687+
1688+ To resolve this error use the concrete type:
1689+
1690+ ```
1691+ fn main() {
1692+ let gen1 = AnotherImpl::create();
1693+
1694+ // if there are multiple methods with same name (different traits)
1695+ let gen2 = <AnotherImpl as Generator>::create();
1696+ }
1697+ ```
1698+ "## ,
1699+
16601700E0296 : r##"
16611701This error indicates that the given recursion limit could not be parsed. Ensure
16621702that the value provided is a positive integer between quotes, like so:
@@ -2279,7 +2319,6 @@ register_diagnostics! {
22792319 E0278 , // requirement is not satisfied
22802320 E0279 , // requirement is not satisfied
22812321 E0280 , // requirement is not satisfied
2282- E0283 , // cannot resolve type
22832322 E0284 , // cannot resolve type
22842323 E0285 , // overflow evaluation builtin bounds
22852324 E0298 , // mismatched types between arms
0 commit comments