Skip to content

Explicitly note any cast not defined in the documentation is illegal. #982

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
Mar 17, 2021

Conversation

mcclure
Copy link
Contributor

@mcclure mcclure commented Mar 16, 2021

My attempt to address #979. Does this help?

This may cause a merge conflict with #961 .

@Havvy
Copy link
Contributor

Havvy commented Mar 16, 2021

#961 already has a merge conflict that needs to be resolved.

I think the sentence is good to add. I think it should be after line 308 instead of after the table. I'll defer to your judgement though if you disagree with that though.

Here's what it would look like:

`as` can be used to explicitly perform [coercions](../type-coercions.md), as well as the following additional casts.
Any cast that does not fit either a coercion rule or an entry in the table is a compiler error.
Here `*T` means either `*const T` or `*mut T`.

@mcclure
Copy link
Contributor Author

mcclure commented Mar 16, 2021

I think your way is clearer, I switched it.

@Havvy Havvy merged commit c3d550c into rust-lang:master Mar 17, 2021
@Havvy
Copy link
Contributor

Havvy commented Mar 17, 2021

💟 Thanks

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants