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

Clarify that optimization level 1 #9020

Closed
wants to merge 1 commit into from

Conversation

davidspies
Copy link

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

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
Copy link
Contributor

ehuss commented Dec 27, 2020

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
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