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 8 pull requests #132288

Closed
wants to merge 21 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

dingxiangfei2009 and others added 21 commits October 24, 2024 04:33
Improve identation, and a few other rvalue printing
Clarified what method does when `truncate` parameter is set to `true`.
Add a comma between function arguments
Co-authored-by: nora <48135649+Noratrieb@users.noreply.github.com>
It was useful at one time, but now it just causes notification noise.
+ some minor style changes
After moving some `Box` internals to a different module,
the path in the diagnostic changed.
…rescope, r=traviscross,lcnr

Stabilize if_let_rescope

Close rust-lang#131154
Tracked by rust-lang#124085
…utlives, r=spastorino

Ensure that resume arg outlives region bound for coroutines

When proving that `{Coroutine}: 'region`, we must also prove that the coroutine's resume ty outlives that region as well. See the inline comment.

Fixes rust-lang#132104
…er-errors

[StableMIR] A few fixes to pretty printing

Improve identation, and a few other rvalue printing
…=spastorino

Collect item bounds for RPITITs from trait where clauses just like associated types

We collect item bounds from trait where clauses for *associated types*, i.e. this:

```rust
trait Foo
where
    Self::Assoc: Send
{
    type Assoc;
}
```

Becomes this:

```rust
trait Foo {
    type Assoc: Send;
}
```

Today, with RPITITs/AFIT and return-type notation, we don't do that, i.e.:

```rust
trait Foo where Self::method(..): Send {
    fn method() -> impl Sized;
}

fn is_send(_: impl Send) {}
fn test<T: Foo>() {
    is_send(T::method());
}
```

...which fails on nightly today.

 Turns out it's super easy to fix this, and we just need to use the `associated_type_bounds` lowering function in `explicit_item_bounds_with_filter`, which has that logic baked in.
…orkingjubilee

Split `boxed.rs` into a few modules

I wanted to add an impl for `Box<_>`, but was quickly discouraged by the 3K file. This splits off a couple bits, making it at least a bit more manageable.

r? `@workingjubilee` (I think you are not bothered by refactorings like this?)
…oratrieb

clarified doc for `std::fs::OpenOptions.truncate()`

Clarified what method does when `std::fs::OpenOptions.truncate()` parameter is set to `true`.
Remove my ping for rustdoc/clean/types.rs

It was useful at one time, but now it just causes notification noise.
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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 Oct 28, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Oct 28, 2024

📌 Commit 13df465 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 Oct 28, 2024
@bors
Copy link
Contributor

bors commented Oct 28, 2024

⌛ Testing commit 13df465 with merge 8476fe6...

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 28, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#131375 (compiler: apply clippy::clone_on_ref_ptr for CI)
 - rust-lang#131984 (Stabilize if_let_rescope)
 - rust-lang#132151 (Ensure that resume arg outlives region bound for coroutines)
 - rust-lang#132161 ([StableMIR] A few fixes to pretty printing)
 - rust-lang#132194 (Collect item bounds for RPITITs from trait where clauses just like associated types)
 - rust-lang#132233 (Split `boxed.rs` into a few modules)
 - rust-lang#132270 (clarified doc for `std::fs::OpenOptions.truncate()`)
 - rust-lang#132284 (Remove my ping for rustdoc/clean/types.rs)

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

The job x86_64-msvc 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\operands.rs stdout ----
$DIR\operands.rs
$DIR\operands.rs
\a\rust\rust\tests\ui\stable-mir-print\operands.rs
$DIR\operands.rs
Saved the actual stdout to "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\ui\\stable-mir-print\\operands\\operands.stdout"


226     debug x => _1;
227     debug z => _2;
228     bb0: {
-         _0 = {closure@Span { id: 105, repr: "$DIR/operands.rs:44:5: 44:19" }}(_1, _2);
+         _0 = {closure@Span { id: 105, repr: "C:/a/rust/rust/tests/ui/stable-mir-print/operands.rs:44:5: 44:19" }}(_1, _2);
231     }
232 }



