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

Add a text to unreachable!() #4986

Closed
wants to merge 1 commit into from

Conversation

chansuke
Copy link
Contributor

@chansuke chansuke commented Jan 3, 2020

Fixes #4959.

|
LL | let trivial_eq = Regex::new("^foobar$");
| ^^^^^^^^^^
note: candidate #1: /Users/YusukeAbe/code/rust/rust-clippy/target/debug/deps/libregex-a27846278b6a956a.rlib
Copy link
Member

Choose a reason for hiding this comment

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

Hm, it depends on your environment. Shouldn't be changed.
Maybe: cargo clean; cargo test resolves this failure.

Copy link
Member

Choose a reason for hiding this comment

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

cargo update sometimes fixes this for me as well

Copy link
Contributor

Choose a reason for hiding this comment

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

I usually do rm target/debug/deps/libregex*.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review. I will fix this.

Comment on lines +1 to +4
error[E0465]: multiple rlib candidates for `regex` found
|
= note: candidate #1: /Users/YusukeAbe/code/rust/rust-clippy/target/debug/deps/libregex-a27846278b6a956a.rlib
= note: candidate #2: /Users/YusukeAbe/code/rust/rust-clippy/target/debug/deps/libregex-18da0247c966b574.rlib
Copy link
Member

Choose a reason for hiding this comment

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

Same here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks again.

Comment on lines +1 to +4
error[E0465]: multiple rlib candidates for `regex` found
|
= note: candidate #1: /Users/YusukeAbe/code/rust/rust-clippy/target/debug/deps/libregex-a27846278b6a956a.rlib
= note: candidate #2: /Users/YusukeAbe/code/rust/rust-clippy/target/debug/deps/libregex-18da0247c966b574.rlib
Copy link
Member

Choose a reason for hiding this comment

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

Same here.

Comment on lines +1 to +4
error[E0465]: multiple rlib candidates for `regex` found
|
= note: candidate #1: /Users/YusukeAbe/code/rust/rust-clippy/target/debug/deps/libregex-a27846278b6a956a.rlib
= note: candidate #2: /Users/YusukeAbe/code/rust/rust-clippy/target/debug/deps/libregex-18da0247c966b574.rlib
Copy link
Member

Choose a reason for hiding this comment

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

Same here.

@JohnTitor JohnTitor added the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label Jan 3, 2020
Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

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

Let's first figure out in the issue, if anything needs to change here.

span_lint(cx, UNREACHABLE, span,
"`unreachable` should not be present in production code");
span_help_and_lint(cx, UNREACHABLE, span,
"`unreachable` should not be present in production code", "ident is neither enable nor disable");
Copy link
Member

Choose a reason for hiding this comment

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

That was not, what the issue was talking about. Anyway, the requested lint already exists, so I don't think there is anything that needs to be done here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the review and sorry for the misunderstanding. I will fix this.

@flip1995
Copy link
Member

Ping from triage @chansuke Thanks for addressing this issue. Meanwhile this issue is closed though. If you want to fix the related issue #3528 feel free to open a new PR.

@flip1995 flip1995 closed this Feb 15, 2020
@flip1995 flip1995 removed the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label Feb 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pedantic lint against unreachable!()
5 participants