Skip to content

Commit

Permalink
Update rustdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jun 22, 2020
1 parent bb66d8d commit f81c663
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/librustdoc/clean/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,8 @@ pub fn print_const(cx: &DocContext<'_>, n: &'tcx ty::Const<'_>) -> String {
_ => {
let mut s = n.to_string();
// array lengths are obviously usize
if s.ends_with("usize") {
let n = s.len() - "usize".len();
if s.ends_with("_usize") {
let n = s.len() - "_usize".len();
s.truncate(n);
if s.ends_with(": ") {
let n = s.len() - ": ".len();
Expand Down
3 changes: 1 addition & 2 deletions src/test/rustdoc/const-generics/add-impl.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// ignore-tidy-linelength

#![feature(const_generics)]

#![crate_name = "foo"]

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

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

Expand Down

0 comments on commit f81c663

Please sign in to comment.