Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/path/lower.rs')
-rw-r--r--crates/hir-def/src/path/lower.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/crates/hir-def/src/path/lower.rs b/crates/hir-def/src/path/lower.rs
index 6a15b1c085..b6a24cd4ab 100644
--- a/crates/hir-def/src/path/lower.rs
+++ b/crates/hir-def/src/path/lower.rs
@@ -1,9 +1,6 @@
//! Transforms syntax into `Path` objects, ideally with accounting for hygiene
-use crate::{
- intern::Interned,
- type_ref::{ConstScalar, ConstScalarOrPath},
-};
+use crate::{intern::Interned, type_ref::ConstScalarOrPath};
use either::Either;
use hir_expand::name::{name, AsName};
@@ -184,10 +181,7 @@ pub(super) fn lower_generic_args(
}
}
ast::GenericArg::ConstArg(arg) => {
- let arg = arg.expr().map_or(
- ConstScalarOrPath::Scalar(ConstScalar::Unknown),
- ConstScalarOrPath::from_expr,
- );
+ let arg = ConstScalarOrPath::from_expr_opt(arg.expr());
args.push(GenericArg::Const(arg))
}
}