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

Cannot compile dotenv v0.10.1 #66508

Closed
notriddle opened this issue Nov 18, 2019 · 6 comments · Fixed by #66529
Closed

Cannot compile dotenv v0.10.1 #66508

notriddle opened this issue Nov 18, 2019 · 6 comments · Fixed by #66529
Assignees
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-resolve Area: Name resolution regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@notriddle
Copy link
Contributor

notriddle commented Nov 18, 2019

This is a dependency of diesel. I was trying to compile diesel_cli; it failed on both the master branch and the current published version.

`error_chain` is ambiguous (derive helper attribute vs any other name)

Indeed, the code does seem to treat error_chain as simultaneously a derive macro and an attribute macro. It works fine on stable.

@jonas-schievink jonas-schievink added A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-resolve Area: Name resolution C-bug Category: This is a bug. I-nominated regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 18, 2019
@weiznich
Copy link
Contributor

@mati865
Copy link
Contributor

mati865 commented Nov 18, 2019

@rustbot modify labels: +E-needs-bisection

It'd be nice if somebody pinpointed specific PR (or nightly at least).

Maybe @petrochenkov has a clue what could have caused it.

@rustbot rustbot added the E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc label Nov 18, 2019
@weiznich
Copy link
Contributor

Seems to be introduced at nightly-2019-11-17. Unfortunately I'm not able to bisect that further because cargo-bisect-rustc is telling me: authentication required but no callback set; class=Ssh (23)

@mati865
Copy link
Contributor

mati865 commented Nov 18, 2019

Likely #64694

@petrochenkov
Copy link
Contributor

This is a consequence of #64694, I'll provide a fix ASAP.

@petrochenkov petrochenkov self-assigned this Nov 18, 2019
@petrochenkov petrochenkov removed C-bug Category: This is a bug. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc labels Nov 18, 2019
@petrochenkov
Copy link
Contributor

Fixed in #66529.

JohnTitor added a commit to JohnTitor/rust that referenced this issue Nov 19, 2019
resolve: Give derive helpers highest priority during resolution

So they just shadow everything else and don't create ambiguity errors.
This matches the old pre-rust-lang#64694 behavior most closely.

---
The change doesn't apply to this "compatibility" case
```rust
#[trait_helper] // The helper attribute is used before it introduced.
                        // Sadly, compiles on stable, supported via hacks.
                        // I plan to make a compatibility warning for this.
#[derive(Trait)]
struct S;
```
, such attributes still create ambiguities, but rust-lang#64694 didn't change anything for this case.

Fixes rust-lang#66508
Fixes rust-lang#66525
@bors bors closed this as completed in 1f0f0ad Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-resolve Area: Name resolution regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants