Auto merge of #17973 - Veykril:proc-macro-curr-dir, r=Veykril

Expand proc-macros in workspace root, not package root

Should fix https://github.com/rust-lang/rust-analyzer/issues/17748. The approach is generally not perfect though as rust-project.json projects don't benefit from this (still, nothing changes in that regard)
This commit is contained in:
bors 2024-08-27 11:53:04 +00:00
commit 06a40a61b0
7 changed files with 34 additions and 14 deletions

View file

@ -34,7 +34,7 @@ use rustc_apfloat::{
};
use smallvec::SmallVec;
use span::Edition;
use stdx::{never, IsNoneOr};
use stdx::never;
use triomphe::Arc;
use crate::{
@ -1479,12 +1479,14 @@ fn generic_args_sans_defaults<'ga>(
}
// otherwise, if the arg is equal to the param default, hide it (unless the
// default is an error which can happen for the trait Self type)
#[allow(unstable_name_collisions)]
default_parameters.get(i).is_none_or(|default_parameter| {
// !is_err(default_parameter.skip_binders())
// &&
arg != &default_parameter.clone().substitute(Interner, &parameters)
})
match default_parameters.get(i) {
None => true,
Some(default_parameter) => {
// !is_err(default_parameter.skip_binders())
// &&
arg != &default_parameter.clone().substitute(Interner, &parameters)
}
}
};
let mut default_from = 0;
for (i, parameter) in parameters.iter().enumerate() {