Skip to content

Fix rustdoc's formatting of lifetimes #14906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2014
Merged

Conversation

ftxqxd
Copy link
Contributor

@ftxqxd ftxqxd commented Jun 15, 2014

rustdoc was previously formatting lifetimes with two apostrophes, presumably as a result of #14797.

@@ -91,7 +91,9 @@ 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()));
if self.get_ref() == "static" {
Copy link
Member

Choose a reason for hiding this comment

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

Hm, I thought static lifetimes should be stored as a literal string 'static (i.e. with the '). This possibly indicates a deeper bug.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Nice catch! That does look like the problem.

Copy link
Member

Choose a reason for hiding this comment

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

(of course, the link I just posted may not be a bug at all, but rather just a different choice of representation invariant that leads to the use of "static" above rather than "'static". I assume rustdoc would not have the same hygiene issues that rustc has.)

rustdoc was previously formatting lifetimes with two apostrophes, presumably
as a result of rust-lang#14797.
bors added a commit that referenced this pull request Jun 16, 2014
rustdoc was previously formatting lifetimes with two apostrophes, presumably as a result of #14797.
@bors bors closed this Jun 16, 2014
@bors bors merged commit 0204ca1 into rust-lang:master Jun 16, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 5, 2023
…-disable-explorer, r=Veykril

fix: add a toggle to disable the dependency explorer

For common uses of non-Cargo build systems with rust-analyzer, the dependency view isn't particularly helpful because there isn't a Cargo.toml present for dependencies or the dependencies are part of the current workspace.

Speaking from the perspective of a user of `rust-project.json`, I'd prefer to have this feature disabled until I can add a field to `Crate` that defines the location of a build file (e.g., a `BUCK`) file, which would allow for removing the "search for a Cargo.toml in parent directories of a crate root" behavior that exists in a few places (I've opened [an issue](rust-lang/cargo#12187) on Cargo to request this data from `cargo-metadata`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants