We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2cee9ec commit c7e4ae0Copy full SHA for c7e4ae0
src/test/run-pass/type-macros-simple.rs
@@ -15,3 +15,22 @@ macro_rules! Tuple {
15
fn main() {
16
let x: Tuple!(i32, i32) = (1, 2);
17
}
18
+
19
+fn issue_36540() {
20
+ let i32 = 0;
21
+ macro_rules! m { () => { i32 } }
22
+ struct S<T = m!()>(m!(), T) where T: Trait<m!()>;
23
24
+ let x: m!() = m!();
25
+ std::cell::Cell::<m!()>::new(m!());
26
+ impl<T = m!()> std::ops::Index<m!()> for Trait<(m!(), T)>
27
+ where T: Trait<m!()>
28
+ {
29
+ type Output = m!();
30
+ fn index(&self, i: m!()) -> &m!() {
31
+ unimplemented!()
32
+ }
33
34
+}
35
36
+trait Trait<T> {}
0 commit comments