Skip to content

Commit

Permalink
Add regression test.
Browse files Browse the repository at this point in the history
  • Loading branch information
jseyfried committed Sep 17, 2016
1 parent 2cee9ec commit c7e4ae0
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/test/run-pass/type-macros-simple.rs
Expand Up @@ -15,3 +15,22 @@ macro_rules! Tuple {
fn main() {
let x: Tuple!(i32, i32) = (1, 2);
}

fn issue_36540() {
let i32 = 0;
macro_rules! m { () => { i32 } }
struct S<T = m!()>(m!(), T) where T: Trait<m!()>;

let x: m!() = m!();
std::cell::Cell::<m!()>::new(m!());
impl<T = m!()> std::ops::Index<m!()> for Trait<(m!(), T)>
where T: Trait<m!()>
{
type Output = m!();
fn index(&self, i: m!()) -> &m!() {
unimplemented!()
}
}
}

trait Trait<T> {}

0 comments on commit c7e4ae0

Please sign in to comment.