mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-10 12:18:49 +00:00
Auto merge of #120187 - Nadrieril:rollup-xfwrb0c, r=Nadrieril
Rollup of 8 pull requests Successful merges: - #116090 (Implement strict integer operations that panic on overflow) - #118811 (Use `bool` instead of `PartiolOrd` as return value of the comparison closure in `{slice,Iteraotr}::is_sorted_by`) - #119081 (Add Ipv6Addr::is_ipv4_mapped) - #119461 (Use an interpreter in MIR jump threading) - #119996 (Move OS String implementation into `sys`) - #120015 (coverage: Format all coverage tests with `rustfmt`) - #120027 (pattern_analysis: Remove `Ty: Copy` bound) - #120084 (fix(rust-analyzer): use new pkgid spec to compare) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
b5ced3120b
1 changed files with 14 additions and 2 deletions
|
@ -92,12 +92,24 @@ fn main() {
|
|||
panic!("proc-macro-test-impl failed to build");
|
||||
}
|
||||
|
||||
// Old Package ID Spec
|
||||
let repr = format!("{name} {version}");
|
||||
// New Package Id Spec since rust-lang/cargo#13311
|
||||
let pkgid = String::from_utf8(
|
||||
Command::new(toolchain::cargo())
|
||||
.current_dir(&staging_dir)
|
||||
.args(["pkgid", name])
|
||||
.output()
|
||||
.unwrap().stdout,
|
||||
)
|
||||
.unwrap();
|
||||
let pkgid = pkgid.trim();
|
||||
|
||||
let mut artifact_path = None;
|
||||
for message in Message::parse_stream(output.stdout.as_slice()) {
|
||||
if let Message::CompilerArtifact(artifact) = message.unwrap() {
|
||||
if artifact.target.kind.contains(&"proc-macro".to_string()) {
|
||||
let repr = format!("{name} {version}");
|
||||
if artifact.package_id.repr.starts_with(&repr) {
|
||||
if artifact.package_id.repr.starts_with(&repr) || artifact.package_id.repr == pkgid {
|
||||
artifact_path = Some(PathBuf::from(&artifact.filenames[0]));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue