mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Use Cast::cast()
instead of interning GenericArgData
This commit is contained in:
parent
783130bd26
commit
6aa03c5d15
7 changed files with 45 additions and 73 deletions
|
@ -1,7 +1,7 @@
|
|||
//! Constant evaluation details
|
||||
|
||||
use base_db::CrateId;
|
||||
use chalk_ir::{BoundVar, DebruijnIndex, GenericArgData};
|
||||
use chalk_ir::{cast::Cast, BoundVar, DebruijnIndex};
|
||||
use hir_def::{
|
||||
hir::Expr,
|
||||
path::Path,
|
||||
|
@ -120,7 +120,7 @@ pub fn unknown_const(ty: Ty) -> Const {
|
|||
}
|
||||
|
||||
pub fn unknown_const_as_generic(ty: Ty) -> GenericArg {
|
||||
GenericArgData::Const(unknown_const(ty)).intern(Interner)
|
||||
unknown_const(ty).cast(Interner)
|
||||
}
|
||||
|
||||
/// Interns a constant scalar with the given type
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue