提交 0204ca17 编写于 作者: P P1start

Fix rustdoc's formatting of lifetimes

rustdoc was previously formatting lifetimes with two apostrophes, presumably
as a result of #14797.
上级 6d8342f5
......@@ -617,7 +617,7 @@ fn clean(&self) -> Lifetime {
impl Clean<Option<Lifetime>> for ty::Region {
fn clean(&self) -> Option<Lifetime> {
match *self {
ty::ReStatic => Some(Lifetime("static".to_string())),
ty::ReStatic => Some(Lifetime("'static".to_string())),
ty::ReLateBound(_, ty::BrNamed(_, name)) =>
Some(Lifetime(token::get_name(name).get().to_string())),
ty::ReEarlyBound(_, _, _, name) => Some(Lifetime(name.clean())),
......
......@@ -91,7 +91,6 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
impl fmt::Show for clean::Lifetime {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
try!(f.write("'".as_bytes()));
try!(f.write(self.get_ref().as_bytes()));
Ok(())
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册