mirror of
https://github.com/denoland/deno.git
synced 2025-01-07 06:46:59 -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)
|
codegen_v8_sync(&core, &func)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let docline = format!("Use `{name}::decl()` to get an op-declaration");
|
||||||
// Generate wrapper
|
// Generate wrapper
|
||||||
quote! {
|
quote! {
|
||||||
#[allow(non_camel_case_types)]
|
#[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;
|
pub struct #name;
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
impl #name {
|
impl #name {
|
||||||
pub fn name() -> &'static str {
|
pub fn name() -> &'static str {
|
||||||
stringify!(#name)
|
stringify!(#name)
|
||||||
|
|
Loading…
Reference in a new issue