Skip to content

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

Merged
Havvy merged 2 commits into
rust-lang:masterfrom
mcclure:undefined-cast
Mar 17, 2021
Merged

Explicitly note any cast not defined in the documentation is illegal.#982
Havvy merged 2 commits into
rust-lang:masterfrom
mcclure:undefined-cast

Conversation

@mcclure

Copy link
Copy Markdown
Contributor

My attempt to address #979. Does this help?

This may cause a merge conflict with #961 .

@Havvy

Copy link
Copy Markdown
Contributor

#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
Copy Markdown
ContributorAuthor

I think your way is clearer, I switched it.

Comment threadsrc/expressions/operator-expr.md Outdated
@Havvy
Havvy merged commit c3d550c into rust-lang:masterMar 17, 2021
@Havvy

Copy link
Copy Markdown
Contributor

💟 Thanks

Sign up for freeto 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

@mcclure@Havvy