-
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 when using += with a struct field with generic type #6738
Comments
Updated: struct Vec3<T> {
x: T,
y: T,
z: T
}
impl<T: Add<T,T>+Clone> Vec3<T> {
fn add(&mut self,v: Vec3<T>){
self.x += v.x.clone();
self.y += v.y.clone();
self.z += v.z.clone();
}
}
fn main() {
let mut v1 : Vec3<int> = Vec3{x: 1,y: 1,z: 1,};
let v2 : Vec3<int> = Vec3{x: 1,y: 1,z: 1,};
v1.add(v2);
} yields
|
Visited for bug triage email 2013-07-29. Updated bug title to be more descriptive. Bug still replicates on rustc 0.8-pre (7b2163d 2013-08-05 00:56:00 -0700) |
Triage, still a bug. Minimal example: struct Foo<T> {
x: T,
}
impl<T> Foo<T> {
fn add(&mut self, v: Foo<T>){
self.x += v.x;
}
}
fn main() {} Changing fn add(&self, v: &mut T){
v += self.x;
} does. (Also using |
Cannot reproduce ICE. It just errors out:
With |
…e-files, r=flip1995 Update labels in template files It seems like we forgot to update the GitHub templates when we decided to update the label names. This PR just adjusts the templates to use the new label names :) Context: [Zulip discussion about renaming the labels](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Label.20cleanup/near/224083870) --- changelog: none
https://gist.github.com/MaikKlein/5650864
The text was updated successfully, but these errors were encountered: