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

resolve: Temporarily make panic available with no_implicit_prelude #61971

Closed
wants to merge 1 commit into from

Conversation

petrochenkov
Copy link
Contributor

@petrochenkov petrochenkov commented Jun 19, 2019

Until uses of panic in the standard library are hygienized somehow (#61629).
Closes #61567 (which was introduced by migration or core/std to 2018 edition).

Alternative: Close #61567 as wontfix, this PR is a hack and makes panic available even if it's not nested in a standard macro, and no_implicit_prelude is almost never used in practice, and the proper solution wont' be ready until the release.

@rust-highfive
Copy link
Collaborator

r? @estebank

(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 19, 2019
@petrochenkov petrochenkov added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. beta-nominated Nominated for backporting to the compiler in the beta channel. labels Jun 19, 2019
@estebank
Copy link
Contributor

cc @rust-lang/compiler

What is the behavior when it compiles? Does the correct macro get found (core/std) and run?

@Centril Centril added I-nominated T-lang Relevant to the language team, which will review and decide on the PR/issue. labels Jun 20, 2019
@petrochenkov
Copy link
Contributor Author

What is the behavior when it compiles?

It makes any macro named panic and imported vis #[macro_use] extern crate foo; a resolution candidate in #[no_implicit_prelude] modules.
It isn't guaranteed to be the standard panic, but it's expected to be the standard panic in most cases (assuming the word "most" is applicable to something like #[no_implicit_prelude] at all).

@pnkfelix
Copy link
Member

Discussed at T-compiler meeting. Closed #61567 as wont-fix; closing this as wont-land.

@pnkfelix pnkfelix closed this Jun 20, 2019
@Mark-Simulacrum
Copy link
Member

I am de-nominating this from beta -- it seems we're not going ahead with a fix here.

@Mark-Simulacrum Mark-Simulacrum removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jun 25, 2019
@petrochenkov petrochenkov deleted the sigh branch July 1, 2019 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

regression: assert_eq cannot find panic with no_implicit_prelude
6 participants