mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
refactoring
This commit is contained in:
parent
61cabe029f
commit
e4c45427dc
6 changed files with 35 additions and 34 deletions
|
@ -63,7 +63,7 @@ use hir_ty::{
|
|||
all_super_traits, autoderef,
|
||||
consteval::{try_const_usize, unknown_const_as_generic, ConstEvalError, ConstExt},
|
||||
diagnostics::BodyValidationDiagnostic,
|
||||
known_const_to_string,
|
||||
known_const_to_ast,
|
||||
layout::{Layout as TyLayout, RustcEnumVariantIdx, TagEncoding},
|
||||
method_resolution::{self, TyFingerprint},
|
||||
mir::{self, interpret_mir},
|
||||
|
@ -3207,9 +3207,9 @@ impl ConstParam {
|
|||
Type::new(db, self.id.parent(), db.const_param_ty(self.id))
|
||||
}
|
||||
|
||||
pub fn default(self, db: &dyn HirDatabase) -> Option<String> {
|
||||
pub fn default(self, db: &dyn HirDatabase) -> Option<ast::ConstArg> {
|
||||
let arg = generic_arg_from_param(db, self.id.into())?;
|
||||
known_const_to_string(arg.constant(Interner)?, db)
|
||||
known_const_to_ast(arg.constant(Interner)?, db)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue