After extending web_sys with an IDL, when running` cargo doc --all-features --open` I get an erroneous can't find type error
sjud opened this issue · comments
Describe the Bug
When I run
cargo doc --all-features --open
on this crate
https://github.com/sjud/wasm-bindgen/tree/fedcm_idl
which is the result of running
cargo run --release --package wasm-bindgen-webidl -- webidls src/features ./Cargo.toml
after adding this idl
https://github.com/sjud/wasm-bindgen/blob/fedcm_idl/crates/web-sys/webidls/unstable/FedCM.webidl
I get this error
error[E0412]: cannot find type `IdentityCredentialRequestOptions` in this scope
--> crates/web-sys/src/features/gen_CredentialRequestOptions.rs:15:61
|
5 | #[wasm_bindgen]
| --------------- similarly named struct `CredentialRequestOptions` defined here
...
15 | fn identity_shim(this: &CredentialRequestOptions, val: &IdentityCredentialRequestOptions);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a struct with a similar name exists: `CredentialRequestOptions`
For more information about this error, try rustc --explain E0412
.
error: could not document web-sys
Except, this is wrong because
https://github.com/sjud/wasm-bindgen/blob/fedcm_idl/crates/web-sys/src/features/gen_IdentityCredentialRequestOptions.rs
exists and is in the mod.rs
https://github.com/sjud/wasm-bindgen/blob/fedcm_idl/crates/web-sys/src/features/mod.rs
line 4763
Steps to Reproduce
- Clone the repo https://github.com/sjud/wasm-bindgen
- Switch to branch fedcm_idl
- run
cargo doc --all-features --open
If applicable, add a link to a test case (as a zip file or link to a repository we can clone).
Expected Behavior
No type not found error.
Actual Behavior
There is a type not found error.
Additional Context
Thank you for all of your hard work.