Skip to content

Commit a8de11c

Browse files
small error code explanations improvements
1 parent 9bb2e3c commit a8de11c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustc_error_codes/error_codes/E0033.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ dereferencing the pointer.
2424
You can read more about trait objects in the [Trait Objects] section of the
2525
Reference.
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

src/librustc_error_codes/error_codes/E0038.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ cause this problem.)
6262
In such a case, the compiler cannot predict the return type of `foo()` in a
6363
situation like the following:
6464

65-
```compile_fail
65+
```compile_fail,E0038
6666
trait Trait {
6767
fn foo(&self) -> Self;
6868
}
@@ -183,7 +183,7 @@ fn call_foo(thing: Box<Trait>) {
183183

184184
We 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
187187
types being fed to `foo()`) = 30 implementations!
188188

189189
With real world traits these numbers can grow drastically.

0 commit comments

Comments
 (0)