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

Regression: Functions with 6+ arguments no longer Clone #28559

Closed
Manishearth opened this issue Sep 21, 2015 · 1 comment
Closed

Regression: Functions with 6+ arguments no longer Clone #28559

Manishearth opened this issue Sep 21, 2015 · 1 comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta.

Comments

@Manishearth
Copy link
Member

#[derive(Copy, Clone)]
struct Foo {
 foo: fn(u8, u8, u8, u8, u8, u8),
}

Gives an error on nightly/beta, but not on stable

<anon>:4:2: 4:33 error: the trait `core::clone::Clone` is not implemented for the type `fn(u8, u8, u8, u8, u8, u8)` [E0277]
<anon>:4  foo: fn(u8, u8, u8, u8, u8, u8),
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<anon>:2:16: 2:21 note: in this expansion of #[derive_Clone] (defined in <anon>)
<anon>:4:2: 4:33 help: see the detailed explanation for E0277
<anon>:4:2: 4:33 note: required by `core::clone::Clone::clone`
error: aborting due to previous error
playpen: application terminated with error code 101

Reducing the number of arguments makes this compile.

cc @rust-lang/compiler

@Manishearth Manishearth added I-wrong regression-from-stable-to-beta Performance or correctness regression from stable to beta. labels Sep 21, 2015
@Manishearth
Copy link
Member Author

This affects Servo's ongoing rustup.

Manishearth added a commit to Manishearth/rust that referenced this issue Sep 21, 2015
(12 was chosen to be consistent with what we do for tuples)

Fixes rust-lang#28559
bors added a commit that referenced this issue Sep 21, 2015
(12 was chosen to be consistent with what we do for tuples)

Fixes #28559
brson pushed a commit to brson/rust that referenced this issue Oct 16, 2015
(12 was chosen to be consistent with what we do for tuples)

Fixes rust-lang#28559
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta.
Projects
None yet
Development

No branches or pull requests

1 participant