Skip to content

Commit bcef483

Browse files
committed
Add test for rust-lang#101743
1 parent c97922d commit bcef483

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)