diff options
| author | Michael Goulet <michael@errs.io> | 2023-12-28 20:06:18 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-29 10:06:18 +0900 |
| commit | 29d53e315c03b2d43057d35fbb606c71e9fa71f6 (patch) | |
| tree | 57f07b7ba9bec612051485ac678142768ab0fd14 /src/doc | |
| parent | 6cf1850ad61b1de46f6be6fa91f8e2f204e63814 (diff) | |
| download | rust-29d53e315c03b2d43057d35fbb606c71e9fa71f6.tar.gz rust-29d53e315c03b2d43057d35fbb606c71e9fa71f6.zip | |
Fix typo in unsize docs (#1843)
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/traits/unsize.md | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/doc/rustc-dev-guide/src/traits/unsize.md b/src/doc/rustc-dev-guide/src/traits/unsize.md index b1176099208..4876bfd07dd 100644 --- a/src/doc/rustc-dev-guide/src/traits/unsize.md +++ b/src/doc/rustc-dev-guide/src/traits/unsize.md @@ -70,10 +70,10 @@ Specifically, the upcasting algorithm involves: For each supertrait of the source dyn trait's principal (including itself)... 1. Unify the super trait ref with the principal of the target (making sure we only ever upcast to a true supertrait, and never [via an impl]). -2. For every auto trait in the source, check that it's present in the principal +2. For every auto trait in the target, check that it's present in the source (allowing us to drop auto traits, but never gain new ones). -3. For every projection in the source, check that it unifies with a single - projection in the target (since there may be more than one given +3. For every projection in the target, check that it unifies with a single + projection in the source (since there may be more than one given `trait Sub: Sup<.., A = i32> + Sup<.., A = u32>`). [via an impl]: https://github.com/rust-lang/rust/blob/f3457dbf84cd86d284454d12705861398ece76c3/tests/ui/traits/trait-upcasting/illegal-upcast-from-impl.rs#L19 @@ -81,4 +81,5 @@ source dyn trait's principal (including itself)... Specifically, (3.) prevents a choice of projection bound to guide inference unnecessarily, though it may guide inference when it is unambiguous. -[^1]: The principal is the one non-auto trait of a `dyn Trait`. \ No newline at end of file +[^1]: The principal is the one non-auto trait of a `dyn Trait`. + |
