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

visit enum init when the enum variable doesn't have any parameters #102984

Closed
wants to merge 358 commits into from

Conversation

lyming2007
Copy link

this will fix #101208

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 12, 2022
@rust-highfive
Copy link
Collaborator

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

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 Oct 12, 2022
@rust-log-analyzer

This comment has been minimized.

@lyming2007 lyming2007 force-pushed the issue-101208-fix branch 2 times, most recently from 3dd7ff2 to b31086a Compare October 12, 2022 22:28
@compiler-errors
Copy link
Member

Is this a duplicate of #102062? Which one of these is the preferred fix?

@compiler-errors
Copy link
Member

As I noted on #102062, I feel like this logic overlaps very heavily with FnCtxt::suggest_fn_call -- is it possible to use that instead?

@lyming2007
Copy link
Author

As I noted on #102062, I feel like this logic overlaps very heavily with FnCtxt::suggest_fn_call -- is it possible to use that instead?

There is no respond for #102062 since a long time ago.
And I found we don't need to modify the file compiler/rustc_span/src/span_encoding.rs which caused the conflict.
So this one(#102984) is actually a more less expensive fix.
That's why I've created a new one.

@compiler-errors
Copy link
Member

compiler-errors commented Oct 13, 2022

@lyming2007 in the future, you can just update the older PR with a new approach. If it has been a long time since it was reviewed, then please ping the reviewer.

I will close the older one since they achieve the same purpose.

@lyming2007
Copy link
Author

@lyming2007 in the future, you can just update the older PR with a new approach. If it has been a long time since it was reviewed, then please ping the reviewer.

I will close the older one since they achieve the same purpose.

Thank you for the suggestion. I will do that in the future

@nagisa
Copy link
Member

nagisa commented Oct 18, 2022

r? @compiler-errors

@bors
Copy link
Contributor

bors commented Oct 21, 2022

☔ The latest upstream changes (presumably #103310) made this pull request unmergeable. Please resolve the merge conflicts.

Noratrieb and others added 14 commits October 21, 2022 14:05
Co-authored-by: Ralf Jung <post@ralfj.de>
Rough timeline:

* The longer `.content .item-info` selector originated in
  110e727. No reason seems to be given in
  the PR why it needed the `.content` part, but it was probably added because
  of <https://github.com/rust-lang/rust/blob/110e7270ab7b0700ce714b8b1c7e509195dea2c4/src/librustdoc/html/static/rustdoc.css#L476-L478>.
  That selector with the margin-bottom was removed when CSS containment
  was added in 8846c08.
* `.stability` was renamed `.item-info` in
  caf6c57.
* The selector without the `.content` was added in
  d48a39a.
…errors

This way we comply with the Coherence rule given that IntoDiagnostic trait is defined in rustc_errors, and almost all other crates depend on it.
spastorino and others added 25 commits October 21, 2022 14:14
This rule originated as a `font-size: 16px`, when body had `font-size: 13px`
set in 4fd061c.

It remained even when body's font size was bumped up to 16px,
4d5f4ff, making the rule a no-op, and was
carried forward when it was converted to 1rem in
cc18120.
io_safety was stabilized in Rust 1.63, so mark the io_safety exports in
`std::os::wasi::io` as stable.

Fixes rust-lang#103306.
This commit changes things so that the search bar is exactly centered between
the top of the page and the top of the source code content area.
@rustbot
Copy link
Collaborator

rustbot commented Oct 21, 2022

A change occurred in the Ayu theme.

cc @Cldfire

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

Some changes occurred in need_type_info.rs

cc @lcnr

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

Some changes occurred in src/tools/cargo

cc @ehuss

This PR changes MIR

cc @oli-obk, @RalfJung, @JakobDegen, @davidtwco, @celinval, @vakaras

rustc_errors::translation was changed

cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki

The Miri subtree was changed

cc @rust-lang/miri

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

rustc_macros::diagnostics was changed

cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki

Some changes occurred in HTML/CSS themes.

cc @GuillaumeGomez

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

Some changes occurred in src/librustdoc/clean/types.rs

cc @camelid

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo

Some changes occurred in const_evaluatable.rs

cc @lcnr

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

@compiler-errors
Copy link
Member

@lyming2007 you did the rebase incorrectly. I think you need to do:

git pull --rebase $ORIGIN master

where $ORIGIN is whatever git remote that is set up to track rust-lang/rust.

@lyming2007
Copy link
Author

@lyming2007 you did the rebase incorrectly. I think you need to do:

git pull --rebase $ORIGIN master

where $ORIGIN is whatever git remote that is set up to track rust-lang/rust.
When I tried to merge the code, it keeps asking me to fix the conflict of Cargo.lock which I nerve touched before.
Seems it's much easier to create a new PR than doing the merge.
Can I create a new one and abandon the current one?
I will do as you suggested later

@lyming2007
Copy link
Author

this PR was broken by me obviously

@lyming2007 lyming2007 closed this Oct 21, 2022
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide suggestion for error when if let used with enum variant whose values are not initialized