-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Add basic documentation/examples for six unstable features. #40452
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @GuillaumeGomez (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
c3be18e
to
aa25229
Compare
@@ -6,5 +6,19 @@ The tracking issue for this feature is: [#34511] | |||
|
|||
------------------------ | |||
|
|||
The `conservative_impl_trait` feature allows a conservative form of abstract return types. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably because I'm new to the language, but this does not make it clearer to me. The example also does not make me understand why regular stable Rust would not behave this way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @JordiPolo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest force push expands this section. Most of the copy is from the associated RFC.
|
||
```rust |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to precise rust in the book?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure.
7b28c3c
to
cc2e700
Compare
Good for me, thanks! @bors: r+ rollup |
📌 Commit cc2e700 has been approved by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bors: r-
could you word wrap everything please?
|
||
Abstract return types allow a function to hide a concrete return type behind a trait interface similar to trait objects, while still generating the same statically dispatched code as with concrete types. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this wasn't wrapped
@bors: r- |
Is our policy on word wrapping / line length documented somewhere? |
cc2e700
to
d3ae2eb
Compare
Wrapped everything at 80 columns.
I wrapped everything and didn't change anything else, so I'm just going to re-approve this @bors r=GuillaumeGomez rollup |
📌 Commit d3ae2eb has been approved by |
…GuillaumeGomez Add basic documentation/examples for six unstable features.
…GuillaumeGomez Add basic documentation/examples for six unstable features.
…GuillaumeGomez Add basic documentation/examples for six unstable features.
…GuillaumeGomez Add basic documentation/examples for six unstable features.
…GuillaumeGomez Add basic documentation/examples for six unstable features.
…GuillaumeGomez Add basic documentation/examples for six unstable features.
No description provided.