Skip to content

Commit f81c663

Browse files
committed
Update rustdoc
1 parent bb66d8d commit f81c663

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/librustdoc/clean/utils.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -481,8 +481,8 @@ pub fn print_const(cx: &DocContext<'_>, n: &'tcx ty::Const<'_>) -> String {
481481
_ => {
482482
let mut s = n.to_string();
483483
// array lengths are obviously usize
484-
if s.ends_with("usize") {
485-
let n = s.len() - "usize".len();
484+
if s.ends_with("_usize") {
485+
let n = s.len() - "_usize".len();
486486
s.truncate(n);
487487
if s.ends_with(": ") {
488488
let n = s.len() - ": ".len();

src/test/rustdoc/const-generics/add-impl.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// ignore-tidy-linelength
22

33
#![feature(const_generics)]
4-
54
#![crate_name = "foo"]
65

76
use std::ops::Add;
@@ -11,7 +10,7 @@ pub struct Simd<T, const WIDTH: usize> {
1110
inner: T,
1211
}
1312

14-
// @has foo/struct.Simd.html '//div[@id="trait-implementations-list"]/h3/code' 'impl Add<Simd<u8, 16usize>> for Simd<u8, 16>'
13+
// @has foo/struct.Simd.html '//div[@id="trait-implementations-list"]/h3/code' 'impl Add<Simd<u8, 16_usize>> for Simd<u8, 16>'
1514
impl Add for Simd<u8, 16> {
1615
type Output = Self;
1716

0 commit comments

Comments
 (0)