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

Substantial rewrites. #20

Merged
merged 1 commit into from
Apr 5, 2024
Merged

Conversation

adetaylor
Copy link
Owner

There's been much discussion at recent Rust lang team meetings about this feature, followed by further discussion on Zulip and face-to-face at RustNation.

The main conclusions have been:

  • yes we want to do this; Rust for Linux has equally important use-cases
  • the previously proposed deshadowing algorithm is believed to be sound but is also complex and counterintuitive, so we may want to more broadly rethink method resolution.
  • so, for now, let's do the most conservative possible version - NOT supporting raw pointers, Weak or NonNull - but instead erroring on any case where there is a possible method conflict between an outer smart pointer type and its contained type. This will give us maximal flexibility to relax restrictions in future.

This PR updates the RFC correspondingly.

Prototype code can be found at:
rust-lang/rust@master...adetaylor:rust:receiver_trait_with_target_simplified_per_rustnation

There's been much discussion at recent Rust lang team meetings about this
feature, followed by further discussion on Zulip and face-to-face at
RustNation.

The main conclusions have been:
* yes we want to do this; Rust for Linux has equally important use-cases
* the previously proposed deshadowing algorithm is believed to be sound but is
  also complex and counterintuitive, so we may want to more broadly rethink
  method resolution.
* so, for now, let's do the most conservative possible version - NOT supporting
  raw pointers, Weak or NonNull - but instead erroring on any case where there
  is a possible method conflict between an outer smart pointer type and its
  contained type. This will give us maximal flexibility to relax restrictions
  in future.

This PR updates the RFC correspondingly.

Prototype code can be found at:
rust-lang/rust@master...adetaylor:rust:receiver_trait_with_target_simplified_per_rustnation
@adetaylor adetaylor merged commit a436b1e into arbitrary-self-types-v2 Apr 5, 2024
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.

1 participant