mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-04 11:04:03 +00:00
Add workaround for #9562
This treats the consts generated by older synstructure versions like unnamed consts. We should remove this at some point (at least after Chalk has switched).
This commit is contained in:
parent
87621de2b9
commit
b7bd45574a
@ -448,7 +448,12 @@ impl<'a> Ctx<'a> {
|
||||
}
|
||||
|
||||
fn lower_const(&mut self, konst: &ast::Const) -> FileItemTreeId<Const> {
|
||||
let name = konst.name().map(|it| it.as_name());
|
||||
let mut name = konst.name().map(|it| it.as_name());
|
||||
if name.as_ref().map_or(false, |n| n.to_string().starts_with("_DERIVE_")) {
|
||||
// FIXME: this is a hack to treat consts generated by synstructure as unnamed
|
||||
// remove this some time in the future
|
||||
name = None;
|
||||
}
|
||||
let type_ref = self.lower_type_ref_opt(konst.ty());
|
||||
let visibility = self.lower_visibility(konst);
|
||||
let ast_id = self.source_ast_id_map.ast_id(konst);
|
||||
|
Loading…
Reference in New Issue
Block a user