forked from rust-lang/rustfmt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e7fa070
commit 0b21ea2
Showing
3 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#![feature(const_generics_defaults)] | ||
struct Foo<const N: usize = 1, const N2: usize = 2>; | ||
struct Bar<const N: usize, const N2: usize = { N + | ||
1 }>; | ||
struct Lots<const N1BlahFooUwU: usize = { 10 + 28 + 1872 / 10 * 3 },const N2SecondParamOhmyyy: usize = { N1BlahFooUwU / 2 + 10 * 2 },>; | ||
struct NamesRHard<const N: usize = { 1 + 1 + 1 + 1 + 1 + 1 }>; | ||
struct FooBar< | ||
const LessThan100ButClose: usize = {1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1} | ||
>; | ||
struct FooBarrrrrrrr<const N: usize = {13478234326456456444323871+ 1+ 1+ 1+ 1+ 1+ 1+ 1+ 1+ 1+ 1+ 1+ 1+ 1+1+1+1 + 1},>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#![feature(const_generics_defaults)] | ||
struct Foo<const N: usize = 1, const N2: usize = 2>; | ||
struct Bar<const N: usize, const N2: usize = { N + 1 }>; | ||
struct Lots< | ||
const N1BlahFooUwU: usize = { 10 + 28 + 1872 / 10 * 3 }, | ||
const N2SecondParamOhmyyy: usize = { N1BlahFooUwU / 2 + 10 * 2 }, | ||
>; | ||
struct NamesRHard<const N: usize = { 1 + 1 + 1 + 1 + 1 + 1 }>; | ||
struct FooBar< | ||
const LessThan100ButClose: usize = { | ||
1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 | ||
}, | ||
>; | ||
struct FooBarrrrrrrr< | ||
const N: usize = { | ||
13478234326456456444323871 | ||
+ 1 | ||
+ 1 | ||
+ 1 | ||
+ 1 | ||
+ 1 | ||
+ 1 | ||
+ 1 | ||
+ 1 | ||
+ 1 | ||
+ 1 | ||
+ 1 | ||
+ 1 | ||
+ 1 | ||
+ 1 | ||
+ 1 | ||
+ 1 | ||
+ 1 | ||
}, | ||
>; |