The actual stdout differed from the expected stdout.
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args stable-mir-print\operands.rs`

error: 1 errors occurred comparing output.
status: exit code: 0
command: PATH="C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage2\bin;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64;C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage0-bootstrap-tools\x86_64-pc-windows-msvc\release\deps;C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage0\bin;C:\Program Files\PowerShell\7;C:\a\_temp\msys64\mingw64\bin;C:\a\_temp\msys64\usr\local\bin;C:\a\_temp\msys64\usr\bin;C:\a\_temp\msys64\usr\bin;C:\a\rust\rust\ninja;C:\a\rust\rust\sccache;C:\a\_temp\setup-msys2;C:\Program Files\MongoDB\Server\5.0\bin;C:\aliyun-cli;C:\vcpkg;C:\Program Files (x86)\NSIS;C:\tools\zstd;C:\Program Files\Mercurial;C:\hostedtoolcache\windows\stack\3.1.1\x64;C:\cabal\bin;C:\ghcup\bin;C:\mingw64\bin;C:\Program Files\dotnet;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files\R\R-4.4.1\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\SeleniumWebDrivers\EdgeDriver;C:\SeleniumWebDrivers\ChromeDriver;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\bin;C:\Program Files (x86)\pipx_bin;C:\npm\prefix;C:\hostedtoolcache\windows\go\1.21.13\x64\bin;C:\hostedtoolcache\windows\Python\3.9.13\x64\Scripts;C:\hostedtoolcache\windows\Python\3.9.13\x64;C:\hostedtoolcache\windows\Ruby\3.0.7\x64\bin;C:\Program Files\OpenSSL\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\8.0.432-6\x64\bin;C:\Program Files\ImageMagick-7.1.1-Q16-HDRI;C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\ProgramData\Chocolatey\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\dotnet;C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\WiX Toolset v3.14\bin;C:\Program Files\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Microsoft SQL Server\160\DTS\Binn;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program Files\CMake\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.8.7\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\GitHub CLI;C:\tools\php;C:\Program Files (x86)\sbt\bin;C:\Program Files\Amazon\AWSCLIV2;C:\Program Files\Amazon\SessionManagerPlugin\bin;C:\Program Files\Amazon\AWSSAMCLI\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\LLVM\bin;C:\Users\runneradmin\.dotnet\tools;C:\Users\runneradmin\.cargo\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps;C:\a\_temp\msys64\usr\bin\site_perl;C:\a\_temp\msys64\usr\bin\vendor_perl;C:\a\_temp\msys64\usr\bin\core_perl" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustc.exe" "C:\\a\\rust\\rust\\tests\\ui\\stable-mir-print\\operands.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=C:\\Users\\runneradmin\\.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=C:\\a\\rust\\rust\\vendor" "--sysroot" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2" "--target=x86_64-pc-windows-msvc" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\ui\\stable-mir-print\\operands" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\native\\rust-test-helpers" "-Z" "unpretty=stable-mir" "--crate-type" "lib" "-C" "panic=abort"
// WARNING: This is highly experimental output it's intended for stable-mir developers only.
// 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 operands(_1: u8) -> () {
    let mut _0: ();
    let  _2: [u8; 10];
    let  _3: u8;
    let  _4: usize;
    let mut _5: usize;
    let mut _6: bool;
    let  _7: u8;
    let  _8: usize;
    let mut _9: (usize, bool);
    let mut _10: usize;
    let mut _11: bool;
    let mut _12: (&u8, &u8);
    let mut _13: &u8;
    let mut _14: &u8;
    let  _15: &u8;
    let  _16: &u8;
    let mut _17: bool;
    let mut _18: u8;
    let mut _19: u8;
    let  _20: core::panicking::AssertKind;
    let  _21: !;
    let mut _22: Option<Arguments<'_>>;
    let  _23: &u8;
    let  _24: u8;
    let mut _25: (&u8, &u8);
    let mut _26: &u8;
    let mut _27: &u8;
    let  _28: &u8;
    let  _29: &u8;
    let mut _30: bool;
    let mut _31: u8;
    let mut _32: u8;
    let  _33: core::panicking::AssertKind;
    let  _34: !;
    let mut _35: Option<Arguments<'_>>;
    let  _36: (u8, u8);
    let  _37: u8;
    let  _38: u8;
    let mut _39: (&u8, &u8);
    let mut _40: &u8;
    let mut _41: &u8;
    let  _42: &u8;
    let  _43: &u8;
    let mut _44: bool;
    let mut _45: u8;
    let mut _46: u8;
    let  _47: core::panicking::AssertKind;
    let  _48: !;
    let mut _49: Option<Arguments<'_>>;
    let  _50: usize;
    let mut _51: &[u8];
    let mut _52: &[u8; 10];
    let  _53: usize;
    let  _54: &usize;
    let mut _55: (&usize, &usize);
    let mut _56: &usize;
    let mut _57: &usize;
    let  _58: &usize;
    let  _59: &usize;
    let mut _60: bool;
    let mut _61: usize;
    let mut _62: usize;
    let  _63: core::panicking::AssertKind;
    let  _64: !;
    let mut _65: Option<Arguments<'_>>;
    debug val => _1;
    debug array => _2;
    debug first => _3;
    debug last => _7;
    debug left_val => _15;
    debug right_val => _16;
    debug kind => _20;
    debug reference => _23;
    debug dereferenced => _24;
    debug left_val => _28;
    debug right_val => _29;
    debug kind => _33;
    debug tuple => _36;
    debug first_again => _37;
    debug first_again_again => _38;
    debug left_val => _42;
    debug right_val => _43;
    debug kind => _47;
    debug length => _50;
    debug size_of => _53;
    debug left_val => _58;
    debug right_val => _59;
    debug kind => _63;
    bb0: {
        _2 = [_1; 10];
        _4 = 0_usize;
        _5 = 10_usize;
        _6 = Lt(_4, _5);
        assert(move _6, "index out of bounds: the length is {} but the index is {}", move _5, _4) -> [success: bb1, unwind unreachable];
    bb1: {
        _3 = _2[_4];
        _3 = _2[_4];
        _9 = CheckedSub(10_usize, 1_usize);
        assert(!move (_9.1: bool), "attempt to compute `{} - {}`, which would overflow", 10_usize, 1_usize) -> [success: bb2, unwind unreachable];
    bb2: {
    bb2: {
        _8 = move (_9.0: usize);
        _10 = 10_usize;
        _11 = Lt(_8, _10);
        assert(move _11, "index out of bounds: the length is {} but the index is {}", move _10, _8) -> [success: bb3, unwind unreachable];
    bb3: {
        _7 = _2[_8];
        _13 = &_3;
        _14 = &_7;
        _14 = &_7;
        _12 = (move _13, move _14);
        _15 = (_12.0: &u8);
        _16 = (_12.1: &u8);
        _18 = (*_15);
        _19 = (*_16);
        _17 = Eq(move _18, move _19);
        switchInt(move _17) -> [0: bb5, otherwise: bb4];
    bb4: {
        _23 = &_3;
        _24 = (*_23);
        _26 = &_24;
        _26 = &_24;
        _27 = &_3;
        _25 = (move _26, move _27);
        _28 = (_25.0: &u8);
        _29 = (_25.1: &u8);
        _31 = (*_28);
        _32 = (*_29);
        _30 = Eq(move _31, move _32);
        switchInt(move _30) -> [0: bb7, otherwise: bb6];
    bb5: {
        _20 = core::panicking::AssertKind::Eq;
        _22 = std::option::Option::None;
        _22 = std::option::Option::None;
        _21 = core::panicking::assert_failed::<u8, u8>(move _20, _15, _16, move _22) -> unwind unreachable;
    bb6: {
        _36 = (_3, _7);
        _37 = (_36.0: u8);
        _38 = (_36.0: u8);
        _38 = (_36.0: u8);
        _40 = &_37;
        _41 = &_38;
        _39 = (move _40, move _41);
        _42 = (_39.0: &u8);
        _43 = (_39.1: &u8);
        _45 = (*_42);
        _46 = (*_43);
        _44 = Eq(move _45, move _46);
        switchInt(move _44) -> [0: bb9, otherwise: bb8];
    bb7: {
        _33 = core::panicking::AssertKind::Eq;
        _35 = std::option::Option::None;
        _35 = std::option::Option::None;
        _34 = core::panicking::assert_failed::<u8, u8>(move _33, _28, _29, move _35) -> unwind unreachable;
    bb8: {
        _52 = &_2;
        _52 = &_2;
        _51 = move _52 as &[u8];
        _50 = PtrMetadata(move _51);
        _54 = &_50;
        _53 = std::mem::size_of_val::<usize>(_54) -> [return: bb10, unwind unreachable];
    bb9: {
        _47 = core::panicking::AssertKind::Eq;
        _49 = std::option::Option::None;
        _49 = std::option::Option::None;
        _48 = core::panicking::assert_failed::<u8, u8>(move _47, _42, _43, move _49) -> unwind unreachable;
    bb10: {
        _56 = &_50;
        _57 = &_53;
        _57 = &_53;
        _55 = (move _56, move _57);
        _58 = (_55.0: &usize);
        _59 = (_55.1: &usize);
        _61 = (*_58);
        _62 = (*_59);
        _60 = Eq(move _61, move _62);
        switchInt(move _60) -> [0: bb12, otherwise: bb11];
    bb11: {
        return;
    }
    bb12: {
    bb12: {
        _63 = core::panicking::AssertKind::Eq;
        _65 = std::option::Option::None;
        _64 = core::panicking::assert_failed::<usize, usize>(move _63, _58, _59, move _65) -> unwind unreachable;
}
}
fn operands::{constant#0}() -> usize {
    let mut _0: usize;
    bb0: {
        _0 = 10_usize;
    }
}
}
fn more_operands() -> [Ctors; 3] {
    let mut _0: [Ctors; 3];
    let  _1: Dummy;
    let  _2: Ctors;
    let  _3: Ctors;
    let  _4: Ctors;
    debug dummy => _1;
    debug unit => _2;
    debug struct_like => _3;
    debug tup_like => _4;
    bb0: {
        _1 = Dummy('a', core::num::<impl i32>::MIN);
        _2 = Ctors::Unit;
        _3 = Ctors::StructLike(move _1);
        _4 = Ctors::TupLike(false);
        _0 = [move _2, move _3, move _4];
    }
}
}
fn more_operands::{constant#0}() -> usize {
    let mut _0: usize;
    bb0: {
        _0 = 3_usize;
    }
}
}
fn closures(_1: bool, _2: bool) -> {closure@C:\a\rust\rust\tests\ui\stable-mir-print\operands.rs:44:5: 44:19} {
    let mut _0: {closure@C:\a\rust\rust\tests\ui\stable-mir-print\operands.rs:44:5: 44:19};
    debug x => _1;
    debug z => _2;
    bb0: {
        _0 = {closure@Span { id: 105, repr: "C:\\a\\rust\\rust\\tests\\ui\\stable-mir-print\\operands.rs:44:5: 44:19" }}(_1, _2);
    }
}
}
fn closures::{closure#0}(_1: {closure@C:\a\rust\rust\tests\ui\stable-mir-print\operands.rs:44:5: 44:19}, _2: bool) -> bool {
    let mut _0: bool;
    let mut _3: bool;
    let mut _4: bool;
    debug y => _2;
    debug x => (_1.0: bool);
    debug z => (_1.1: bool);
    bb0: {
        _4 = (_1.0: bool);
        _3 = BitXor(move _4, _2);
        switchInt(move _3) -> [0: bb2, otherwise: bb1];
    bb1: {
        _0 = true;
        goto -> bb3;
    }
---
    bb3: {
        return;
    }
}
fn Ctors::TupLike(_1: bool) -> Ctors {
    let mut _0: Ctors;
    bb0: {
        _0 = Ctors::TupLike(move _1);
    }
}
------------------------------------------
stderr: none
---
test result: FAILED. 17600 passed; 1 failed; 269 ignored; 0 measured; 2 filtered out; finished in 409.63s

Some tests failed in compiletest suite=ui mode=ui host=x86_64-pc-windows-msvc target=x86_64-pc-windows-msvc
Build completed unsuccessfully in 0:46:10
make: *** [Makefile:106: ci-msvc-ps1] Error 1
  network time: Tue, 29 Oct 2024 00:22:05 GMT
##[error]Process completed with exit code 2.
Post job cleanup.
[command]"C:\Program Files\Git\bin\git.exe" version

@bors
Copy link
Contributor

bors commented Oct 29, 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 Oct 29, 2024
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 A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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.