Skip to content
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

Adapt to the new standard library directory layout #1130

Merged
merged 2 commits into from
Sep 4, 2020

Conversation

Xanewok
Copy link
Collaborator

@Xanewok Xanewok commented Sep 3, 2020

Refs: rust-lang/rust#73265

@kngwyu Does that look acceptable? I'm somewhat torn where should I add a new fallback and where I should just straight up replace the old path logic. I think it makes sense to wholly replace it since Racer is tied to the version of Rust that distributes the rustc-ap-* library set it depends on but I'm not sure how much we'd like to maintain backwards-compat for older Rust toolchains...

@kngwyu
Copy link
Collaborator

kngwyu commented Sep 4, 2020

Thanks!

but I'm not sure how much we'd like to maintain backwards-compat for older Rust toolchains...

Since it is not very difficult to try both of pathes, I'll add some fallbacks for macros and premitives later.

@kngwyu kngwyu merged commit bc47875 into racer-rust:master Sep 4, 2020
@Xanewok Xanewok deleted the new-std branch September 4, 2020 08:24
@Xanewok
Copy link
Collaborator Author

Xanewok commented Sep 4, 2020

Just tested this on Windows and the first run seem to have failed but other subsequent cargo test runs succeed. Tried with and without RUST_SRC_PATH set both in Powershell and in mingw-w64. Maybe it's due to stale build cache?

@@ -4,8 +4,8 @@ use crate::nameres::{self, RUST_SRC_PATH};
use rustc_ast::ast::{IntTy, LitIntType, UintTy};
use std::path::PathBuf;

const PRIM_DOC: &str = "libstd/primitive_docs.rs";
Copy link

Choose a reason for hiding this comment

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

Changing this to the new directory layout without also checking for the old layout will cause panics on any system that still has the old directory layout.

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.

3 participants