From 152ccb505958ec0e7f60204d786cc126bc571121 Mon Sep 17 00:00:00 2001 From: topecongiro Date: Tue, 30 Jun 2020 18:19:13 +0900 Subject: [PATCH] Do not duplicate const keyword on parameters --- tests/source/const_generics.rs | 8 ++++++++ tests/target/const_generics.rs | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/tests/source/const_generics.rs b/tests/source/const_generics.rs index 07ef99107a805..01b764dbe45df 100644 --- a/tests/source/const_generics.rs +++ b/tests/source/const_generics.rs @@ -34,3 +34,11 @@ type Foo = [i32; N + 1]; pub trait Foo: Bar<{Baz::COUNT}> { const ASD: usize; } + +// #4263 +fn const_generics_on_params< + // AAAA + const BBBB: usize, + /* CCCC */ + const DDDD: usize, + >() {} diff --git a/tests/target/const_generics.rs b/tests/target/const_generics.rs index f49c5a1bb104b..b30b7b58c12b9 100644 --- a/tests/target/const_generics.rs +++ b/tests/target/const_generics.rs @@ -26,3 +26,12 @@ type Foo = [i32; N + 1]; pub trait Foo: Bar<{ Baz::COUNT }> { const ASD: usize; } + +// #4263 +fn const_generics_on_params< + // AAAA + const BBBB: usize, + /* CCCC */ + const DDDD: usize, +>() { +}