Skip to content

Commit

Permalink
Fix rustdoc's formatting of lifetimes
Browse files Browse the repository at this point in the history
rustdoc was previously formatting lifetimes with two apostrophes, presumably
as a result of #14797.
  • Loading branch information
ftxqxd committed Jun 16, 2014
1 parent 6d8342f commit 0204ca1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ impl Clean<Lifetime> for ty::RegionParameterDef {
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())),
Expand Down
1 change: 0 additions & 1 deletion src/librustdoc/html/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ impl fmt::Show for clean::Generics {

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(())
}
Expand Down

5 comments on commit 0204ca1

@bors
Copy link
Contributor

@bors bors commented on 0204ca1 Jun 16, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from huonw
at ftxqxd@0204ca1

@bors
Copy link
Contributor

@bors bors commented on 0204ca1 Jun 16, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging P1start/rust/rustdoc-lifetimes = 0204ca1 into auto

@bors
Copy link
Contributor

@bors bors commented on 0204ca1 Jun 16, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1start/rust/rustdoc-lifetimes = 0204ca1 merged ok, testing candidate = 5abf794

@bors
Copy link
Contributor

@bors bors commented on 0204ca1 Jun 16, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 5abf794

Please sign in to comment.