Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm-bindgen appears to trigger new clippy lint clippy::empty_docs #3945

Closed
kflansburg opened this issue May 2, 2024 · 3 comments · Fixed by #3946
Closed

wasm-bindgen appears to trigger new clippy lint clippy::empty_docs #3945

kflansburg opened this issue May 2, 2024 · 3 comments · Fixed by #3946
Labels

Comments

@kflansburg
Copy link
Contributor

Summary

From what I can tell, Rust 1.78 introduced some new clippy lints that appear to be triggering within the wasm-bindgen macro.

warning: empty doc comment
 --> worker-sys/src/ext/abort_controller.rs:6:5
  |
6 |     #[wasm_bindgen]
  |     ^^^^^^^^^^^^^^^
  |
  = help: consider removing or filling it
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs
  = note: `#[warn(clippy::empty_docs)]` on by default
  = note: this warning originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
@kflansburg kflansburg added the bug label May 2, 2024
@skyf0l
Copy link

skyf0l commented May 2, 2024

Same with tsify

error: empty doc comment
  --> [RUST_FILE]:11:10
   |
11 | #[derive(Tsify, Serialize, Deserialize, Debug, Clone)]
   |          ^^^^^
   |
   = help: consider removing or filling it
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_docs
   = note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)

@m4tx
Copy link

m4tx commented May 7, 2024

+1. cargo expand suggests an empty docstring is generated both for structures and each of their methods.

kflansburg added a commit to kflansburg/wasm-bindgen that referenced this issue May 7, 2024
kflansburg added a commit to kflansburg/wasm-bindgen that referenced this issue May 7, 2024
Liamolucko pushed a commit that referenced this issue May 8, 2024
* Do not include docstring if empty

Closes #3945

* Move changelog entry to correct section
sd2k added a commit to grafana/augurs that referenced this issue May 14, 2024
daxpedda pushed a commit to daxpedda/wasm-bindgen that referenced this issue May 21, 2024
* Do not include docstring if empty

Closes rustwasm#3945

* Move changelog entry to correct section
@benma
Copy link

benma commented Jun 1, 2024

Would be nice to make a release containing this fix.

daxpedda pushed a commit to daxpedda/wasm-bindgen that referenced this issue Jun 19, 2024
* Do not include docstring if empty

Closes rustwasm#3945

* Move changelog entry to correct section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants