Skip to content

Commit 10239aa

Browse files
committed
Don't document descriptor functions
They aren't part of any public API, and are just an implementation detail of wasm-bindgen.
1 parent 9ee1acb commit 10239aa

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

crates/backend/src/codegen.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ impl ToTokens for ast::StructField {
260260
}
261261

262262
#[no_mangle]
263+
#[doc(hidden)]
263264
pub extern fn #desc() {
264265
use wasm_bindgen::describe::*;
265266
<#ty as WasmDescribe>::describe();
@@ -439,6 +440,7 @@ impl ToTokens for ast::Export {
439440
// binary along with anything it references.
440441
#[no_mangle]
441442
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
443+
#[doc(hidden)]
442444
pub extern fn #descriptor_name() {
443445
use wasm_bindgen::describe::*;
444446
inform(FUNCTION);
@@ -732,6 +734,7 @@ impl<'a> ToTokens for DescribeImport<'a> {
732734
(quote! {
733735
#[no_mangle]
734736
#[allow(non_snake_case)]
737+
#[doc(hidden)]
735738
pub extern fn #describe_name() {
736739
use wasm_bindgen::describe::*;
737740
inform(FUNCTION);

crates/webidl/tests/expected/Event.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ impl From<Event> for ::wasm_bindgen::JsValue {
5555
}
5656
#[no_mangle]
5757
#[allow(non_snake_case)]
58+
#[doc(hidden)]
5859
pub extern "C" fn __wbindgen_describe___wbg_f_stopPropagation_stopPropagation_Event() {
5960
use wasm_bindgen::describe::*;
6061
inform(FUNCTION);
@@ -94,6 +95,7 @@ impl Event {
9495
}
9596
#[no_mangle]
9697
#[allow(non_snake_case)]
98+
#[doc(hidden)]
9799
pub extern "C" fn __wbindgen_describe___wbg_f_stopImmediatePropagation_stopImmediatePropagation_Event(
98100
) {
99101
use wasm_bindgen::describe::*;
@@ -134,6 +136,7 @@ impl Event {
134136
}
135137
#[no_mangle]
136138
#[allow(non_snake_case)]
139+
#[doc(hidden)]
137140
pub extern "C" fn __wbindgen_describe___wbg_f_preventDefault_preventDefault_Event() {
138141
use wasm_bindgen::describe::*;
139142
inform(FUNCTION);
@@ -173,6 +176,7 @@ impl Event {
173176
}
174177
#[no_mangle]
175178
#[allow(non_snake_case)]
179+
#[doc(hidden)]
176180
pub extern "C" fn __wbindgen_describe___wbg_f_initEvent_initEvent_Event() {
177181
use wasm_bindgen::describe::*;
178182
inform(FUNCTION);

0 commit comments

Comments
 (0)