1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-05 13:59:01 -05:00

chore(ops): hide implementation details from rustdoc (#14038)

Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
This commit is contained in:
Divy Srivastava 2022-03-20 02:43:53 +05:30 committed by Kitson Kelly
parent a63fc8c7f8
commit fc39b33ef0

View file

@ -57,11 +57,17 @@ pub fn op(_attr: TokenStream, item: TokenStream) -> TokenStream {
codegen_v8_sync(&core, &func)
};
let docline = format!("Use `{name}::decl()` to get an op-declaration");
// Generate wrapper
quote! {
#[allow(non_camel_case_types)]
#[doc="Auto-generated by `deno_ops`, i.e: `#[op]`"]
#[doc=""]
#[doc=#docline]
#[doc="you can include in a `deno_core::Extension`."]
pub struct #name;
#[doc(hidden)]
impl #name {
pub fn name() -> &'static str {
stringify!(#name)