Skip to content

Clarify Any docs #14840

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

Closed
wants to merge 1 commit into from
Closed

Clarify Any docs #14840

wants to merge 1 commit into from

Conversation

ftxqxd
Copy link
Contributor

@ftxqxd ftxqxd commented Jun 12, 2014

The Any docs previously did not state that only 'static types implement it.

The `Any` docs previously did not state that only `'static` types implement it.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 5, 2023
…lbasi

fix: introduce new type var when expectation for ref pat is not ref

Fixes rust-lang#14840

When we infer the type of ref patterns, its expected type may not be reference type: 1) expected type is an unresolved inference variable, or 2) expected type is erroneously other kind of type. In either case, we should produce a reference type with a new type variable rather than an error type so that we can continue inferring the inner patterns without further errors because of the (possible) type mismatch of this pattern.
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