Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE with weird macro lifetime syntax #33837

Closed
diwic opened this issue May 24, 2016 · 3 comments
Closed

ICE with weird macro lifetime syntax #33837

diwic opened this issue May 24, 2016 · 3 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@diwic
Copy link
Contributor

diwic commented May 24, 2016

This code is totally broken, but since it ICEs (on beta and nightly, but not on stable), it's a bug anyhow:

macro_rules! stupid { ($f0: ty, $f1: ty) => { for <'q> FnOnce(&'q $f0) -> $'q f1 }}
fn test<T: stupid(String, &str)>() {} 

Fails with:

<anon>:1:76: 1:78 error: expected identifier, found `'q`
<anon>:1 macro_rules! stupid { ($f0: ty, $f1: ty) => { for <'q> FnOnce(&'q $f0) -> $'q f1 }}
                                                                                    ^~
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
thread 'rustc' panicked at 'internal error: entered unreachable code', ../src/libsyntax/parse/parser.rs:2857
@apasel422 apasel422 added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label May 24, 2016
@TimNN
Copy link
Contributor

TimNN commented May 25, 2016

Looks like #33728.

@TimNN
Copy link
Contributor

TimNN commented May 31, 2016

This has been fixed on the latest nightly, probably by #33870.

@alexcrichton
Copy link
Member

Yay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

4 participants