Skip to content

resolve: Give derive helpers highest priority during resolution - #66529

Merged
bors merged 1 commit into
rust-lang:masterfrom
petrochenkov:reshelp2
Nov 19, 2019
Merged

resolve: Give derive helpers highest priority during resolution#66529
bors merged 1 commit into
rust-lang:masterfrom
petrochenkov:reshelp2

Conversation

@petrochenkov

Copy link
Copy Markdown
Contributor

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


The change doesn't apply to this "compatibility" case

#[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)]structS;

, such attributes still create ambiguities, but #64694 didn't change anything for this case.

Fixes#66508
Fixes#66525

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @davidtwco

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 18, 2019
This was referenced Nov 18, 2019

@davidtwcodavidtwco left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, r=me when CI passes

@petrochenkov

Copy link
Copy Markdown
ContributorAuthor

@bors r=davidtwco

@bors

bors commented Nov 19, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit f74fe81 has been approved by davidtwco

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 19, 2019
@Centril

Copy link
Copy Markdown
Contributor

cc @rust-lang/lang for awareness

JohnTitor added a commit to JohnTitor/rust that referenced this pull request 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.
Fixesrust-lang#66508Fixesrust-lang#66525
@JohnTitorJohnTitor mentioned this pull request Nov 19, 2019
@nikomatsakis

Copy link
Copy Markdown
Contributor

thanks @petrochenkov for looking into this

bors added a commit that referenced this pull request Nov 19, 2019
Rollup of 13 pull requests
Successful merges:
- #66090 (Misc CI improvements)
- #66239 (Suggest calling async closure when needed)
- #66430 ([doc] Fix the source code highlighting on source comments)
- #66431 (Fix 'type annotations needed' error with opaque types)
- #66461 (Add explanation message for E0641)
- #66468 (Cleanup Miri SIMD intrinsics)
- #66478 (rustc_plugin: Remove the compatibility shim)
- #66493 (Add JohnTitor to rustc-guide toolstate notification list)
- #66511 (std::error::Chain: remove Copy)
- #66512 (Add unix::process::CommandExt::arg0)
- #66520 (Disable gdb pretty printer global section on wasm targets)
- #66529 (resolve: Give derive helpers highest priority during resolution)
- #66536 (Move the definition of `QueryResult` into `plumbing.rs`.)
Failed merges:
r? @ghost
Centril added a commit to Centril/rust that referenced this pull request 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.
Fixesrust-lang#66508Fixesrust-lang#66525
@CentrilCentril mentioned this pull request Nov 19, 2019
bors added a commit that referenced this pull request Nov 19, 2019
Rollup of 11 pull requests
Successful merges:
- #66090 (Misc CI improvements)
- #66155 (Add long error explanation for E0594)
- #66239 (Suggest calling async closure when needed)
- #66430 ([doc] Fix the source code highlighting on source comments)
- #66431 (Fix 'type annotations needed' error with opaque types)
- #66461 (Add explanation message for E0641)
- #66493 (Add JohnTitor to rustc-guide toolstate notification list)
- #66511 (std::error::Chain: remove Copy)
- #66529 (resolve: Give derive helpers highest priority during resolution)
- #66536 (Move the definition of `QueryResult` into `plumbing.rs`.)
- #66538 (Remove compiler_builtins_lib feature from libstd)
Failed merges:
r? @ghost
@bors
bors merged commit f74fe81 into rust-lang:masterNov 19, 2019
@petrochenkov
petrochenkov deleted the reshelp2 branch February 22, 2025 18:33
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

derive-new errors Cannot compile dotenv v0.10.1

6 participants

@petrochenkov@rust-highfive@bors@Centril@nikomatsakis@davidtwco