Skip to content

Commit 384fee9

Browse files
authored
Rollup merge of rust-lang#101828 - aDotInTheVoid:test-101743, r=jsha
Add test for rust-lang#101743 The issue was closes as we stopped rendering `const`s like this, but if we move back to doing that, make sure we don't accidently generate tags
2 parents f62dd52 + bcef483 commit 384fee9

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Regression test for https://github.com/rust-lang/rust/issues/101743
2+
3+
#![crate_name="foo"]
4+
5+
pub type Word = usize;
6+
pub struct Repr<const B: usize>([i32; B]);
7+
pub struct IBig(usize);
8+
9+
pub const fn base_as_ibig<const B: Word>() -> IBig {
10+
IBig(B)
11+
}
12+
13+
impl<const B: Word> Repr<B> {
14+
// If we change back to rendering the value of consts, check this doesn't add
15+
// a <b> tag, but escapes correctly
16+
17+
// @has foo/struct.Repr.html '//section[@id="associatedconstant.BASE"]/h4' '= _'
18+
pub const BASE: IBig = base_as_ibig::<B>();
19+
}

0 commit comments

Comments
 (0)