mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Make legacy_const_generics_indices thin by double boxing as its seldom used
This commit is contained in:
parent
7f884487d7
commit
0e93e6fee7
2 changed files with 9 additions and 8 deletions
|
@ -40,7 +40,7 @@ pub struct FunctionData {
|
|||
pub attrs: Attrs,
|
||||
pub visibility: RawVisibility,
|
||||
pub abi: Option<Symbol>,
|
||||
pub legacy_const_generics_indices: Box<[u32]>,
|
||||
pub legacy_const_generics_indices: Option<Box<Box<[u32]>>>,
|
||||
pub rustc_allow_incoherent_impl: bool,
|
||||
flags: FnFlags,
|
||||
}
|
||||
|
@ -91,7 +91,8 @@ impl FunctionData {
|
|||
.tt_values()
|
||||
.next()
|
||||
.map(parse_rustc_legacy_const_generics)
|
||||
.unwrap_or_default();
|
||||
.filter(|it| !it.is_empty())
|
||||
.map(Box::new);
|
||||
let rustc_allow_incoherent_impl = attrs.by_key(&sym::rustc_allow_incoherent_impl).exists();
|
||||
|
||||
Arc::new(FunctionData {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue