File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/librustc_error_codes/error_codes Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -24,4 +24,4 @@ dereferencing the pointer.
2424You can read more about trait objects in the [ Trait Objects] section of the
2525Reference.
2626
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.)
6262In such a case, the compiler cannot predict the return type of ` foo() ` in a
6363situation like the following:
6464
65- ``` compile_fail
65+ ``` compile_fail,E0038
6666trait Trait {
6767 fn foo(&self) -> Self;
6868}
@@ -183,7 +183,7 @@ fn call_foo(thing: Box<Trait>) {
183183
184184We don't just need to create a table of all implementations of all methods of
185185` 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
187187types being fed to ` foo() ` ) = 30 implementations!
188188
189189With real world traits these numbers can grow drastically.
You can’t perform that action at this time.
0 commit comments