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

Monomorphize OpaqueCast #116145

Closed
wants to merge 1 commit into from
Closed

Conversation

ouz-a
Copy link
Contributor

@ouz-a ouz-a commented Sep 25, 2023

In previous attempt, #116140 we thought OpaqueCast was unused during few places, but we were wrong, in reality we didn't have any test that could test it, so in this pr attempt is to correct the behavior of few OpaqueCasts in rustc.

r? @lcnr

@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. labels Sep 25, 2023
@rustbot
Copy link
Collaborator

rustbot commented Sep 25, 2023

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also change cross_inference_pattern_bug.rs to build-pass?

r=me after that

@ouz-a ouz-a force-pushed the opaque_cast_clean-2 branch from 67fcd79 to 2ba5b1a Compare September 25, 2023 13:58
@@ -0,0 +1,13 @@
// build-pass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really a codegen test, move this to the TAIT test directory

@@ -0,0 +1,13 @@
// build-pass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one as well, while this is a codegen test, it probably makes more sense together with the above test

@ouz-a ouz-a force-pushed the opaque_cast_clean-2 branch from 2ba5b1a to 5bf82ee Compare September 25, 2023 14:04
@ouz-a
Copy link
Contributor Author

ouz-a commented Sep 25, 2023

@bors r= @lcnr

@bors
Copy link
Contributor

bors commented Sep 25, 2023

@ouz-a: 🔑 Insufficient privileges: Not in reviewers

@oli-obk
Copy link
Contributor

oli-obk commented Sep 25, 2023

@bors r=lcnr

@bors
Copy link
Contributor

bors commented Sep 25, 2023

📌 Commit 5bf82ee has been approved by lcnr

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 25, 2023

🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.

@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 Sep 25, 2023
@bors
Copy link
Contributor

bors commented Sep 26, 2023

⌛ Testing commit 5bf82ee with merge 2b848b0...

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 26, 2023
Monomorphize OpaqueCast

In previous attempt, rust-lang#116140 we thought `OpaqueCast` was unused during few places, but we were wrong, in reality we didn't have any test that could test it, so in this pr attempt is to correct the behavior of few `OpaqueCast`s in rustc.

r? `@lcnr`
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc_macros v0.1.0 (/checkout/compiler/rustc_macros)
[RUSTC-TIMING] leb128 test:true 3.025
   Compiling rustc_arena v0.0.0 (/checkout/compiler/rustc_arena)
[RUSTC-TIMING] rustc_ast test:true 6.843
##[error]The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled.
   Compiling rustc_fs_util v0.0.0 (/checkout/compiler/rustc_fs_util)

##[group]Clock drift check
  local time: Wed Sep 27 00:01:51 UTC 2023
  local time: Wed Sep 27 00:01:51 UTC 2023
  network time: Wed, 27 Sep 2023 00:01:51 GMT
##[endgroup]
Session terminated, killing shell...[RUSTC-TIMING] rustc_fs_util test:true 0.159
[RUSTC-TIMING] rustc_error_codes test:true 0.199
   Compiling rustc_graphviz v0.0.0 (/checkout/compiler/rustc_graphviz)
[RUSTC-TIMING] rustc_arena test:true 2.698
 ...killed.

@bors
Copy link
Contributor

bors commented Sep 27, 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 Sep 27, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Sep 27, 2023

@bors retry timeout

@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 Sep 27, 2023
@bors
Copy link
Contributor

bors commented Sep 27, 2023

⌛ Testing commit 5bf82ee with merge c08cf0c...

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 27, 2023
Monomorphize OpaqueCast

In previous attempt, rust-lang#116140 we thought `OpaqueCast` was unused during few places, but we were wrong, in reality we didn't have any test that could test it, so in this pr attempt is to correct the behavior of few `OpaqueCast`s in rustc.

r? `@lcnr`
@rust-log-analyzer
Copy link
Collaborator

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

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

