-
Notifications
You must be signed in to change notification settings - Fork 13k
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: DefID [...] was matchable against Obligation [...] but now is not #18623
Comments
I tried to reproduce, but am bad at the |
@steveklabnik I believe I have reproduced this bug with associated types (or at least stumbled upon a very similar one). use std::ops::Add;
trait Scalar {}
impl Scalar for f64 {}
struct Bob;
impl<RHS: Scalar> Add<RHS> for Bob {
type Output = Bob;
fn add(self, rhs: RHS) -> Bob { self }
}
fn main() {
let b = Bob;
b + 3.5;
// Internal compiler error (should be type error?):
b + 3;
} |
I ran into to it when accidentally using a float to index (
|
triage: still reproduces |
Duplicate of #24352 |
I don't really know what could be causing this bug, but this code
using this version of rustc,
on Mac OS X 10.10
causes
Apologies if this is an incorrect format or non-relevant, I've never really submitted a bug report to a large project before.
Addendum:
Adding "f64" to the second println!:
compiles and runs as expected
The text was updated successfully, but these errors were encountered: