diff options
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0033.md | 2 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0038.md | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_error_codes/error_codes/E0033.md b/src/librustc_error_codes/error_codes/E0033.md index c49cedf2d58..735a2d1f3fe 100644 --- a/src/librustc_error_codes/error_codes/E0033.md +++ b/src/librustc_error_codes/error_codes/E0033.md @@ -24,4 +24,4 @@ dereferencing the pointer. You can read more about trait objects in the [Trait Objects] section of the Reference. -[Trait Objects]: https://doc.rust-lang.org/reference/types.html#trait-objects \ No newline at end of file +[Trait Objects]: https://doc.rust-lang.org/reference/types.html#trait-objects diff --git a/src/librustc_error_codes/error_codes/E0038.md b/src/librustc_error_codes/error_codes/E0038.md index 21b5eb47480..25e380b02e6 100644 --- a/src/librustc_error_codes/error_codes/E0038.md +++ b/src/librustc_error_codes/error_codes/E0038.md @@ -62,7 +62,7 @@ cause this problem.) In such a case, the compiler cannot predict the return type of `foo()` in a situation like the following: -```compile_fail +```compile_fail,E0038 trait Trait { fn foo(&self) -> Self; } @@ -183,7 +183,7 @@ fn call_foo(thing: Box<Trait>) { We don't just need to create a table of all implementations of all methods of `Trait`, we need to create such a table, for each different type fed to -`foo()`. In this case this turns out to be (10 types implementing `Trait`)*(3 +`foo()`. In this case this turns out to be (10 types implementing `Trait`)\*(3 types being fed to `foo()`) = 30 implementations! With real world traits these numbers can grow drastically. |
