Encode one level of cfg_attr in attr_id

This commit is contained in:
Lukas Wirth 2023-01-09 20:47:51 +01:00
parent 68723043db
commit 621e96bd6a
11 changed files with 99 additions and 52 deletions

View file

@ -546,7 +546,7 @@ impl AttrSourceMap {
}
fn source_of_id(&self, id: AttrId) -> InFile<&Either<ast::Attr, ast::Comment>> {
let ast_idx = id.ast_index as usize;
let ast_idx = id.ast_index();
let file_id = match self.mod_def_site_file_id {
Some((file_id, def_site_cut)) if def_site_cut <= ast_idx => file_id,
_ => self.file_id,