---- [ui] tests\rustdoc-ui\intra-doc\issue-108653-associated-items-10.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit code: 0xc00000fd
command: PATH="C:\a\rust\rust\build\x86_64-pc-windows-gnu\stage2\bin;C:\a\rust\rust\build\x86_64-pc-windows-gnu\stage0-bootstrap-tools\x86_64-pc-windows-gnu\release\deps;C:\a\rust\rust\build\x86_64-pc-windows-gnu\stage0\bin;C:\a\rust\rust\ninja;C:\a\rust\rust\mingw64\bin;C:\hostedtoolcache\windows\Python\3.11.5\x64\Scripts;C:\hostedtoolcache\windows\Python\3.11.5\x64;C:\msys64\usr\bin;C:\a\rust\rust\sccache;C:\PROGRA~1\MongoDB\bin;C:\aliyun-cli;C:\vcpkg;C:\cf-cli;C:\Program Files (x86)\NSIS;C:\tools\zstd;C:\Program Files\Mercurial;C:\hostedtoolcache\windows\stack\2.11.1\x64;C:\cabal\bin;C:\ghcup\bin;C:\Program Files\dotnet;C:\mysql\bin;C:\Program Files\R\R-4.3.1\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;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.20.7\x64\bin;C:\hostedtoolcache\windows\Python\3.7.9\x64\Scripts;C:\hostedtoolcache\windows\Python\3.7.9\x64;C:\hostedtoolcache\windows\Ruby\2.5.9\x64\bin;C:\Program Files\OpenSSL\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\8.0.382-5\x64\bin;C:\Program Files\ImageMagick-7.1.1-Q16-HDRI;C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\Program Files\Eclipse Foundation\jdk-8.0.302.8-hotspot\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\ProgramData\Chocolatey\bin;C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files (x86)\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\TortoiseSVN\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:\SeleniumWebDrivers\ChromeDriver;C:\SeleniumWebDrivers\EdgeDriver;C:\Program Files\Amazon\AWSCLIV2;C:\Program Files\Amazon\SessionManagerPlugin\bin;C:\Program Files\Amazon\AWSSAMCLI\bin;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files (x86)\Microsoft BizTalk Server;C:\Program Files\LLVM\bin;C:\Users\runneradmin\.dotnet\tools;C:\Users\runneradmin\.cargo\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2\\bin\\rustdoc.exe" "C:\\a\\rust\\rust\\tests\\rustdoc-ui\\intra-doc\\issue-108653-associated-items-10.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" "--sysroot" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2" "--target=x86_64-pc-windows-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-o" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\rustdoc-ui\\intra-doc\\issue-108653-associated-items-10" "-A" "internal_features" "-Cdebuginfo=0" "-Lnative=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\native\\rust-test-helpers" "-L" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\rustdoc-ui\\intra-doc\\issue-108653-associated-items-10\\auxiliary"
--- stderr -------------------------------

thread 'main' has overflowed its stack
------------------------------------------

@bors
Copy link
Contributor

bors commented Sep 27, 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 Sep 27, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Sep 27, 2023

@bors retry rustdoc test overflow

@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 Sep 27, 2023
@bors
Copy link
Contributor

bors commented Sep 27, 2023

⌛ Testing commit 5bf82ee with merge befb3e3...

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 27, 2023
Monomorphize OpaqueCast

In previous attempt, rust-lang#116140 we thought `OpaqueCast` was unused during few places, but we were wrong, in reality we didn't have any test that could test it, so in this pr attempt is to correct the behavior of few `OpaqueCast`s in rustc.

r? `@lcnr`
@oli-obk
Copy link
Contributor

oli-obk commented Sep 27, 2023

@bors r-

actually, while working on #115759 (comment) I realized that maybe we should just strip all OpaqueCast projections in the RevealAll pass, as they become useless after that pass (we can just reveal again if any other projections result in an opaque type).

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 27, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Sep 27, 2023

See 1dc6b2a for where OpaqueCast gets removed. So you'll be able to revive your other PR instead 😆

@oli-obk
Copy link
Contributor

oli-obk commented Sep 27, 2023

Hmm... considering the reviews on the other PRs, I'll just apply the requested changes to my PR

@oli-obk oli-obk closed this Sep 27, 2023
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

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

@ouz-a ouz-a deleted the opaque_cast_clean-2 branch September 30, 2023 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

6 participants