File tree 2 files changed +3
-3
lines changed
src/librustc_error_codes/error_codes
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -24,4 +24,4 @@ dereferencing the pointer.
24
24
You can read more about trait objects in the [ Trait Objects] section of the
25
25
Reference.
26
26
27
- [ Trait Objects ] : https://doc.rust-lang.org/reference/types.html#trait-objects
27
+ [ Trait Objects ] : https://doc.rust-lang.org/reference/types.html#trait-objects
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ cause this problem.)
62
62
In such a case, the compiler cannot predict the return type of ` foo() ` in a
63
63
situation like the following:
64
64
65
- ``` compile_fail
65
+ ``` compile_fail,E0038
66
66
trait Trait {
67
67
fn foo(&self) -> Self;
68
68
}
@@ -183,7 +183,7 @@ fn call_foo(thing: Box<Trait>) {
183
183
184
184
We don't just need to create a table of all implementations of all methods of
185
185
` Trait ` , we need to create such a table, for each different type fed to
186
- ` foo() ` . In this case this turns out to be (10 types implementing ` Trait ` )* (3
186
+ ` foo() ` . In this case this turns out to be (10 types implementing ` Trait ` )\ * (3
187
187
types being fed to ` foo() ` ) = 30 implementations!
188
188
189
189
With real world traits these numbers can grow drastically.
You can’t perform that action at this time.
0 commit comments