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

Rollup of 11 pull requests #104696

Merged
merged 28 commits into from
Nov 22, 2022
Merged

Rollup of 11 pull requests #104696

merged 28 commits into from
Nov 22, 2022

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

RalfJung and others added 28 commits October 22, 2022 18:11
Co-authored-by: Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
This change was mistakenly left out of rust-lang#103367
`MacArgs` is an enum with three variants: `Empty`, `Delimited`, and `Eq`. It's
used in two ways:
- For representing attribute macro arguments (e.g. in `AttrItem`), where all
  three variants are used.
- For representing function-like macros (e.g. in `MacCall` and `MacroDef`),
  where only the `Delimited` variant is used.

In other words, `MacArgs` is used in two quite different places due to them
having partial overlap. I find this makes the code hard to read. It also leads
to various unreachable code paths, and allows invalid values (such as
accidentally using `MacArgs::Empty` in a `MacCall`).

This commit splits `MacArgs` in two:
- `DelimArgs` is a new struct just for the "delimited arguments" case. It is
  now used in `MacCall` and `MacroDef`.
- `AttrArgs` is a renaming of the old `MacArgs` enum for the attribute macro
  case. Its `Delimited` variant now contains a `DelimArgs`.

Various other related things are renamed as well.

These changes make the code clearer, avoids several unreachable paths, and
disallows the invalid values.
… r=dtolnay

Pin::new_unchecked: discuss pinning closure captures

Regardless of how the discussion in rust-lang#102737 turns out, pinning closure captures is super subtle business and probably worth discussing separately.
Fix using `include_bytes` in pattern position

Fix rust-lang#104414
…er-errors

Add a test case for async dyn* traits

This adds a test case that approximates async functions in dyn traits using `dyn*`. The purpose is to have an example of where we are with `dyn*` and the goal of using it for dyn traits.

Issue rust-lang#102425

r? `@compiler-errors`
…chenkov

Split `MacArgs` in two.

`MacArgs` is an enum with three variants: `Empty`, `Delimited`, and `Eq`. It's used in two ways:
- For representing attribute macro arguments (e.g. in `AttrItem`), where all three variants are used.
- For representing function-like macros (e.g. in `MacCall` and `MacroDef`), where only the `Delimited` variant is used.

In other words, `MacArgs` is used in two quite different places due to them having partial overlap. I find this makes the code hard to read. It also leads to various unreachable code paths, and allows invalid values (such as accidentally using `MacArgs::Empty` in a `MacCall`).

This commit splits `MacArgs` in two:
- `DelimArgs` is a new struct just for the "delimited arguments" case. It is now used in `MacCall` and `MacroDef`.
- `AttrArgs` is a renaming of the old `MacArgs` enum for the attribute macro case. Its `Delimited` variant now contains a `DelimArgs`.

Various other related things are renamed as well.

These changes make the code clearer, avoids several unreachable paths, and disallows the invalid values.

r? `@petrochenkov`
…_output_trait_object-msg, r=eholk

Probe + better error messsage for `need_migrate_deref_output_trait_object`

1. Use `InferCtxt::probe` in `need_migrate_deref_output_trait_object` -- that normalization *could* technically do type inference as a side-effect, and this is a lint, so it should have no side-effects.
2. Return the trait-ref so we format the error message correctly. See the UI test change -- `(dyn A + 'static)` is not a trait.
…mute, r=compiler-errors

Do not check transmute if has non region infer

close rust-lang#104609

See: rust-lang#104609 (comment)

r? `@compiler-errors`
… r=GuillaumeGomez

rustdoc: factor out common button CSS
…h-result, r=notriddle

Migrate alias search result to CSS variables

r? `@notriddle`
Make negative_impl and negative_impl_exists take the right types

r? `@lcnr`
Update test's cfg-if dependency to 1.0

This change was mistakenly left out of rust-lang#103367

Finishes rust-lang#103365
@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-testsuite Area: The testsuite used to check the correctness of rustc labels Nov 21, 2022
@rustbot rustbot added 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-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Nov 21, 2022
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=1 (queuing behind the current batch of p=1-prs)

@bors
Copy link
Contributor

bors commented Nov 21, 2022

📌 Commit 04e8ebe has been approved by matthiaskrgr

It is now in the queue for this repository.

@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 Nov 21, 2022
@bors
Copy link
Contributor

bors commented Nov 22, 2022

⌛ Testing commit 04e8ebe with merge 0f7d817...

@bors
Copy link
Contributor

bors commented Nov 22, 2022

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 0f7d817 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 22, 2022
@bors bors merged commit 0f7d817 into rust-lang:master Nov 22, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 22, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0f7d817): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.4% [0.4%, 0.4%] 1
Improvements ✅
(primary)
-0.5% [-0.6%, -0.4%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.5% [-0.6%, -0.4%] 2

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.6% [0.5%, 0.7%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.1% [-2.6%, -1.7%] 2
Improvements ✅
(secondary)
-2.4% [-2.5%, -2.3%] 2
All ❌✅ (primary) -0.5% [-2.6%, 0.7%] 5

Cycles

This benchmark run did not return any relevant results for this metric.

flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 1, 2022
…iaskrgr

Rollup of 11 pull requests

Successful merges:

 - rust-lang#103396 (Pin::new_unchecked: discuss pinning closure captures)
 - rust-lang#104416 (Fix using `include_bytes` in pattern position)
 - rust-lang#104557 (Add a test case for async dyn* traits)
 - rust-lang#104559 (Split `MacArgs` in two.)
 - rust-lang#104597 (Probe + better error messsage for `need_migrate_deref_output_trait_object`)
 - rust-lang#104656 (Move tests)
 - rust-lang#104657 (Do not check transmute if has non region infer)
 - rust-lang#104663 (rustdoc: factor out common button CSS)
 - rust-lang#104666 (Migrate alias search result to CSS variables)
 - rust-lang#104674 (Make negative_impl and negative_impl_exists take the right types)
 - rust-lang#104692 (Update test's cfg-if dependency to 1.0)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@matthiaskrgr matthiaskrgr deleted the rollup-gi1pdb0 branch December 22, 2022 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.