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:
parent
a63fc8c7f8
commit
fc39b33ef0
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue