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 9 pull requests #120409

Closed
wants to merge 40 commits into from
Closed

Conversation

Nadrieril
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

eopb and others added 30 commits January 5, 2024 22:35
The feature does not seem to be required by this doctest.
I did some benchmark digging into the `intersperse` and `intersperse_with` code as part of the https://internals.rust-lang.org/t/add-iterate-with-separators-iterator-function/18781/13 discussion, and as a result I optimized them a bit, without relying on the peekable iterator.
Co-authored-by: Michael Goulet <[email protected]>
When encountering an attribute in a body, we try to recover from an
attribute on an expression (as opposed to a statement). We need to
properly clean up when the attribute is at the end of the body where a
tail expression would be.

Fix rust-lang#118164.
estebank and others added 10 commits January 27, 2024 00:21
Do not attempt to provide an accurate suggestion for `impl Trait`
in bare trait types when linting. Instead, only do the object
safety check when an E0782 is already going to be emitted in the
2021 edition.

Fix rust-lang#120241.
…iper

Boost iterator intersperse(_with) performance

I did some benchmark digging into the `intersperse` and `intersperse_with` code as part of [this discussion](https://internals.rust-lang.org/t/add-iterate-with-separators-iterator-function/18781/13), and as a result I optimized them a bit, without relying on the peekable iterator.

See also [full benchmark repo](https://github.com/nyurik/intersperse_perf)

Benchmarks show near 2x performance improvements with the simple `sum` [benchmarks](https://gist.github.com/nyurik/68b6c9b3d90f0d14746d4186bf8fa1e2):
![image](https://user-images.githubusercontent.com/1641515/237005195-16aebef4-9eed-4514-8b7c-da1d1f5bd9e0.png)
Properly recover from trailing attr in body

When encountering an attribute in a body, we try to recover from an attribute on an expression (as opposed to a statement). We need to properly clean up when the attribute is at the end of the body where a tail expression would be.

Fix rust-lang#118164, fix rust-lang#118575.
…sDenton

Remove feature not required by `Ipv6Addr::to_cononical` doctest

The feature does not seem to be required by this doctest.
Add FileCheck annotations to dataflow-const-prop tests

part of rust-lang#116971.

A few shadowing variable names are changed, so that it is easier to match the variable names in MIR using FileCheck syntax.

Also, there's a FIXME in [enum.rs](https://github.com/rust-lang/rust/pull/119759/files#diff-7621f55327838e489a95ac99ae1e6126b37c57aff582594e6bee9d7e7e56fc58) because the MIR looks suspicious to me. It has been explained in the comments.

r? cjgillot
Avoid ICE in trait without `dyn` lint

Do not attempt to provide an accurate suggestion for `impl Trait` in bare trait types when linting. Instead, only do the object safety check when an E0782 is already going to be emitted in the 2021 edition.

Fix rust-lang#120241.
Update codegen test for LLVM 18

r? ``@cuviper``
…ler-errors

ScopeTree: remove destruction_scopes as unused

last usages removed by rust-lang#116170

Unused, but still presented in memory at `t-gmax` (in DHAT termonology)
…piler-errors

Improve handling of numbers in `IntoDiagnosticArg`

While working on rust-lang#120393, I realize that my fluent selectors were not working. So here is an improvement (not a fix unfortunately).
…rieb

Remove myself from review rotation

Still willing to do reviews (and make it through my backlog), but I don't have the bandwidth to be on the rotation right now.
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself 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. rollup A PR which is a rollup labels Jan 27, 2024
@Nadrieril
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jan 27, 2024

📌 Commit cb459f7 has been approved by Nadrieril

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 Jan 27, 2024
@bors
Copy link
Contributor

bors commented Jan 27, 2024

⌛ Testing commit cb459f7 with merge 21d5b93...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 27, 2024
Rollup of 9 pull requests

Successful merges:

 - rust-lang#111379 (Boost iterator intersperse(_with) performance)
 - rust-lang#118182 (Properly recover from trailing attr in body)
 - rust-lang#119641 (Remove feature not required by `Ipv6Addr::to_cononical` doctest)
 - rust-lang#119759 (Add FileCheck annotations to dataflow-const-prop tests)
 - rust-lang#120275 (Avoid ICE in trait without `dyn` lint)
 - rust-lang#120376 (Update codegen test for LLVM 18)
 - rust-lang#120386 (ScopeTree: remove destruction_scopes as unused)
 - rust-lang#120398 (Improve handling of numbers in `IntoDiagnosticArg`)
 - rust-lang#120399 (Remove myself from review rotation)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job test-various failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
failures:

---- [mir-opt] tests/mir-opt/dataflow-const-prop/terminator.rs stdout ----

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/dataflow-const-prop/terminator/terminator.mir" "/checkout/tests/mir-opt/dataflow-const-prop/terminator.rs" "--allow-unused-prefixes" "--check-prefixes" "CHECK,NONMSVC" "--dump-input-context" "100"
Build completed unsuccessfully in 0:16:41
--- stderr -------------------------------
/checkout/tests/mir-opt/dataflow-const-prop/terminator.rs:12:12: error: CHECK: expected string not found in input
/checkout/tests/mir-opt/dataflow-const-prop/terminator.rs:12:12: error: CHECK: expected string not found in input
 // CHECK: {{_.*}} = foo(const 2_i32) -> [return: {{bb.*}}, unwind continue];
           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/dataflow-const-prop/terminator/terminator.mir:13:9: note: scanning from here
        ^
        ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/dataflow-const-prop/terminator/terminator.mir:32:2: note: possible intended match here
 _2 = foo(const 2_i32) -> [return: bb1, unwind unreachable];

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/dataflow-const-prop/terminator/terminator.mir
Check file: /checkout/tests/mir-opt/dataflow-const-prop/terminator.rs


-dump-input=help explains the following input dump.
Input was:
<<<<<<
<<<<<<
            1: // WARNING: This output format is intended for human consumers only 
            2: // and is subject to change without notice. Knock yourself out. 
            3: fn foo(_1: i32) -> () { 
            4:  debug n => _1; 
            5:  let mut _0: (); 
            6:  
            7:  bb0: { 
            8:  _0 = const (); 
            9:  return; 
           10:  } 
           11: } 
           13: fn main() -> () { 
           13: fn main() -> () { 
check:12'0             X~~~~~~~~~ error: no match found
           14:  let mut _0: (); 
check:12'0     ~~~~~~~~~~~~~~~~~
           15:  let _1: i32; 
check:12'0     ~~~~~~~~~~~~~~
           16:  let _2: (); 
check:12'0     ~~~~~~~~~~~~~
           17:  let mut _3: i32; 
check:12'0     ~~~~~~~~~~~~~~~~~~
           18:  let mut _4: i32; 
check:12'0     ~~~~~~~~~~~~~~~~~~
           19:  scope 1 { 
check:12'0     ~~~~~~~~~~~
           20:  debug a => _1; 
check:12'0     ~~~~~~~~~~~~~~~~
           21:  } 
check:12'0     ~~~
           22:  
check:12'0     ~
           23:  bb0: { 
check:12'0     ~~~~~~~~
           24:  StorageLive(_1); 
check:12'0     ~~~~~~~~~~~~~~~~~~
           25:  _1 = const 1_i32; 
check:12'0     ~~~~~~~~~~~~~~~~~~~
           26:  StorageLive(_2); 
check:12'0     ~~~~~~~~~~~~~~~~~~
           27:  StorageLive(_3); 
check:12'0     ~~~~~~~~~~~~~~~~~~
           28:  StorageLive(_4); 
check:12'0     ~~~~~~~~~~~~~~~~~~
           29:  _4 = const 1_i32; 
check:12'0     ~~~~~~~~~~~~~~~~~~~
           30:  _3 = const 2_i32; 
check:12'0     ~~~~~~~~~~~~~~~~~~~
           31:  StorageDead(_4); 
check:12'0     ~~~~~~~~~~~~~~~~~~
           32:  _2 = foo(const 2_i32) -> [return: bb1, unwind unreachable]; 
check:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:12'1      ?                                                            possible intended match
           33:  } 
check:12'0     ~~~
           34:  
check:12'0     ~
           35:  bb1: { 
check:12'0     ~~~~~~~~
           36:  StorageDead(_3); 
check:12'0     ~~~~~~~~~~~~~~~~~~
           37:  StorageDead(_2); 
check:12'0     ~~~~~~~~~~~~~~~~~~
           38:  _0 = const (); 
check:12'0     ~~~~~~~~~~~~~~~~
           39:  StorageDead(_1); 
check:12'0     ~~~~~~~~~~~~~~~~~~
           40:  return; 
check:12'0     ~~~~~~~~~
           41:  } 
check:12'0     ~~~
           42: } 
check:12'0     ~~
------------------------------------------



@bors
Copy link
Contributor

bors commented Jan 27, 2024

💔 Test failed - checks-actions

@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 Jan 27, 2024
@Nadrieril Nadrieril closed this Jan 27, 2024
@Nadrieril Nadrieril deleted the rollup-soxhics branch January 31, 2024 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself rollup A PR which is a rollup 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.