Skip to content

Commit 71e1c02

Browse files
committed
1 parent 14b9d18 commit 71e1c02

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

crates/hir-ty/src/consteval.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ pub(crate) fn path_to_const(
100100
};
101101
Some(ConstData { ty, value }.intern(Interner))
102102
}
103-
Some(ValueNs::ConstId(c)) => db.const_eval(c).ok(),
104103
_ => None,
105104
}
106105
}

crates/hir-ty/src/tests/regression.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,3 +1744,15 @@ fn foo(b: Bar) {
17441744
"#,
17451745
);
17461746
}
1747+
1748+
#[test]
1749+
fn regression_14305() {
1750+
check_no_mismatches(
1751+
r#"
1752+
//- minicore: add
1753+
trait Tr {}
1754+
impl Tr for [u8; C] {}
1755+
const C: usize = 2 + 2;
1756+
"#,
1757+
);
1758+
}

crates/hir-ty/src/tests/simple.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3277,13 +3277,14 @@ fn func() {
32773277

32783278
#[test]
32793279
fn issue_14275() {
3280+
// FIXME: evaluate const generic
32803281
check_types(
32813282
r#"
32823283
struct Foo<const T: bool>;
32833284
fn main() {
32843285
const B: bool = false;
32853286
let foo = Foo::<B>;
3286-
//^^^ Foo<false>
3287+
//^^^ Foo<_>
32873288
}
32883289
"#,
32893290
);

0 commit comments

Comments
 (0)