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

Nightly regression (expected a path on the left-hand side of +) #39169

Closed
dpc opened this issue Jan 19, 2017 · 2 comments
Closed

Nightly regression (expected a path on the left-hand side of +) #39169

dpc opened this issue Jan 19, 2017 · 2 comments
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.

Comments

@dpc
Copy link
Contributor

dpc commented Jan 19, 2017

$ rustc --version
rustc 1.16.0-nightly (c07a6ae77 2017-01-17)
$ cargo --version
cargo 0.17.0-nightly (493abf5 2017-01-18)

Daily travis builds of slog are failing for todays nightly: https://travis-ci.org/slog-rs/slog/jobs/192913808

error[E0178]: expected a path on the left-hand side of `+`, not `(Fn(D::Error) -> E)`
   --> src/_drain.rs:119:17
    |
119 |     map_fn: Box<(Fn(D::Error) -> E) + 'static+ Send+Sync>,
    |                 ^^^^^^^^^^^^^^^^^^^ expected a path
    |
    = help: perhaps you forgot parentheses? (per RFC 438)
@dpc dpc changed the title Nightly regression ( Nightly regression (expected a path on the left-hand side of +) Jan 19, 2017
@alexcrichton alexcrichton added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Jan 19, 2017
@petrochenkov
Copy link
Contributor

petrochenkov commented Jan 19, 2017

This is a regression from #39110

Strictly speaking, the syntax is incorrect - parens are not permitted in bounds.
The correct variant is Box<Fn(D::Error) -> E + 'static + Send + Sync>.
I'll submit a fix ASAP though, so we could start a warning period or something later.

@dpc
Copy link
Contributor Author

dpc commented Jan 19, 2017

Thank you for information. I'll fix it and release patch version ASAP. I don't think many projects could be affected.

alexcrichton added a commit to alexcrichton/rust that referenced this issue Jan 20, 2017
Fix regression in parsing of trait object types

Fixes rust-lang#39169

Accepting parens in this position is a regression itself, introduced in Rust 1.6 by rust-lang#29870, so I hope to revert this in my next bounds refactoring patch (possibly with a warning,  crater run, etc).

r? @eddyb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.
Projects
None yet
Development

No branches or pull requests

3 participants