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

Closed
wants to merge 20 commits into from

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Jan 8, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

try-job: i686-mingw

surban and others added 20 commits December 18, 2024 11:33
This always falls back to sleeping since there is no way
to notify a condvar on a target without threads.
it's still partially a skeleton, but works well enough for almost all tests to pass
this is to remove the entire `util` module
it's been simplified over the years, but now it's no longer useful.

- document its replacement in `BorrowKind`
- use that everywhere instead
push constraint creation to where the statement/terminator info is gathered
…r=m-ou-se

Condvar: implement wait_timeout for targets without threads

This always falls back to sleeping since there is no way to notify a condvar on a target without threads.

Even on a target that has no threads the following code is a legitimate use case:

```rust
use std::sync::{Condvar, Mutex};
use std::time::Duration;

fn main() {
    let cv = Condvar::new();
    let mutex = Mutex::new(());
    let mut guard = mutex.lock().unwrap();

    cv.notify_one();

    let res;
    (guard, res) = cv.wait_timeout(guard, Duration::from_secs(3)).unwrap();
    assert!(res.timed_out());
}
```
…kh726

Convert typeck constraints in location-sensitive polonius

In this PR, we do a big chunk of the work of localizing regular outlives constraints.

The slightly annoying thing is handling effectful statements: usually the subset graph propagates loans at a single point between regions, and liveness propagates loans between points within a single region, but some statements have effects applied on exit.

This was also a problem before, in datalog polonius terms and Niko's solution at the time, this is about: the mid-point. The idea was to duplicate all MIR locations into two physical points, and orchestrate the effects with that. Somewhat easier to do, but double the CFG.

We've always believed we didn't _need_ midpoints in principle, as we can represent changes on exit as on happening entry to the successor, but there's some difficulty in tracking the position information at sufficient granularity through outlives relation (especially since we also have bidirectional edges and time-traveling now).

Now, that is surely what we should be doing in the future. In the mean time, I infer this from the kind of statement/terminator where an outlives constraint arose. It's not particularly complicated but some explanation will help clarify the code.

Assignments (in their various forms) are the quintessential example of these crossover cases: loans that would flow into the LHS would not be visible on entry to the point but on exit -- so we'll localize these edges to the successor. Let's look at a real-world example, involving invariance for bidirectional edges:

```rust
let mut _1: HashMap<i32, &'7 i32>;
let mut _3: &'9 mut HashMap<i32, &'10 i32>;
...
/* at bb1[3]: */ _3 = &'3 mut _1;
```

Here, typeck expectedly produces 3 outlives constraints today:
1. `'3 -> '9`
2. `'7 -> '10`
3. `'10 -> '7`

And we localize them like so,

1. `'3 -> '9` flows into the LHS and becomes: `3_bb1_3 -> 9_bb1_4`
2. `'7 -> '10` flows into the LHS and becomes: `7_bb1_3 -> 10_bb1_4`
3. `'10 -> '7` flows from the LHS and becomes: `10_bb1_4 -> 7_bb1_3` (time traveling 👌)

---

r? `@jackh726`

To keep you entertained during the holidays I also threw in a couple of small changes removing cruft in the borrow checker.

We're actually getting there. The next PR will be the last one needed to get end-to-end tests working.
…r=cuviper

triagebot: register `relnotes-interest-group` ping group

Part of rust-lang#133334.
rust-lang/team#1613 merged.
cc T-release discussions in https://rust-lang.zulipchat.com/#narrow/channel/241545-t-release/topic/Please.20CC.20lang

r? release
More compelling env_clear() examples

`ls` isn't a command that people usually set env vars for, and `PATH` in particular isn't even used by `ls`.
…ingjubilee

Reserve x18 register for aarch64 wrs vxworks target

Fixes rust-lang#135166
r? `@workingjubilee`

Regards,
B I Abbas
…jubilee

arm: add unstable soft-float target feature

This has an actual usecase as mentioned [here](rust-lang#116344 (comment)), and with my recent ARM float ABI changes there shouldn't be any soundness concerns any more. We will reject enabling this feature on `hf` targets, but disabling it on non-`hf` targets is entirely fine -- the target feature refers to whether softfloat emulation is used for float instructions, and is independent of the ABI which we set separately via `llvm_floatabi`.

Cc `@workingjubilee`
…rrors

warn about broken simd not only on structs but also enums and unions when we didn't opt in to it

addresses rust-lang#135208 (comment)

r? `@Noratrieb`
@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 8, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jan 8, 2025

📌 Commit 846a9c4 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 Jan 8, 2025
@bors
Copy link
Contributor

bors commented Jan 8, 2025

⌛ Testing commit 846a9c4 with merge ea70a41...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 8, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#134389 (Condvar: implement wait_timeout for targets without threads)
 - rust-lang#134920 (Convert typeck constraints in location-sensitive polonius)
 - rust-lang#135032 (triagebot: register `relnotes-interest-group` ping group)
 - rust-lang#135176 (More compelling env_clear() examples)
 - rust-lang#135184 (Reserve x18 register for aarch64 wrs vxworks target)
 - rust-lang#135203 (arm: add unstable soft-float target feature)
 - rust-lang#135219 (warn about broken simd not only on structs but also enums and unions when we didn't opt in to it)

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

The job i686-mingw failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests\ui\backtrace\backtrace.rs stdout ----

error: test run failed!
status: exit code: 101
command: PATH="C:\a\rust\rust\build\i686-pc-windows-gnu\stage2\lib\rustlib\i686-pc-windows-gnu\lib;C:\a\rust\rust\build\i686-pc-windows-gnu\stage0-bootstrap-tools\i686-pc-windows-gnu\release\deps;C:\a\rust\rust\build\i686-pc-windows-gnu\stage0\bin;C:\a\_temp\msys64\mingw32\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\mingw32\bin;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.2\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\\i686-pc-windows-gnu\\test\\ui\\backtrace\\backtrace\\a.exe"
--- stderr -------------------------------

thread 'main' panicked at C:\a\rust\rust\tests\ui\backtrace\backtrace.rs:103:9:
bad output3: 
---
   5:  0x12f9038 - <unknown>
   6: 0x77622f90 - <unknown>
   7: 0x775f4043 - <unknown>
   8: 0x7762097a - <unknown>
   9: 0x77658aff - <unknown>
  10: 0x77613a3c - <unknown>
  11:   0x5c0032 - <unknown>
  12:   0x620064 - _register_frame_ctor
  13:   0x680067 - <unknown>
  14:   0x6c0065 - <unknown>
  15:   0x2e0070 - <unknown>
  16:   0x6c0064 - <unknown>
thread 'main' panicked at library\core\src\panicking.rs:226:5:
panic in a destructor during cleanup
thread caused non-unwinding panic. aborting.

---
test result: FAILED. 17842 passed; 1 failed; 360 ignored; 0 measured; 23 filtered out; finished in 904.70s

Some tests failed in compiletest suite=ui mode=ui host=i686-pc-windows-gnu target=i686-pc-windows-gnu
Build completed unsuccessfully in 1:02:13
make: *** [Makefile:115: ci-mingw-x] Error 1
  network time: Wed, 08 Jan 2025 05:10:56 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 Jan 8, 2025

💔 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 8, 2025
@matthiaskrgr
Copy link
Member Author

@bors try

@bors
Copy link
Contributor

bors commented Jan 8, 2025

⌛ Trying commit 846a9c4 with merge f5007e1e45f2797bfdfaab1a22a03c7790998868...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 8, 2025
Rollup of 7 pull requests

Successful merges:

 - rust-lang#134389 (Condvar: implement wait_timeout for targets without threads)
 - rust-lang#134920 (Convert typeck constraints in location-sensitive polonius)
 - rust-lang#135032 (triagebot: register `relnotes-interest-group` ping group)
 - rust-lang#135176 (More compelling env_clear() examples)
 - rust-lang#135184 (Reserve x18 register for aarch64 wrs vxworks target)
 - rust-lang#135203 (arm: add unstable soft-float target feature)
 - rust-lang#135219 (warn about broken simd not only on structs but also enums and unions when we didn't opt in to it)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: i686-mingw
@bors
Copy link
Contributor

bors commented Jan 8, 2025

☀️ Try build successful - checks-actions
Build commit: f5007e1 (f5007e1e45f2797bfdfaab1a22a03c7790998868)

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.

10 participants