We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c951093 + cf47c15 commit db64f3aCopy full SHA for db64f3a
crates/hir-ty/src/consteval.rs
@@ -100,6 +100,7 @@ pub(crate) fn path_to_const(
100
};
101
Some(ConstData { ty, value }.intern(Interner))
102
}
103
+ Some(ValueNs::ConstId(c)) => db.const_eval(c).ok(),
104
_ => None,
105
106
crates/hir-ty/src/tests/simple.rs
@@ -3274,3 +3274,17 @@ fn func() {
3274
"#]],
3275
);
3276
3277
+
3278
+#[test]
3279
+fn issue_14275() {
3280
+ check_types(
3281
+ r#"
3282
+struct Foo<const T: bool>;
3283
+fn main() {
3284
+ const B: bool = false;
3285
+ let foo = Foo::<B>;
3286
+ //^^^ Foo<false>
3287
+}
3288
+"#,
3289
+ );
3290
0 commit comments