diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-06-09 12:04:03 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-09 12:04:03 +0900 |
| commit | 606feba5bbfa61ef9562fd2f583833ed5c13ffdc (patch) | |
| tree | e88bf1670e03fe13197c73408a9a523897d4a3b6 /src/test/rustdoc | |
| parent | 3bc822155807e3915a5455f8d08a06d0a8698086 (diff) | |
| parent | f7117f8c177c63d6aadfb569550839b4add617a9 (diff) | |
| download | rust-606feba5bbfa61ef9562fd2f583833ed5c13ffdc.tar.gz rust-606feba5bbfa61ef9562fd2f583833ed5c13ffdc.zip | |
Rollup merge of #85957 - BoxyUwU:rustdoc-const-generic-defaults, r=oli-obk
Display defaults on const params- rustdoc previously rustdoc would render this struct declaration: `pub struct Foo<const N: usize = 10>;` as: `pub struct Foo<const N: usize>;` this PR changes it to render correctly
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/const-generics/const-generic-defaults.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/rustdoc/const-generics/const-generic-defaults.rs b/src/test/rustdoc/const-generics/const-generic-defaults.rs new file mode 100644 index 00000000000..efe35bf7aa4 --- /dev/null +++ b/src/test/rustdoc/const-generics/const-generic-defaults.rs @@ -0,0 +1,6 @@ +#![crate_name = "foo"] +#![feature(const_generics_defaults)] + +// @has foo/struct.Foo.html '//pre[@class="rust struct"]' \ +// 'pub struct Foo<const M: usize = 10_usize, const N: usize = M, T = i32>(_);' +pub struct Foo<const M: usize = 10, const N: usize = M, T = i32>(T); |
