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

Scoped impl Trait for Type #3634

Closed
wants to merge 28 commits into from

Commits on Nov 26, 2023

  1. Configuration menu
    Copy the full SHA
    a10729f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dfa5a2e View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2023

  1. Pre-RFC v2

    - Defined rules for the observed `TypeId` of generic type parameters' opaque types, rewrote sections on type identity and layout-compatibility
    - Added section on sealed traits
    - Corrected the use of 'blanket implementation' vs. 'generic implementation' vs. 'implementation on a generic type'
    - Sketched two more warnings and one more error
    - Added a section Behaviour change/Warning: `TypeId` of generic discretised using generic type parameters
    - Removed the Trait binding site section but kept Coercion to trait objects and slightly expanded it
    - Added section Unexpected behaviour of `TypeId::of::<Self>()` in implementations on generics in the consumer-side presence of scoped implementations and `transmute`
    - Near-completely rewrote the Rationale and alternatives section with subheadings and before/after-style examples, added more positive effects of the feature
    - Rewrote Alternatives section
    - Removed some Unresolved questions that are now tentatively resolved
    - Added top-level syntax and a field example to Explicit binding, elaborated a bit more
    - Added Future possibilities:
      - Conversions where a generic only cares about specific bounds' consistency
      - Scoped bounds as contextual alternative to sealed traits
      - Glue crate suggestions
    - Various small fixes, adjustments and clarifications
    Tamschi committed Dec 3, 2023
    Configuration menu
    Copy the full SHA
    7cd3473 View commit details
    Browse the repository at this point in the history
  2. Small wording fix

    Tamschi committed Dec 3, 2023
    Configuration menu
    Copy the full SHA
    1c4a5bf View commit details
    Browse the repository at this point in the history

Commits on Dec 5, 2023

  1. Pre-RFC v3

    - Added a list of bullet points to the Summary and revised it slightly
    - Coined the term *implementation environment* to refer to the set of all implementations applicable (to a given type) in a given place
    - Near-completely rewrote the Logical consistency subsection to add subheadings and examples
    - Small fixes and adjustments
    Tamschi committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    7aa8966 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d21a6bb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b0cd5c2 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2023

  1. Pre-RFC v4

    - Distinguish between implementation-aware generics and implementation-invariant generics
    - Minor edits and fixes
    Tamschi committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    047fc15 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e73714e View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2024

  1. Pre-RFC v5

    - Added section "(Pending changes to this draft)".
    - Revised "`TypeId` of generic type parameters' opaque types" as tuples are implementation-invariant.
    - Replaced section "Contextual monomorphisation of generic implementations and generic functions" with sections "Binding choice by implementations' bounds" and "Binding and generics".
    - Added sections "Marking a generic as implementation-invariant is a breaking change" and "Efficient compilation".
    - Renamed future possibilities section "Scoped bounds as contextual alternative to sealed traits" to "Sealed trait bounds".
    - Added future possibilities section "Reusable limited-access APIs".
    - a range of smaller adjustments to wording and formatting
    Tamschi committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    483f22a View commit details
    Browse the repository at this point in the history

Commits on May 5, 2024

  1. Pre-RFC v6

    - Implemented the former Future Possibilities section "Explicit binding" into the main text as "inline implementation environments", mainly in form of grammar extensions.
    - Specified that call expressions capture the implementation environment of their function operand, acting as host for implementation-invariant generics there.
    - Miscellaneous wording clarifications and fixes. (Turns out you can't call a tuple struct's implicit constructor through a type alias, whoops.)
    Tamschi committed May 5, 2024
    Configuration menu
    Copy the full SHA
    b0fe6b3 View commit details
    Browse the repository at this point in the history

Commits on May 12, 2024

  1. Final RFC-draft for Scoped impl Trait for Type

    - Added more guide-level documentation changes
    - Reordered warnings and errors to the end of the reference-level explanation
    - Some small adustments to wording and formatting
    Tamschi committed May 12, 2024
    Configuration menu
    Copy the full SHA
    36da3b5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aa4985f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7af6148 View commit details
    Browse the repository at this point in the history
  4. Fixed Start Date header

    Tamschi committed May 12, 2024
    Configuration menu
    Copy the full SHA
    f82162b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b7fb5e2 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2024

  1. Changed "## Type parameters capture their *implementation environment…

    …*" to "## Type arguments capture their *implementation environment*" and clarified the role of type arguments vs. type parameters
    
    This was pointed out in the Rust Programming Language Community Discord.
    Tamschi committed May 13, 2024
    Configuration menu
    Copy the full SHA
    ef35245 View commit details
    Browse the repository at this point in the history
  2. Added missing pub visibility

    Fixes https://github.com/rust-lang/rfcs/pull/3634/files#r1598697056 . An inline implementation environment can only refer to implementations that it can actually see.
    Tamschi committed May 13, 2024
    Configuration menu
    Copy the full SHA
    129e734 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f3589ad View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9c1ef7a View commit details
    Browse the repository at this point in the history
  5. Changed "No priority over type-associated methods" into "Resolution p…

    …riority" with more and more precise information
    Tamschi committed May 13, 2024
    Configuration menu
    Copy the full SHA
    6fc4bf9 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2024

  1. Configuration menu
    Copy the full SHA
    99dc572 View commit details
    Browse the repository at this point in the history

Commits on May 26, 2024

  1. Added "Limitations on bounded opaque types and type variables" as sub…

    …section of "Limitations on trait object types"
    Tamschi committed May 26, 2024
    Configuration menu
    Copy the full SHA
    308af53 View commit details
    Browse the repository at this point in the history
  2. Added "Forbidden implementation combinations" and the error "potentia…

    …lly unsound combination of implementations"
    Tamschi committed May 26, 2024
    Configuration menu
    Copy the full SHA
    360a594 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2024

  1. Configuration menu
    Copy the full SHA
    4d74669 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bf0379f View commit details
    Browse the repository at this point in the history
  3. Wording correction

    Tamschi committed Jun 1, 2024
    Configuration menu
    Copy the full SHA
    1d5ad36 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    251e4c4 View commit details
    Browse the repository at this point in the history