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 7 pull requests #114857

Closed
wants to merge 22 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

g0djan and others added 22 commits August 8, 2023 11:07
When encountering code like

```rust
fn foo() -> i32 {
    match 0 {
        1 => return 0,
        2 => "",
        _ => 1,
    }
}
```

Point at the return type and not at the prior arm, as that arm has type
`!` which isn't influencing the arm corresponding to arm `2`.

Fix rust-lang#78124.
specify llvm-version and bit width for int arg
This lets us put a version on the impl, too.
…m-ou-se

Improve docs for impl Default for ExitStatus

This addresses a review comment in rust-lang#106425 (which is on the way to being merged I think).

Some of the other followup work is more complicated so I'm going to do individual MRs.

~~Note this branch is on top of rust-lang#106425~~
Point out expectation even if we have `TypeError::RegionsInsufficientlyPolymorphic`

just a minor tweak, since saying "one type is more general than the other" kinda sucks if we don't actually point out two types.
…trochenkov

Deny `FnDef` in patterns

We can only see these via `const { .. }` patterns, which are unstable.

cc rust-lang#76001 (tracking issue for inline const pats)

Fixes rust-lang#114658
Fixes rust-lang#114659
…rrors

Point at return type when it influences non-first `match` arm

When encountering code like

```rust
fn foo() -> i32 {
    match 0 {
        1 => return 0,
        2 => "",
        _ => 1,
    }
}
```

Point at the return type and not at the prior arm, as that arm has type `!` which isn't influencing the arm corresponding to arm `2`.

Fix rust-lang#78124.
… r=nikic

add codegen test for `trailing_zeros` comparison

This PR add codegen test for
rust-lang#107554 (comment)

Fixes rust-lang#107554.
@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. rollup A PR which is a rollup labels Aug 15, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Aug 15, 2023

📌 Commit b0896e1 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 Aug 15, 2023
@bors
Copy link
Contributor

bors commented Aug 15, 2023

⌛ Testing commit b0896e1 with merge 856b37978dd516a11b9d1fd14094725a0565de82...

@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:

---- [codegen] tests/codegen/trailing_zeros.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/codegen/trailing_zeros/trailing_zeros.ll" "/checkout/tests/codegen/trailing_zeros.rs" "--allow-unused-prefixes" "--check-prefixes" "CHECK,NONMSVC" "--dump-input-context" "100"
--- stderr -------------------------------
/checkout/tests/codegen/trailing_zeros.rs:10:12: error: CHECK: expected string not found in input
/checkout/tests/codegen/trailing_zeros.rs:10:12: error: CHECK: expected string not found in input
 // CHECK: %[[ICMP:.*]] = icmp eq i32 [[AND]], 0
           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/trailing_zeros/trailing_zeros.ll:9:22: note: scanning from here
 %0 = and i32 %val, 7
                     ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/trailing_zeros/trailing_zeros.ll:9:22: note: with "AND" equal to "0"
 %0 = and i32 %val, 7
                     ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/trailing_zeros/trailing_zeros.ll:10:2: note: possible intended match here
 %_0 = icmp eq i32 %0, 0
/checkout/tests/codegen/trailing_zeros.rs:19:12: error: CHECK: expected string not found in input
/checkout/tests/codegen/trailing_zeros.rs:19:12: error: CHECK: expected string not found in input
 // CHECK: %[[ICMP:.*]] = icmp eq i64 [[AND]], 0
           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/trailing_zeros/trailing_zeros.ll:17:23: note: scanning from here
 %0 = and i64 %val, 15
                      ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/trailing_zeros/trailing_zeros.ll:17:23: note: with "AND" equal to "0"
 %0 = and i64 %val, 15
                      ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/trailing_zeros/trailing_zeros.ll:18:2: note: possible intended match here
 %_0 = icmp eq i64 %0, 0

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/trailing_zeros/trailing_zeros.ll
Check file: /checkout/tests/codegen/trailing_zeros.rs


-dump-input=help explains the following input dump.
Input was:
<<<<<<
<<<<<<
            1: ; ModuleID = 'trailing_zeros.9e65c6efcd1e645-cgu.0' 
            2: source_filename = "trailing_zeros.9e65c6efcd1e645-cgu.0" 
            3: target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20" 
            4: target triple = "wasm32-unknown-unknown" 
            5:  
            6: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) 
            7: define dso_local noundef zeroext i1 @trailing_zeros_ge(i32 noundef %val) unnamed_addr #0 { 
            8: start: 
            9:  %0 = and i32 %val, 7 
check:10'0                          X error: no match found
check:10'1                            with "AND" equal to "0"
           10:  %_0 = icmp eq i32 %0, 0 
check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
check:10'2      ?                        possible intended match
           11:  ret i1 %_0 
check:10'0     ~~~~~~~~~~~~
           12: } 
check:10'0     ~~
           13:  
check:10'0     ~
           14: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) 
check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           15: define dso_local noundef zeroext i1 @trailing_zeros_gt(i64 noundef %val) unnamed_addr #0 { 
check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           16: start: 
           17:  %0 = and i64 %val, 15 
check:19'0                           X error: no match found
check:19'1                             with "AND" equal to "0"
           18:  %_0 = icmp eq i64 %0, 0 
check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
check:19'2      ?                        possible intended match
           19:  ret i1 %_0 
check:19'0     ~~~~~~~~~~~~
           20: } 
check:19'0     ~~
           21:  
check:19'0     ~
           22: attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) "target-cpu"="generic" } 
check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           23:  
check:19'0     ~
           24: !llvm.ident = !{!0} 
check:19'0     ~~~~~~~~~~~~~~~~~~~~
           25:  
check:19'0     ~
           26: !0 = !{!"rustc version 1.73.0-nightly (856b37978 2023-08-15)"} 
check:19'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------------------



@bors
Copy link
Contributor

bors commented Aug 15, 2023

💔 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 Aug 15, 2023
@matthiaskrgr matthiaskrgr deleted the rollup-k8jq42x branch March 16, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

10 participants