Reduced the size of LintExpectationId
by 12 bytes (RFC-2383)
This commit is contained in:
parent
43dc430f52
commit
a14456f91f
2 changed files with 12 additions and 7 deletions
|
@ -312,7 +312,7 @@ impl<'s> LintLevelsBuilder<'s> {
|
|||
for (lint_index, li) in metas.iter_mut().enumerate() {
|
||||
let level = match level {
|
||||
Level::Expect(mut id) => {
|
||||
id.set_lint_index(Some(lint_index));
|
||||
id.set_lint_index(Some(lint_index as u16));
|
||||
Level::Expect(id)
|
||||
}
|
||||
level => level,
|
||||
|
@ -601,7 +601,8 @@ impl<'s> LintLevelsBuilder<'s> {
|
|||
hir_id: HirId,
|
||||
attr_index: usize,
|
||||
) -> LintExpectationId {
|
||||
let stable_id = LintExpectationId::Stable { hir_id, attr_index, lint_index: None };
|
||||
let stable_id =
|
||||
LintExpectationId::Stable { hir_id, attr_index: attr_index as u16, lint_index: None };
|
||||
|
||||
self.expectation_id_map.insert(unstable_id, stable_id);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue