Open
Description
On ICU4X main, with nightly, cargo doc --all-features
in provider/core
error: redundant explicit link target
--> provider/core/src/constructors.rs:106:47
|
106 | "provided by a [`BufferProvider`](icu_provider::buf::BufferProvider).\n\n",
| ---------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ explicit target is redundant
| |
| because label contains path that resolves to same destination
|
::: provider/core/src/hello_world.rs:302:5
|
302 | / icu_provider::gen_buffer_data_constructors!((prefs: HelloWorldFormatterPreferences) -> error: DataError,
303 | | functions: [
304 | | try_new: skip,
305 | | try_new_with_buffer_provider,
306 | | try_new_unstable,
307 | | Self,
308 | | ]);
| |______- in this macro invocation
|
= note: when a link's destination is not specified,
the label is used to resolve intra-doc links
= note: `-D rustdoc::redundant-explicit-links` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(rustdoc::redundant_explicit_links)]`
= note: this error originates in the macro `$crate::gen_buffer_data_constructors` which comes from the expansion of the macro `icu_provider::gen_buffer_data_constructors` (in Nightly builds, run with -Z macro-backtrace for more info)
These docs are macro-generated, which means even if that import is around in some contexts, it isn't around in all of them, and we can't fix that in the macro.
Given that they are macro generated docs, it is not possible to stick an allow()
statement in the macro to silence the lint (without enabling attributes-on-expressions). So this code is permabroken.
This lint should probably get a macro guard, or even be reverted until this can be figured out: the lint is mostly a cleanup lint and should not cause such problems.