-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
docs(turbo-tasks): Rewrite the turbo_tasks::value
documentation
#70743
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -339,9 +339,9 @@ pub fn value(args: TokenStream, input: TokenStream) -> TokenStream { | |
|
||
let into = if let IntoMode::New | IntoMode::Shared = into_mode { | ||
quote! { | ||
impl Into<turbo_tasks::Vc<#ident>> for #ident { | ||
fn into(self) -> turbo_tasks::Vc<#ident> { | ||
self.cell() | ||
impl ::std::convert::From<#ident> for turbo_tasks::Vc<#ident> { | ||
fn from(value: #ident) -> Self { | ||
value.cell() | ||
Comment on lines
+342
to
+344
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This probably dated back to before Rust 1.41:
-- https://doc.rust-lang.org/std/convert/trait.From.html Best-practice these days is to implement |
||
} | ||
} | ||
} | ||
|
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 had to be moved into the
turbo-tasks
crate's re-export of this macro, otherwise it's not possible for any of the intra-doc links to work: https://doc.rust-lang.org/rustdoc/write-documentation/linking-to-items-by-name.html#warnings-re-exports-and-scoping