Implement RFC 3678: Final trait methods#130802
Implement RFC 3678: Final trait methods#130802compiler-errors wants to merge 6 commits intorust-lang:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
Note that doing so could also be a pessimization -- see conversation in rust-lang/rfcs#3678 (comment) -- so I think that's absolutely the right choice for now, and might even be the right choice going forward too. |
|
@compiler-errors You are absolutely incredible; I did not expect someone to pick this up for implementation so quickly. Thank you! ❤️ |
|
This will need to be reworked almost totally since it seems that @joshtriplett is going to rewrite his RFC. |
|
@compiler-errors I don't anticipate making an utter rewrite here, just changing |
…, r=fee1-dead Implement RFC 3678: Final trait methods Tracking: rust-lang#131179 This PR is based on rust-lang#130802, with some minor changes and conflict resolution. Futhermore, this PR excludes final methods from the vtable of a dyn Trait. And some excerpt from the original PR description: > Implements the surface part of rust-lang/rfcs#3678. > > I'm using the word "method" in the title, but in the diagnostics and the feature gate I used "associated function", since that's more accurate. cc @joshtriplett
Rollup merge of #151783 - mu001999-contrib:impl/final-method, r=fee1-dead Implement RFC 3678: Final trait methods Tracking: #131179 This PR is based on #130802, with some minor changes and conflict resolution. Futhermore, this PR excludes final methods from the vtable of a dyn Trait. And some excerpt from the original PR description: > Implements the surface part of rust-lang/rfcs#3678. > > I'm using the word "method" in the title, but in the diagnostics and the feature gate I used "associated function", since that's more accurate. cc @joshtriplett
…dead Implement RFC 3678: Final trait methods Tracking: rust-lang/rust#131179 This PR is based on rust-lang/rust#130802, with some minor changes and conflict resolution. Futhermore, this PR excludes final methods from the vtable of a dyn Trait. And some excerpt from the original PR description: > Implements the surface part of rust-lang/rfcs#3678. > > I'm using the word "method" in the title, but in the diagnostics and the feature gate I used "associated function", since that's more accurate. cc @joshtriplett
…dead Implement RFC 3678: Final trait methods Tracking: rust-lang/rust#131179 This PR is based on rust-lang/rust#130802, with some minor changes and conflict resolution. Futhermore, this PR excludes final methods from the vtable of a dyn Trait. And some excerpt from the original PR description: > Implements the surface part of rust-lang/rfcs#3678. > > I'm using the word "method" in the title, but in the diagnostics and the feature gate I used "associated function", since that's more accurate. cc @joshtriplett
Implements the surface part of RFC 3678. Gonna keep this open as a draft until the RFC finishes FCP.
What it doesn't implement are any optimizations that can be done on final trait methods, such as excluding them from the vtable of a
dyn Trait. This also doesn't implementfinalfor other trait items.I'm using the word "method" in the title, but in the diagnostics and the feature gate I used "associated function", since that's more accurate.
r? @ghost
Tracking:
finalmethods) #131179