Skip to content

Clarify that optimization level 1#9020

Closed
davidspies wants to merge 1 commit into
rust-lang:masterfrom
davidspies:patch-1
Closed

Clarify that optimization level 1#9020
davidspies wants to merge 1 commit into
rust-lang:masterfrom
davidspies:patch-1

Conversation

@davidspies

Copy link
Copy Markdown

It also turns on debug_assertions.
(I was confused by this)

It _also_ turns on debug_assertions.
(I was confused by this)
@rust-highfive

Copy link
Copy Markdown

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 27, 2020
@ehuss

ehuss commented Dec 27, 2020

Copy link
Copy Markdown
Contributor

Thanks for the PR! I don't think this is quite correct, though I see how it is confusing.

In Cargo, debug-assertions are always driven by the profile (it doesn't have any default behavior based on the opt-level), and the profile has hard-coded defaults for things like debug-assertions. I think when I wrote this, I probably forgot that and just copied the behavior as that is how rustc itself works.

I think the correct fix here is to just remove the note also turns on….

@ehuss ehuss added S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 5, 2021
joshtriplett added a commit to joshtriplett/cargo that referenced this pull request Jan 12, 2021
@joshtriplett

Copy link
Copy Markdown
Member

I just filed a PR to update the language as you suggested, @ehuss.

bors added a commit that referenced this pull request Jan 12, 2021
Remove statement that opt-level 0 turns on debug

See #9020 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants