rust/tests/ui/doc/doc_include_without_cfg.stderr
2024-11-28 19:38:59 +01:00

17 lines
831 B
Text

error: included a file in documentation unconditionally
--> tests/ui/doc/doc_include_without_cfg.rs:4:1
|
LL | #![doc = include_str!("../approx_const.rs")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `cfg_attr(doc, doc = "...")`: `#![cfg_attr(doc, doc = include_str!("../approx_const.rs"))]`
|
= note: `-D clippy::doc-include-without-cfg` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::doc_include_without_cfg)]`
error: included a file in documentation unconditionally
--> tests/ui/doc/doc_include_without_cfg.rs:31:1
|
LL | #[doc = include_str!("../approx_const.rs")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `cfg_attr(doc, doc = "...")`: `#[cfg_attr(doc, doc = include_str!("../approx_const.rs"))]`
error: aborting due to 2 previous errors