Closed Bug 1537576 Opened 7 years ago Closed 7 years ago

--enable-warnings-as-errors fails due to -D unused-doc-comments

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: glandium, Assigned: emilio)

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1536045 +++

After bug 1513009 and https://github.com/rust-lang/rust/pull/57882 the following happens.

$ rustc -vV
rustc 1.35.0-nightly
binary: rustc
commit-hash: e68bf8ae15ee
commit-date: 2019-03-11
host: x86_64-unknown-freebsd
release: 1.35.0-nightly
LLVM version: 8.0

$ echo "ac_add_options --enable-warnings-as-errors # mimic MOZ_AUTOMATION" >>.mozconfig
$ ./mach build
[...]
error: unused doc comment
  --> servo/components/style/bloom.rs:17:1
   |
17 | / /// Bloom filters are large allocations, so we store them in thread-local storage
18 | | /// such that they can be reused across style traversals. StyleBloom is responsible
19 | | /// for ensuring that the bloom filter is zeroed when it is dropped.
   | |____________________________________________________________________^
20 | / thread_local!(static BLOOM_KEY: Arc<AtomicRefCell<BloomFilter>> =
21 | |               Arc::new(AtomicRefCell::new(BloomFilter::new())));
   | |________________________________________________________________- rustdoc does not generate documentation for macro expansions
   |
   = note: `-D unused-doc-comments` implied by `-D warnings`
   = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion
error: unused doc comment
   --> servo/components/style/font_face.rs:548:1
    |
548 |   /// css-name rust_identifier: Type,
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
549 |   #[cfg(feature = "gecko")]
550 | / font_face_descriptors! {
551 | |     mandatory descriptors = [
552 | |         /// The name of this font face
553 | |         "font-family" family / mFamily: FamilyName,
...   |
582 | |     ]
583 | | }
    | |_- rustdoc does not generate documentation for macro expansions
    |
    = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion
error: unused doc comment
  --> servo/components/style/stylist.rs:63:1
   |
63 |   /// A cache of computed user-agent data, to be shared across documents.
   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64 | / lazy_static! {
65 | |     static ref UA_CASCADE_DATA_CACHE: Mutex<UserAgentCascadeDataCache> =
66 | |         Mutex::new(UserAgentCascadeDataCache::new());
67 | | }
   | |_- rustdoc does not generate documentation for macro expansions
   |
   = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion
error: unused doc comment
   --> servo/components/style/gecko/media_features.rs:372:1
    |
372 |   /// https://drafts.csswg.org/mediaqueries-4/#mf-interaction
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
373 | / bitflags! {
374 | |     struct PointerCapabilities: u8 {
375 | |         const COARSE = structs::PointerCapabilities_Coarse;
376 | |         const FINE = structs::PointerCapabilities_Fine;
377 | |         const HOVER = structs::PointerCapabilities_Hover;
378 | |     }
379 | | }
    | |_- rustdoc does not generate documentation for macro expansions
    |
    = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion
error: aborting due to 4 previous errors
error: Could not compile `style`.

Had a patch for this locally already :)

Assignee: nobody → emilio
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a3b448c3db0f fix some rust-nightly warnings about unused doc comments. r=boris
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: