source_file
use_declaration
use "use"
scoped_identifier
scoped_identifier
identifier "std"
:: "::"
identifier "borrow"
:: "::"
identifier "Cow"
; ";"
use_declaration
use "use"
scoped_use_list
identifier "proc_macro2"
:: "::"
use_list
{ "{"
identifier "Group"
, ","
identifier "Ident"
, ","
identifier "Span"
, ","
identifier "TokenStream"
, ","
identifier "TokenTree"
} "}"
; ";"
use_declaration
use "use"
scoped_use_list
identifier "quote"
:: "::"
use_list
{ "{"
identifier "ToTokens"
, ","
identifier "quote"
, ","
identifier "quote_spanned"
} "}"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "rustc_hash"
:: "::"
identifier "FxHashSet"
; ";"
use_declaration (+95 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
) ")"
] "]"
struct_item (+90 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
) ")"
] "]"
struct_item (+22 nodes collapsed)
impl_item (+4437 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "PartialEq"
, ","
identifier "Eq"
) ")"
] "]"
enum_item (+21 nodes collapsed)
function_item (+323 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " An indication of what kind of IO this function does. Curren"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " static analysis, and ignored within this macro.\n"
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Hash"
, ","
identifier "PartialEq"
, ","
identifier "Eq"
) ")"
] "]"
enum_item
enum "enum"
type_identifier "IoMarker"
enum_variant_list
{ "{"
enum_variant
identifier "Filesystem"
, ","
enum_variant
identifier "Network"
, ","
} "}"
line_comment
// "//"
function_item (+139 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Arguments to the `#[turbo_tasks::function]` macro.\n"
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Default"
) ")"
] "]"
struct_item (+102 nodes collapsed)
impl_item (+361 nodes collapsed)
function_item (+101 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Approximates the conversion of type `T` to `<T as FromTaskI"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " with the `AutoFromTaskInput` specialization hack).\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " This expansion happens manually here for a couple reasons:\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " - While it's possible to simulate specialization of methods"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " autoderef) there's currently no way to simulate specializ"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " - Replacing arguments with types like `<T as FromTaskInput>"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " signatures illegible in the resulting rustdocs.\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Returns `Cow::Owned` when a transformation was applied, and"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " made to the input type.\n"
function_item (+847 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Performs [external signature rewriting][mdbook].\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " The expanded return type is normally a `turbo_tasks::Vc`, b"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " replaced with a custom type using `replace_vc`. Type parame"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " replacement. This is used for operation functions.\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " This is a hack! It approximates the expansion that we'd oth"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " `<T as TaskOutput>::Return`, so that the return type shown "...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " possible. Break out as soon as we see something we don't re"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment "\n"
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " [mdbook]: https://turbopack-rust-docs.vercel.sh/turbo-engin"...
function_item (+742 nodes collapsed)
struct_item
struct "struct"
type_identifier "RewriteSelfVisitMut"
field_declaration_list
{ "{"
field_declaration
field_identifier "self_ident"
: ":"
type_identifier "Ident"
, ","
} "}"
impl_item (+209 nodes collapsed)
function_item (+57 nodes collapsed)
function_item (+145 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " The context in which the function is being defined.\n"
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
, ","
identifier "Clone"
, ","
identifier "Eq"
, ","
identifier "PartialEq"
) ")"
] "]"
enum_item (+28 nodes collapsed)
impl_item (+82 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
) ")"
] "]"
struct_item
visibility_modifier
pub "pub"
struct "struct"
type_identifier "FilterTraitCallArgsTokens"
field_declaration_list
{ "{"
field_declaration
field_identifier "filter_owned"
: ":"
type_identifier "TokenStream"
, ","
field_declaration
field_identifier "filter_and_resolve"
: ":"
type_identifier "TokenStream"
, ","
} "}"
attribute_item
# "#"
[ "["
attribute
identifier "derive"
token_tree
( "("
identifier "Debug"
) ")"
] "]"
struct_item (+67 nodes collapsed)
impl_item
impl "impl"
type_identifier "NativeFn"
declaration_list
{ "{"
function_item (+27 nodes collapsed)
function_item
visibility_modifier
pub "pub"
fn "fn"
identifier "definition"
parameters
( "("
self_parameter
& "&"
self "self"
) ")"
-> "->"
type_identifier "TokenStream"
block
{ "{"
let_declaration (+30 nodes collapsed)
expression_statement
if_expression
if "if"
unary_expression
* "*"
identifier "is_method"
block
{ "{"
let_declaration
let "let"
identifier "arg_filter"
= "="
if_expression
if "if"
let_condition
let "let"
tuple_struct_pattern
identifier "Some"
( "("
identifier "filter"
) ")"
= "="
identifier "filter_trait_call_args"
block
{ "{"
let_declaration
let "let"
struct_pattern
type_identifier "FilterTraitCallArgsTokens"
{ "{"
field_pattern
shorthand_field_identifier "filter_owned"
, ","
field_pattern
shorthand_field_identifier "filter_and_resolve"
, ","
} "}"
= "="
identifier "filter"
; ";"
macro_invocation
identifier "quote"
! "!"
token_tree
{ "{"
:: "::"
identifier "std"
:: "::"
identifier "option"
:: "::"
identifier "Option"
:: "::"
identifier "Some"
token_tree any 2:1
( "("
token_tree any 2:1
( "("
# "#"
identifier "filter_owned"
, ","
# "#"
identifier "filter_and_resolve"
, ","
) ")"
) ")"
} "}"
} "}"
else_clause
else "else"
block
{ "{"
macro_invocation
identifier "quote"
! "!"
token_tree
{ "{"
:: "::"
identifier "std"
:: "::"
identifier "option"
:: "::"
identifier "Option"
:: "::"
identifier "None"
} "}"
} "}"
; ";"
expression_statement
if_expression
if "if"
unary_expression
* "*"
identifier "is_self_used"
block (+46 nodes collapsed)
else_clause (+48 nodes collapsed)
} "}"
else_clause (+45 nodes collapsed)
} "}"
} "}"
function_item (+113 nodes collapsed)
function_item (+39 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Returns true if this attribute is a turbo_tasks attribute w"...
function_item (+198 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Parses a `turbo_tasks::function` attribute out of the given"...
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " remaining attributes.\n"
function_item (+229 nodes collapsed)