-
Notifications
You must be signed in to change notification settings - Fork 279
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
Conversation
Thanks!
Since it is not very difficult to try both of pathes, I'll add some fallbacks for macros and premitives later. |
Just tested this on Windows and the first run seem to have failed but other subsequent |
@@ -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"; |
There was a problem hiding this comment.
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.
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...