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 resolving enum variant with name of struct when both are imported #30989

Closed
brson opened this issue Jan 18, 2016 · 6 comments
Closed
Labels
regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. relnotes Marks issues that should be documented in the release notes of the next release. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@brson
Copy link
Contributor

brson commented Jan 18, 2016

rotor-http commit 42fc6cc9424bc32b8e2a36798f6f33ac4f065420 does not build on nightly 2fb0c5e with this error:

src/server/response.rs:43:37: 43:41 error: `Head` is the name of a struct or struct variant, but this expression uses it like a function name [E0423]
src/server/response.rs:43             body: if head.method == Head { Ignored } else { Normal },
                                                              ^~~~
src/server/response.rs:43:37: 43:41 help: run `rustc --explain E0423` to see a detailed explanation
src/server/response.rs:43:37: 43:41 help: did you mean to write: `Head { /* fields */ }`?

This worked as of nightly-2015-12-01, commit a2866e3.

Head is both a hyper::message::Message enum variant and a rotor-http struct and both are imported.

cc @rust-lang/lang @tailhook

@brson brson added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Jan 18, 2016
@aturon
Copy link
Member

aturon commented Jan 18, 2016

cc @rust-lang/compiler

@nrc
Copy link
Member

nrc commented Jan 18, 2016

cc @petrochenkov

@petrochenkov
Copy link
Contributor

This is due to #30896
The name conflict is legitimate, but it wasn't reported in cross-crate scenarios.
However, I expected this to be broken by #30882, not by #30896 o_O
cc #30882 (comment)

@nikomatsakis nikomatsakis added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 3, 2016
@nikomatsakis
Copy link
Contributor

@petrochenkov to be clear, are you saying this is a bug fix?

@petrochenkov
Copy link
Contributor

@nikomatsakis Yes

@nikomatsakis nikomatsakis added I-nominated relnotes Marks issues that should be documented in the release notes of the next release. labels Apr 7, 2016
@nikomatsakis
Copy link
Contributor

Nominating for compiler team meeting, but I am inclined to flag this in the relnotes and take no action. Seems like it was a bug fix and I'm guessing rotor-http has fixed it downstream by now in any case, and there is no indication of widespread impact.

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. relnotes Marks issues that should be documented in the release notes of the next release. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants