Skip to content

Commit 152ccb5

Browse files
topecongirocalebcartwright
authored andcommitted
Do not duplicate const keyword on parameters
1 parent c0fede3 commit 152ccb5

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

Diff for: tests/source/const_generics.rs

+8
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,11 @@ type Foo<const N: usize> = [i32; N + 1];
3434
pub trait Foo: Bar<{Baz::COUNT}> {
3535
const ASD: usize;
3636
}
37+
38+
// #4263
39+
fn const_generics_on_params<
40+
// AAAA
41+
const BBBB: usize,
42+
/* CCCC */
43+
const DDDD: usize,
44+
>() {}

Diff for: tests/target/const_generics.rs

+9
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,12 @@ type Foo<const N: usize> = [i32; N + 1];
2626
pub trait Foo: Bar<{ Baz::COUNT }> {
2727
const ASD: usize;
2828
}
29+
30+
// #4263
31+
fn const_generics_on_params<
32+
// AAAA
33+
const BBBB: usize,
34+
/* CCCC */
35+
const DDDD: usize,
36+
>() {
37+
}

0 commit comments

Comments
 (0)