Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the list of coercions to the reference #290

Merged
merged 3 commits into from
Jul 6, 2021

Conversation

JohnTitor
Copy link
Member

@JohnTitor JohnTitor commented Jul 6, 2021

Helps #279:

  • Removed the list of coercions and added a link to the reference (at a glance, the reference completely covers the items in the list here, so just removed)
  • Tweaked the wording on some lines
  • Updated the diagnostics

Copy link
Contributor

@Gankra Gankra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a few edits

src/coercions.md Outdated

Coercion is allowed between the following types:
## Cases where coercions do not perform
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Cases where coercions do not perform
## Cases where coercions do not happen

(but I would drop the subheading altogether -- this is already a very short page now)

src/coercions.md Outdated
@@ -67,20 +25,21 @@ fn main() {
}
```

which fails like the following:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
which fails like the following:
which fails as follows:

src/coercions.md Outdated
`U`, that does not constitute an implementation for `T`. For example, the
following will not type check, even though it is OK to coerce `t` to `&T` and
there is an impl for `&T`:
Note that we do not perform coercions when matching traits (except for receivers, see below).
Copy link
Contributor

@Gankra Gankra Jul 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Note that we do not perform coercions when matching traits (except for receivers, see below).
Note that we do not perform coercions when matching traits (except for receivers, see the next page).

This is a pre-existing error, but still should be fixed.

@JohnTitor
Copy link
Member Author

Thanks! Applied all the review comments.

@Gankra Gankra merged commit 7a13537 into rust-lang:master Jul 6, 2021
@JohnTitor JohnTitor deleted the move-coercions branch July 6, 2021 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants