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

Fix an accidental raw access of field #8319

Merged
merged 1 commit into from
Jun 3, 2020

Conversation

alexcrichton
Copy link
Member

The manifest has a few different ways of specifying whether a crate is a
procedural macro, and there's a TomlTarget::proc_macro() method to
unify these various lines. Unfortunately though we had a bug where one
location forgot to call the method and read the raw field! This led to
surprising behavior where the different ways to specify a proc macro
would have subtly different changes in behavior. The fix here in this PR
is to ensure that we access the property always via the method.

Closes #8315

The manifest has a few different ways of specifying whether a crate is a
procedural macro, and there's a `TomlTarget::proc_macro()` method to
unify these various lines. Unfortunately though we had a bug where one
location forgot to call the method and read the raw field! This led to
surprising behavior where the different ways to specify a proc macro
would have subtly different changes in behavior. The fix here in this PR
is to ensure that we access the property always via the method.

Closes rust-lang#8315
@rust-highfive
Copy link

r? @Eh2406

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 3, 2020
@Eh2406
Copy link
Contributor

Eh2406 commented Jun 3, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Jun 3, 2020

📌 Commit 442f629 has been approved by Eh2406

@bors bors 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 Jun 3, 2020
@bors
Copy link
Contributor

bors commented Jun 3, 2020

⌛ Testing commit 442f629 with merge 841e994...

@bors
Copy link
Contributor

bors commented Jun 3, 2020

☀️ Test successful - checks-azure
Approved by: Eh2406
Pushing 841e994 to master...

@bors bors merged commit 841e994 into rust-lang:master Jun 3, 2020
sunshowers added a commit to sunshowers/cargo-guppy that referenced this pull request Jun 3, 2020
Update everything, including cargo to pick up the fix for
rust-lang/cargo#8319.
sunshowers added a commit to facebookarchive/cargo-guppy that referenced this pull request Jun 3, 2020
Update everything, including cargo to pick up the fix for
rust-lang/cargo#8319.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 11, 2020
Update cargo

15 commits in 40ebd52206e25c7a576ee42c137cc06a745a167a..1ec223effbbbf9fddd3453cdcae3a96a967608eb
2020-06-01 22:35:00 +0000 to 2020-06-09 20:03:14 +0000
- Default values for `readme` if not specified (rust-lang/cargo#8277)
- Fix tree completions. (rust-lang/cargo#8342)
- Support `{prefix}` and `{lowerprefix}` markers in `config.json` `dl` key (rust-lang/cargo#8267)
- Add environment variables to identify the binary and crate name (rust-lang/cargo#8270)
- Bump to 0.47.0, update changelog (rust-lang/cargo#8336)
- Nits: Remove unneeded mut and loop (rust-lang/cargo#8334)
- 1.45 beta backports (rust-lang/cargo#8331)
- Better error message when passing in relative path to Workspace::new (rust-lang/cargo#8321)
- Don't hash executable filenames on apple platforms. (rust-lang/cargo#8329)
- fix clippy warnings (rust-lang/cargo#8324)
- Require latest libgit2 to pull in bugfixes (rust-lang/cargo#8320)
- Fix an accidental raw access of field (rust-lang/cargo#8319)
- Use mem::take to replace with Default values (rust-lang/cargo#8314)
- Allow Windows dylibs without dll suffix. (rust-lang/cargo#8310)
- Show alias in help message (rust-lang/cargo#8307)
@alexcrichton alexcrichton deleted the fix-access branch July 29, 2020 17:48
@ehuss ehuss added this to the 1.46.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: 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.

v2 resolver: a proc macro being specified with the key "proc_macro" vs "proc-macro" causes different results
5 participants