Skip to content

Commit 103eb00

Browse files
Fix rustdoc after changing type param representation.
1 parent 7286ab2 commit 103eb00

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/librustdoc/clean/auto_trait.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,9 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> {
259259
P(hir::Path {
260260
span: DUMMY_SP,
261261
def: Def::TyParam(param.def_id),
262-
segments: HirVec::from_vec(vec![hir::PathSegment::from_name(param.name)]),
262+
segments: HirVec::from_vec(vec![
263+
hir::PathSegment::from_name(Symbol::intern(&param.name))
264+
]),
263265
}),
264266
)),
265267
span: DUMMY_SP,

src/librustdoc/clean/mod.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use syntax::codemap::Spanned;
2626
use syntax::feature_gate::UnstableFeatures;
2727
use syntax::ptr::P;
2828
use syntax::symbol::keywords;
29-
use syntax::symbol::Symbol;
29+
use syntax::symbol::{Symbol, InternedString};
3030
use syntax_pos::{self, DUMMY_SP, Pos, FileName};
3131

3232
use rustc::middle::const_val::ConstVal;
@@ -3199,6 +3199,12 @@ impl Clean<String> for ast::Name {
31993199
}
32003200
}
32013201

3202+
impl Clean<String> for InternedString {
3203+
fn clean(&self, _: &DocContext) -> String {
3204+
self.to_string()
3205+
}
3206+
}
3207+
32023208
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
32033209
pub struct Typedef {
32043210
pub type_: Type,

0 commit comments

Comments
 (0)