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

Expand error message to explain that a string was found #8235

Merged
merged 1 commit into from
May 12, 2020

Conversation

badboy
Copy link
Member

@badboy badboy commented May 12, 2020

With opt-level = "3" this previously said:

must be an integer, `z`, or `s`, but found: 3 for ...

The error message doesn't make that super clear.
This should now be a bit more clear.

Fixes #8234


We could even include a bit more saying that "3" should become 3 (either unconditionally or after trying to parse "3" into an integer?

cc @steveklabnik

@rust-highfive
Copy link

r? @alexcrichton

(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 May 12, 2020
@shirshak55
Copy link

may be we should write quotes also \"3\"

@alexcrichton
Copy link
Member

I would agree yeah it probably makes the most sense to also include the surrounding quotes, but otherwise looks great to me!

With `opt-level = "3"` this previously said:

    must be an integer, `z`, or `s`, but found: 3 for ...

The error message doesn't make that super clear.
This should now be a bit more clear.

Fixes rust-lang#8234
@badboy badboy force-pushed the 8234-numbers-in-strings-are-numbers branch from 05a6127 to 09084a3 Compare May 12, 2020 19:41
@badboy
Copy link
Member Author

badboy commented May 12, 2020

Adjusted and also fixed the tests.

@badboy
Copy link
Member Author

badboy commented May 12, 2020

Now they fail in apt install gcc-multilib

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Collaborator

bors commented May 12, 2020

📌 Commit 09084a3 has been approved by alexcrichton

@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 May 12, 2020
@bors
Copy link
Collaborator

bors commented May 12, 2020

⌛ Testing commit 09084a3 with merge db702d3d09de4c1c1284e159090f49b793a7fe4d...

@bors
Copy link
Collaborator

bors commented May 12, 2020

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 12, 2020
@ehuss
Copy link
Contributor

ehuss commented May 12, 2020

@bors retry
#7858 😦

@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 May 12, 2020
@bors
Copy link
Collaborator

bors commented May 12, 2020

⌛ Testing commit 09084a3 with merge 55869de...

@bors
Copy link
Collaborator

bors commented May 12, 2020

☀️ Test successful - checks-azure
Approved by: alexcrichton
Pushing 55869de to master...

@bors bors merged commit 55869de into rust-lang:master May 12, 2020
@badboy badboy deleted the 8234-numbers-in-strings-are-numbers branch May 13, 2020 07:49
bors added a commit to rust-lang-ci/rust that referenced this pull request May 20, 2020
Update cargo

9 commits in cb06cb2696df2567ce06d1a39b1b40612a29f853..500b2bd01c958f5a33b6aa3f080bea015877b83c
2020-05-08 21:57:44 +0000 to 2020-05-18 17:12:54 +0000
- Handle LTO with an rlib/cdylib crate type (rust-lang/cargo#8254)
- Gracefully handle errors during a build. (rust-lang/cargo#8247)
- Update `im-rc` to 15.0.0 (rust-lang/cargo#8255)
- Fix `cargo update` with unused patch. (rust-lang/cargo#8243)
- Rephrased error message for disallowed sections in virtual workspace (rust-lang/cargo#8200)
- Ignore broken console output in some situations. (rust-lang/cargo#8236)
- Expand error message to explain that a string was found (rust-lang/cargo#8235)
- Add context to some fs errors. (rust-lang/cargo#8232)
- Move SipHasher to an isolated module. (rust-lang/cargo#8233)
@ehuss ehuss added this to the 1.45.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.

Error message is confusing when changing opt levels
6 participants