File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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+ }
Original file line number Diff line number Diff line change @@ -3277,13 +3277,14 @@ fn func() {
32773277
32783278#[ test]
32793279fn issue_14275 ( ) {
3280+ // FIXME: evaluate const generic
32803281 check_types (
32813282 r#"
32823283struct Foo<const T: bool>;
32833284fn main() {
32843285 const B: bool = false;
32853286 let foo = Foo::<B>;
3286- //^^^ Foo<false >
3287+ //^^^ Foo<_ >
32873288}
32883289"# ,
32893290 ) ;
You can’t perform that action at this time.
0 commit comments