diff options
| author | David Tolnay <dtolnay@gmail.com> | 2024-12-14 14:45:30 -0800 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2024-12-19 10:48:01 -0800 |
| commit | 6bdfd12ee9f09c48e7ec00403d5be10d3b7b6b2c (patch) | |
| tree | 8165bb0d05c47c75b5a0b5d4a3724378dbd33ce8 /tests/rustdoc | |
| parent | da89d10264d641a67c506f6c85c77d876613c06f (diff) | |
| download | rust-6bdfd12ee9f09c48e7ec00403d5be10d3b7b6b2c.tar.gz rust-6bdfd12ee9f09c48e7ec00403d5be10d3b7b6b2c.zip | |
Suppress `= _` on associated constants in impls
Diffstat (limited to 'tests/rustdoc')
| -rw-r--r-- | tests/rustdoc/assoc-consts-underscore.rs | 9 | ||||
| -rw-r--r-- | tests/rustdoc/bold-tag-101743.rs | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/tests/rustdoc/assoc-consts-underscore.rs b/tests/rustdoc/assoc-consts-underscore.rs index 9bb44f0a03c..f48098094db 100644 --- a/tests/rustdoc/assoc-consts-underscore.rs +++ b/tests/rustdoc/assoc-consts-underscore.rs @@ -14,14 +14,17 @@ pub trait Trait { } impl Trait for Struct { - //@ has assoc_consts_underscore/struct.Struct.html '//*[@id="associatedconstant.REQUIRED"]' \ + //@ !has assoc_consts_underscore/struct.Struct.html '//*[@id="associatedconstant.REQUIRED"]' \ // 'const REQUIRED: Struct = _' + //@ has - '//*[@id="associatedconstant.REQUIRED"]' 'const REQUIRED: Struct' const REQUIRED: Struct = Struct { _private: () }; - //@ has - '//*[@id="associatedconstant.OPTIONAL"]' 'const OPTIONAL: Struct = _' + //@ !has - '//*[@id="associatedconstant.OPTIONAL"]' 'const OPTIONAL: Struct = _' + //@ has - '//*[@id="associatedconstant.OPTIONAL"]' 'const OPTIONAL: Struct' const OPTIONAL: Struct = Struct { _private: () }; } impl Struct { - //@ has - '//*[@id="associatedconstant.INHERENT"]' 'const INHERENT: Struct = _' + //@ !has - '//*[@id="associatedconstant.INHERENT"]' 'const INHERENT: Struct = _' + //@ has - '//*[@id="associatedconstant.INHERENT"]' 'const INHERENT: Struct' pub const INHERENT: Struct = Struct { _private: () }; } diff --git a/tests/rustdoc/bold-tag-101743.rs b/tests/rustdoc/bold-tag-101743.rs index a81767eeeeb..3cd4005a4fa 100644 --- a/tests/rustdoc/bold-tag-101743.rs +++ b/tests/rustdoc/bold-tag-101743.rs @@ -14,6 +14,6 @@ impl<const B: Word> Repr<B> { // If we change back to rendering the value of consts, check this doesn't add // a <b> tag, but escapes correctly - //@ has foo/struct.Repr.html '//section[@id="associatedconstant.BASE"]/h4' '= _' + //@ !has foo/struct.Repr.html '//section[@id="associatedconstant.BASE"]/h4' '=' pub const BASE: IBig = base_as_ibig::<B>(); } |
