Skip to content

Rollup of 3 pull requests #118932

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 6 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jyn514 and others added 6 commits December 9, 2023 15:19
…=celinval

Add -Zunpretty=stable-mir output test

As strongly suggested here rust-lang#118364 (comment) this adds output test for `-Zunpretty=stable-mir`, added test shows almost all the functionality of the current printer.

r? `@compiler-errors`
…affleLapkin

fix dynamic size/align computation logic for packed types with dyn trait tail

This logic was never updated to support `packed(N)` where `N > 1`, and it turns out to be wrong for that case.

Fixes rust-lang#80925

`@bjorn3` I have not looked at cranelift; I assume it basically copied the size-of-val logic and hence could use much the same patch.
fix --dry-run when the change-id warning is printed

previously:
```
Building bootstrap
   Compiling bootstrap v0.0.0 (/home/jyn/src/rust2/src/bootstrap)
    Finished dev [unoptimized] target(s) in 4.23s
thread 'main' panicked at src/bin/main.rs:147:17:
fs::write(warned_id_path, latest_change_id.to_string()) failed with No such file or directory (os error 2)
```
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. rollup A PR which is a rollup labels Dec 14, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=3

@bors
Copy link
Collaborator

bors commented Dec 14, 2023

📌 Commit 7b0b2d0 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 Dec 14, 2023
@bors
Copy link
Collaborator

bors commented Dec 14, 2023

⌛ Testing commit 7b0b2d0 with merge 858f2a3...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 14, 2023
…iaskrgr

Rollup of 3 pull requests

Successful merges:

 - rust-lang#118375 (Add -Zunpretty=stable-mir output test)
 - rust-lang#118538 (fix dynamic size/align computation logic for packed types with dyn trait tail)
 - rust-lang#118789 (fix --dry-run when the change-id warning is printed)

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)
---- [ui] tests/ui/stable-mir-print/basic_function.rs stdout ----
diff of stdout:

5 }
6     bb0: {
7         _2 = 1 Add const 1_i32
-         assert(!move _2 bool),"attempt to compute `{} + {}`, which would overflow", 1, const 1_i32) -> [success: bb1, unwind continue]
+         assert(!move _2 bool),"attempt to compute `{} + {}`, which would overflow", 1, const 1_i32) -> [success: bb1, unwind unreachable]
10     bb1: {
11         _0 = move _2

209 }
209 }
210     bb0: {
211         _3 = refShared1
-         _2 = const <Vec<i32> as Clone>::clone(move _3) -> [return: bb1, unwind continue]
+         _2 = const <Vec<i32> as Clone>::clone(move _3) -> [return: bb1, unwind unreachable]
214     bb1: {
215         _5 = refMut {


216     kind: TwoPhaseBorrow,
217 }2
-         _4 = const Vec::<i32>::push(move _5, const 1_i32) -> [return: bb2, unwind: bb3]
+         _4 = const Vec::<i32>::push(move _5, const 1_i32) -> [return: bb2, unwind unreachable]
220     bb2: {
221         _0 = move _2

222         return
222         return
-     }
-     bb3: {
-         drop(_2) -> [return: bb4, unwind terminate]
-     bb4: {
-         resume
229     }
230 fn main() -> () {
---
To only update this specific test, also pass `--test-args stable-mir-print/basic_function.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/stable-mir-print/basic_function.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=wasm32-unknown-unknown" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/stable-mir-print/basic_function" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/wasm32-unknown-unknown/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/stable-mir-print/basic_function/auxiliary" "-Z" "unpretty=stable-mir" "-Z" "mir-opt-level=3"
--- stdout -------------------------------
// WARNING: This is highly experimental output it's intended for stable-mir developers only.
// If you find a bug or want to improve the output open a issue at https://github.com/rust-lang/project-stable-mir.
fn foo(_0: i32) -> i32 {
    let mut _0: (i32, bool);
    bb0: {
    bb0: {
        _2 = 1 Add const 1_i32
        assert(!move _2 bool),"attempt to compute `{} + {}`, which would overflow", 1, const 1_i32) -> [success: bb1, unwind unreachable]
    bb1: {
        _0 = move _2
        return
    }
---
            ),
        ),
    ),
} {
    let mut _0: Ty {
    id: 10,
    kind: RigidTy(
        Adt(
            AdtDef(
                DefId {
                    id: 3,
                    name: "std::vec::Vec",
            ),
            GenericArgs(
                [
                    Type(
---
            ),
        ),
    ),
};
    let mut _1: &Ty {
    id: 10,
    kind: RigidTy(
        Adt(
            AdtDef(
                DefId {
                    id: 3,
                    name: "std::vec::Vec",
            ),
            GenericArgs(
                [
                    Type(
---
        ),
    ),
};
}
    bb0: {
        _3 = refShared1
        _2 = const <Vec<i32> as Clone>::clone(move _3) -> [return: bb1, unwind unreachable]
    bb1: {
        _5 = refMut {
        _5 = refMut {
    kind: TwoPhaseBorrow,
}2
        _4 = const Vec::<i32>::push(move _5, const 1_i32) -> [return: bb2, unwind unreachable]
    bb2: {
        _0 = move _2
        return
    }

@bors
Copy link
Collaborator

bors commented Dec 14, 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 Dec 14, 2023
@matthiaskrgr matthiaskrgr deleted the rollup-fi7xzqa branch March 16, 2024 18:19
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants