Skip to content

Commit 1715cf1

Browse files
Fix rustdoc after changing type param representation.
1 parent 45b537d commit 1715cf1

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
@@ -260,7 +260,9 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> {
260260
P(hir::Path {
261261
span: DUMMY_SP,
262262
def: Def::TyParam(param.def_id),
263-
segments: HirVec::from_vec(vec![hir::PathSegment::from_name(param.name)]),
263+
segments: HirVec::from_vec(vec![
264+
hir::PathSegment::from_name(Symbol::intern(&param.name))
265+
]),
264266
}),
265267
)),
266268
span: DUMMY_SP,

src/librustdoc/clean/mod.rs

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

3333
use rustc::middle::const_val::ConstVal;
@@ -3374,6 +3374,12 @@ impl Clean<String> for ast::Name {
33743374
}
33753375
}
33763376

3377+
impl Clean<String> for InternedString {
3378+
fn clean(&self, _: &DocContext) -> String {
3379+
self.to_string()
3380+
}
3381+
}
3382+
33773383
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
33783384
pub struct Typedef {
33793385
pub type_: Type,

0 commit comments

Comments
 (0)