mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Use ConstArg
instead of Expr
for AstId
of InTypeConstId
This commit is contained in:
parent
d9136df9e5
commit
f8594f78bb
13 changed files with 29 additions and 28 deletions
|
@ -537,11 +537,11 @@ impl Clone for Box<dyn OpaqueInternableThing> {
|
|||
|
||||
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
|
||||
pub struct InTypeConstId(InternId);
|
||||
type InTypeConstLoc = (AstId<ast::Expr>, TypeOwnerId, Box<dyn OpaqueInternableThing>);
|
||||
type InTypeConstLoc = (AstId<ast::ConstArg>, TypeOwnerId, Box<dyn OpaqueInternableThing>);
|
||||
impl_intern!(InTypeConstId, InTypeConstLoc, intern_in_type_const, lookup_intern_in_type_const);
|
||||
|
||||
impl InTypeConstId {
|
||||
pub fn source(&self, db: &dyn db::DefDatabase) -> ast::Expr {
|
||||
pub fn source(&self, db: &dyn db::DefDatabase) -> ast::ConstArg {
|
||||
let src = self.lookup(db).0;
|
||||
let file_id = src.file_id;
|
||||
let root = &db.parse_or_expand(file_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue