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 #100997

Closed
wants to merge 27 commits into from
Closed

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

dtolnay and others added 27 commits August 17, 2022 17:20
…keyword

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commit migrates the errors that indicates an incorrect
CGU type and the fatal error that indicates that a CGU has
not been correctly recorded
This commit migrates around 80% of the parse file to use SsessionDiagnostic
We still have to migrate struct_err and struct_warn.
This commit migrates the errors in the function check_expected_reuse
to use the new SessionDiagnostic. It also does some small refactor
for the IncorrectCguReuseType to include the 'at least' word in the
fluent translation file
A resume place is evaluated and assigned to only after a yield
terminator resumes. Ensure that locals used when evaluating the
resume place are live across the yield.
so that it is the only pass responsible for elaboration, instead of
splitting this responsibility between the `StateTransform` and
`ElaborateBoxDerefs`.
…i-obk

 Elaborate all box dereferences in `ElaborateBoxDerefs`

so that it is the only pass responsible for elaboration, instead of
splitting this responsibility between the `StateTransform` and
`ElaborateBoxDerefs`.
Remove unstable Result::into_ok_or_err

Pending FCP: rust-lang#82223 (comment)

`@rustbot` label +waiting-on-fcp
…, r=thomcc

Use `DisplayBuffer` for socket addresses.

Continuation of rust-lang#100625 for socket addresses.

Renames `net::addr` to `net::addr::socket`, `net::ip` to `net::addr::ip` and `net::ip::display_buffer::IpDisplayBuffer` to `net::addr::display_buffer::DisplayBuffer`.
…i-obk

Avoid reporting overflow in `is_impossible_method`

Fixes rust-lang#100620

We're evaluating a new predicate in a different param-env than it was checked during typeck, so be more careful about handling overflow errors. Instead of using `FulfillmentCtxt`, using `InferCtxt::evaluate_obligation` by itself will give us back the overflow error, so we can throw it away properly.

This may give us more false-positives, but it doesn't regress the `<HashMap as Iterator>::rev` example that originally motivated adding `is_impossible_method` in the first place.
…grate-session, r=davidtwco

translations(rustc_session): migrates `rustc_session` to use `SessionDiagnostic` - Pt. 1

## Description

This is the first PR for the migration of the module `rustc_session`. You can follow my progress [here](rust-lang#100717 (comment)).

The PR migrates the files `cgu_reuse_tracker` and `parse.rs` to use `SessionDiagnostic `.
…t_real_intrinsic, r=oli-obk,RalfJung

Make `const_eval_select` a real intrinsic

This fixes issues where `track_caller` functions do not have nice panic
messages anymore when there is a call to the function, and uses the
MIR system to replace the call instead of dispatching via lang items.

Fixes rust-lang#100696.
…ng_sugg, r=davidtwco

sugg: suggest the usage of boolean value when there is a typo in the keyword

Fixes rust-lang#100686

This adds a new suggestion when there is a well-known typo

With the following program

```rust
fn main() {
    let x = True;
}
```

Now we have the following suggestion

```
error[E0425]: cannot find value `True` in this scope
 --> test.rs:2:13
  |
2 |     let x = True;
  |             ^^^^ not found in this scope
  |
help: you may want to use a bool value instead
  |
2 |     let x = true;
  |             ~~~~

error: aborting due to previous error
```

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
extra sanity check against consts pointing to mutable memory

This should be both unreachable and redundant (since we already ensure that validation only reads from read-only memory, when validating consts), but I feel like we cannot be paranoid enough here, and also if this ever fails it'll be a nicer error than the "cannot read from mutable memory" error.
…r=JoshTriplett

Reduce code size of `assert_matches_failed`

Using `write_str` instead of `<str as Display>::fmt` avoids the `pad` function which is very expensive to have in size-constrained code.
@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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. labels Aug 25, 2022
@rustbot rustbot added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Aug 25, 2022
@Dylan-DPC
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Aug 25, 2022

📌 Commit 70f2b57 has been approved by Dylan-DPC

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 25, 2022
@bors
Copy link
Contributor

bors commented Aug 25, 2022

⌛ Testing commit 70f2b57 with merge 86760fc182ee0470d7f1b018a0cbb92b0c4172a9...

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-stable failed! Check out the build log: (web) (plain)

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

---- [codegen] src/test/codegen/alloc-optimisation.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/alloc-optimisation/alloc-optimisation.ll" "/checkout/src/test/codegen/alloc-optimisation.rs" "--allow-unused-prefixes" "--check-prefixes" "CHECK,NONMSVC"
stdout: none
--- stderr -------------------------------
/checkout/src/test/codegen/alloc-optimisation.rs:10:17: error: CHECK-NEXT: is not on the line after the previous match
 // CHECK-NEXT: ret void
                ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/alloc-optimisation/alloc-optimisation.ll:13:2: note: 'next' match was here
 ret void
 ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/alloc-optimisation/alloc-optimisation.ll:8:7: note: previous match ended here
      ^
      ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/alloc-optimisation/alloc-optimisation.ll:9:1: note: non-matching line after previous match is here
; call core::mem::valid_align::ValidAlign::new_unchecked::runtime

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/alloc-optimisation/alloc-optimisation.ll
Check file: /checkout/src/test/codegen/alloc-optimisation.rs


-dump-input=help explains the following input dump.
Input was:
<<<<<<
         .
         .
         .
         .
         8: start: 
         9: ; call core::mem::valid_align::ValidAlign::new_unchecked::runtime 
        10:  tail call void @_ZN4core3mem11valid_align10ValidAlign13new_unchecked7runtime17hb98b1e4b3c334143E(i64 4) 
        11: ; call core::mem::valid_align::ValidAlign::new_unchecked::runtime 
        12:  tail call void @_ZN4core3mem11valid_align10ValidAlign13new_unchecked7runtime17hb98b1e4b3c334143E(i64 4) 
        13:  ret void 
next:10      !~~~~~~~  error: match on wrong line
        14: } 
        15:  
        16: ; Function Attrs: nonlazybind uwtable 
        17: declare noundef i32 @rust_eh_personality(i32, i32 noundef, i64, ptr, ptr) unnamed_addr #0 
         .
         .
         .
