@@ -1657,6 +1657,46 @@ This will fail because the compiler does not know which instance of `Foo` to
1657
1657
call `bar` on. Change `Foo::bar()` to `Foo::<T>::bar()` to resolve the error.
1658
1658
"## ,
1659
1659
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
+
1660
1700
E0296 : r##"
1661
1701
This error indicates that the given recursion limit could not be parsed. Ensure
1662
1702
that the value provided is a positive integer between quotes, like so:
@@ -2279,7 +2319,6 @@ register_diagnostics! {
2279
2319
E0278 , // requirement is not satisfied
2280
2320
E0279 , // requirement is not satisfied
2281
2321
E0280 , // requirement is not satisfied
2282
- E0283 , // cannot resolve type
2283
2322
E0284 , // cannot resolve type
2284
2323
E0285 , // overflow evaluation builtin bounds
2285
2324
E0298 , // mismatched types between arms
0 commit comments