Files
vectorcraft/xtask
dotCooCoo 4e2581f63d Doc tests: treat cfg_attr lints by what they could do, and skip raw C strings
The check did not read lint attributes inside cfg_attr at all, and it
does not evaluate cfg conditions. Two roots passed although the
condition all() is always true:

- #![cfg_attr(all(), forbid(unsafe_code))] with doc-test deny: the
  library forbids unsafe code, so its doc tests need forbid.
- #![doc(test(attr(deny(unsafe_code), cfg_attr(all(), allow(unsafe_code)))))]:
  the allow lowers the deny.

A cfg_attr now counts only in the direction that is never too lenient:
a forbid inside one asks the doc tests for forbid, and an allow, warn
or expect inside one lowers the doc tests' level. A deny or forbid
inside cfg_attr in the doc-test list still does not count.

The comment and literal scanner also skips raw C strings (cr"..."), so
text such as #![forbid(unsafe_code)] inside one is not read as an
attribute. Tests cover each case.
2026-12-03 21:17:30 -08:00
..