Skip to content

Commit 269bda4

Browse files
Update rustdoc unit tests
1 parent aa5a386 commit 269bda4

File tree

3 files changed

+168
-102
lines changed

3 files changed

+168
-102
lines changed

src/librustdoc/clean/cfg.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ use crate::html::escape::Escape;
2525
mod tests;
2626

2727
#[derive(Clone, Debug, Hash)]
28+
// Because `CfgEntry` includes `Span`, we must NEVER use `==`/`!=` operators on `Cfg` and instead
29+
// use `is_equivalent_to`.
30+
#[cfg_attr(test, derive(PartialEq))]
2831
pub(crate) struct Cfg(CfgEntry);
2932

3033
#[derive(PartialEq, Debug)]

0 commit comments

Comments
 (0)