>>>>>>
>>>>>>
------------------------------------------


---- [codegen] src/test/codegen/issue-96497-slice-size-nowrap.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/issue-96497-slice-size-nowrap/issue-96497-slice-size-nowrap.ll" "/checkout/src/test/codegen/issue-96497-slice-size-nowrap.rs" "--allow-unused-prefixes" "--check-prefixes" "CHECK,NONMSVC"
stdout: none
--- stderr -------------------------------
/checkout/src/test/codegen/issue-96497-slice-size-nowrap.rs:27:16: error: CHECK-NOT: excluded string found in input
 // CHECK-NOT: store i32 42
               ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/issue-96497-slice-size-nowrap/issue-96497-slice-size-nowrap.ll:49:2: note: found here
 store i32 42, ptr %3, align 4

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/issue-96497-slice-size-nowrap/issue-96497-slice-size-nowrap.ll
Check file: /checkout/src/test/codegen/issue-96497-slice-size-nowrap.rs


-dump-input=help explains the following input dump.
Input was:
<<<<<<
        .
        .
        .
        .
       44:  %_4 = icmp ugt i64 %1, 1 
       45:  br i1 %_4, label %"_ZN4core3ptr59drop_in_place$LT$alloc..boxed..Box$LT$$u5b$u32$u5d$$GT$$GT$17h6502bb08e5eb122dE.exit", label %panic, !prof !3 
       46:  
       47: "_ZN4core3ptr59drop_in_place$LT$alloc..boxed..Box$LT$$u5b$u32$u5d$$GT$$GT$17h6502bb08e5eb122dE.exit": ; preds = %start 
       48:  %3 = getelementptr inbounds [0 x i32], ptr %0, i64 0, i64 1 
       49:  store i32 42, ptr %3, align 4 
not:27      !~~~~~~~~~~~                   error: no match expected
       50: ; call core::mem::valid_align::ValidAlign::new_unchecked::runtime 
       51:  tail call void @_ZN4core3mem11valid_align10ValidAlign13new_unchecked7runtime17hb98b1e4b3c334143E(i64 4) 
       52:  %4 = shl nsw i64 %1, 2 
       53:  tail call void @__rust_dealloc(ptr nonnull %0, i64 %4, i64 4) #5 
       54:  ret void 
        .
        .
>>>>>>
------------------------------------------

@bors
Copy link
Contributor

bors commented Aug 25, 2022

💔 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 25, 2022
@JohnTitor JohnTitor closed this Aug 25, 2022
@davidtwco davidtwco removed the A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic label Oct 4, 2022
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. 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.

None yet