We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25f6938 commit d76cdb0Copy full SHA for d76cdb0
src/test/ui/const-generics/const-param-hygiene.rs
@@ -0,0 +1,22 @@
1
+// run-pass
2
+// revisions: full min
3
+
4
+#![cfg_attr(full, feature(const_generics))]
5
+#![cfg_attr(full, allow(incomplete_features))]
6
+#![cfg_attr(min, feature(min_const_generics))]
7
8
+macro_rules! bar {
9
+ ($($t:tt)*) => { impl<const N: usize> $($t)* };
10
+}
11
12
+macro_rules! baz {
13
+ ($t:tt) => { fn test<const M: usize>(&self) -> usize { $t } };
14
15
16
+struct Foo<const N: usize>;
17
18
+bar!(Foo<N> { baz!{ M } });
19
20
+fn main() {
21
+ assert_eq!(Foo::<7>.test::<3>(), 3);
22
0 commit comments