{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/32657","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/32657/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/32657/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/32657/events","html_url":"https://github.com/rust-lang/rust/issues/32657","id":145010257,"number":32657,"title":"Macros which pass around types won't compile.","user":{"login":"calebmer","id":8282507,"avatar_url":"https://avatars.githubusercontent.com/u/8282507?v=3","gravatar_id":"","url":"https://api.github.com/users/calebmer","html_url":"https://github.com/calebmer","followers_url":"https://api.github.com/users/calebmer/followers","following_url":"https://api.github.com/users/calebmer/following{/other_user}","gists_url":"https://api.github.com/users/calebmer/gists{/gist_id}","starred_url":"https://api.github.com/users/calebmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calebmer/subscriptions","organizations_url":"https://api.github.com/users/calebmer/orgs","repos_url":"https://api.github.com/users/calebmer/repos","events_url":"https://api.github.com/users/calebmer/events{/privacy}","received_events_url":"https://api.github.com/users/calebmer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-31T20:34:30Z","updated_at":"2016-03-31T20:57:30Z","closed_at":null,"body":"I have a trait for my tests, `Context`, which has a static method `get_fixtures` that returns an associated type. When I try to pass implementors of `Context` into my macro and try call static methods, it fails with a syntax error. See the pen below for an exact error.\r\n\r\n[Here is](https://play.rust-lang.org/?gist=17a3e311cba498c1b7c031639106f7c2&version=stable) the code I expect to work. The code was also pasted below.\r\n\r\n```rust\r\ntrait Trait {\r\n    fn func() -> u32;\r\n}\r\n\r\nstruct Struct;\r\n\r\nimpl Trait for Struct {\r\n    fn func() -> u32 {\r\n        5\r\n    }\r\n}\r\n\r\nmacro_rules! test {\r\n    ($impler:ty) => {\r\n        #[test]\r\n        fn test_true() {\r\n            assert!(true);\r\n        }\r\n        \r\n        #[test]\r\n        fn test_func() {\r\n            assert_eq!($impler::func(), 5);\r\n        }\r\n    }\r\n}\r\n\r\ntest!(Struct);\r\n```"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/204127212","html_url":"https://github.com/rust-lang/rust/issues/32657#issuecomment-204127212","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/32657","id":204127212,"user":{"login":"calebmer","id":8282507,"avatar_url":"https://avatars.githubusercontent.com/u/8282507?v=3","gravatar_id":"","url":"https://api.github.com/users/calebmer","html_url":"https://github.com/calebmer","followers_url":"https://api.github.com/users/calebmer/followers","following_url":"https://api.github.com/users/calebmer/following{/other_user}","gists_url":"https://api.github.com/users/calebmer/gists{/gist_id}","starred_url":"https://api.github.com/users/calebmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calebmer/subscriptions","organizations_url":"https://api.github.com/users/calebmer/orgs","repos_url":"https://api.github.com/users/calebmer/repos","events_url":"https://api.github.com/users/calebmer/events{/privacy}","received_events_url":"https://api.github.com/users/calebmer/received_events","type":"User","site_admin":false},"created_at":"2016-03-31T20:57:30Z","updated_at":"2016-03-31T20:57:30Z","body":"@jonas-schievink Thanks, that helps and I updated the incorrect names (my bad :blush:). Should I keep this open so the side effect can be fixed?"}}