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

extern blocks don't have doc comments #252

Merged
merged 1 commit into from
Mar 4, 2022

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Mar 4, 2022

Fixes a warning I see when building this code:

warning: unused doc comment
   --> crates/core_simd/src/intrinsics.rs:21:1
    |
21  | / /// These intrinsics aren't linked directly from LLVM and are mostly undocumented, however they are
22  | | /// mostly lowered to the matching LLVM instructions by the compiler in a fairly straightforward manner.
23  | | /// The associated LLVM instruction or intrinsic is documented alongside each Rust intrinsic function.
    | |______________________________________________________________________________________________________^
24  | / extern "platform-intrinsic" {
25  | |     /// add/fadd
26  | |     pub(crate) fn simd_add<T>(x: T, y: T) -> T;
27  | |
...   |
150 | |     pub(crate) fn simd_select_bitmask<M, T>(m: M, yes: T, no: T) -> T;
151 | | }
    | |_- rustdoc does not generate documentation for extern block
    |
    = note: `#[warn(unused_doc_comments)]` on by default
    = help: use `//` for a plain comment

@RalfJung
Copy link
Member Author

RalfJung commented Mar 4, 2022 via email

@workingjubilee
Copy link
Member

Eh, this way is fine!

@workingjubilee workingjubilee merged commit 4ddcc00 into rust-lang:master Mar 4, 2022
@RalfJung RalfJung deleted the doc-comment branch March 7, 2022 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants