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

Rust 1.20 regression, multiqueue 0.3.2, match arms have incompatible types #42842

Closed
brson opened this issue Jun 22, 2017 · 6 comments
Closed
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta.

Comments

@brson
Copy link
Contributor

brson commented Jun 22, 2017

https://github.com/schets/multiqueue

brian@ip-10-145-43-250:/mnt2/dev/multiqueue⟫ git log -1
commit f28f252a0c77d628d18192913d5a8049d85e9a1e
Merge: 133dc88 b3c40d6
Author: Samuel Schetterer <[email protected]>
Date:   Wed Apr 5 12:14:19 2017 -0400

    Merge pull request #12 from schets/fix_sync_req

    Added proper Sync requirements for Broadcast Queues
brian@ip-10-145-43-250:/mnt2/dev/euclid⟫ rustc +beta -Vv
rustc 1.19.0-beta.2 (a175ee509 2017-06-15)
binary: rustc
commit-hash: a175ee509bca5069b01cea9a35c6f333d2250eee
commit-date: 2017-06-15
host: x86_64-unknown-linux-gnu
release: 1.19.0-beta.2
LLVM version: 4.0
error[E0308]: match arms have incompatible types
   --> src/bin/example.rs:107:29
    |
107 |           scope.spawn(move || for val in single_recv.iter_with(|item_ref| 10 * *item_ref) {
    |  _____________________________^
108 | |             println!("{}", val);
109 | |         });
    | |_________^ expected (), found i32
    |
    = note: expected type `()`
               found type `i32`
note: match arm with an incompatible type
   --> src/bin/example.rs:107:29
    |
107 |           scope.spawn(move || for val in single_recv.iter_with(|item_ref| 10 * *item_ref) {
    |  _____________________________^
108 | |             println!("{}", val);
109 | |         });
    | |_________^

error[E0308]: match arms have incompatible types
   --> src/bin/example.rs:114:29
    |
114 |           scope.spawn(move || for val in
    |  _____________________________^
115 | |             single_recv_2.try_iter_with(|item_ref| 10 * *item_ref) {
116 | |             println!("{}", val);
117 | |         });
    | |_________^ expected (), found i32
    |
    = note: expected type `()`
               found type `i32`
note: match arm with an incompatible type
   --> src/bin/example.rs:114:29
    |
114 |           scope.spawn(move || for val in
    |  _____________________________^
115 | |             single_recv_2.try_iter_with(|item_ref| 10 * *item_ref) {
116 | |             println!("{}", val);
117 | |         });
    | |_________^

error: aborting due to previous error(s)

error: Could not compile `multiqueue`.

cc @schets

@brson brson added the regression-from-stable-to-beta Performance or correctness regression from stable to beta. label Jun 22, 2017
@Mark-Simulacrum
Copy link
Member

#42265 -- currently being backported to beta.

@nikomatsakis
Copy link
Contributor

@Mark-Simulacrum did it get backported? I don't see any links there...?

@nikomatsakis
Copy link
Contributor

oh, looks like it landed in #42927 -- can someone verify if this is fixed?

@brson
Copy link
Contributor Author

brson commented Jul 7, 2017

Seems like we need to get a new beta out asap.

@brson
Copy link
Contributor Author

brson commented Jul 7, 2017

I've bumped the beta #43113

@brson
Copy link
Contributor Author

brson commented Jul 13, 2017

I've confirmed the fix on beta.3. Thanks all.

@brson brson closed this as completed Jul 13, 2017
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

3 participants