Skip to content

crash at >> #242

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

Closed
nrc opened this issue Sep 1, 2015 · 4 comments
Closed

crash at >> #242

nrc opened this issue Sep 1, 2015 · 4 comments
Labels
bug Panic, non-idempotency, invalid code, etc.

Comments

@nrc
Copy link
Member

nrc commented Sep 1, 2015

#[derive(Copy, Clone)]
pub struct StdCounter<T: Zero + Add<T, Output = T> + Sub<T, Output = T>> {
    pub value: T
}

error is

thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: IllFormedSpan(Span { lo: BytePos(190), hi: BytePos(189), expn_id: ExpnId(4294967295) })', ../src/libcore/result.rs:734

Pretty sure this is due to a libsyntax error (rust-lang/rust#28158), but in case it isn't lets track it here too.

@nrc nrc added the bug Panic, non-idempotency, invalid code, etc. label Sep 1, 2015
@ben0x539
Copy link

ben0x539 commented Sep 4, 2015

I get the a similar IllFormedSpan error on this snippet, which compiles fine with rustc itself. Does that mean it's not a libsyntax error?

fn main() {
    match () {_ => () }
}

Similarly inserting a space between the { and the _ fixes it.

@nrc
Copy link
Member Author

nrc commented Sep 7, 2015

@ben0x539 No, we use more spans than rustc and (more importantly) use them in more interesting ways.

@nrc
Copy link
Member Author

nrc commented Sep 7, 2015

And another example (from liballoc):

fn homura<T: Deref<Target=i32>>(_: T) { }

@nrc
Copy link
Member Author

nrc commented Sep 8, 2015

Should be fixed by rust-lang/rust#28291

@nrc nrc closed this as completed in 99ffb5a Sep 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Panic, non-idempotency, invalid code, etc.
Projects
None yet
Development

No branches or pull requests

2 participants