You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with that change and rust-lang/rust#119735cargo +rust1 rustc -- -Znext-solver compiles successfully in 4m26,600s after changing the recursion limit to 1024. Unsure what exactly is responsible for the higher recursion limit requirement, but tbh, I don't care too much about that.
RUSTFLAGS=-Znext-solver time cargo +rust1 test takes nearly 13 minutes, can probably trivially speed this up by deduplicating obligations in the new solver as well 🤷
by adding -Znext-solver as a command line flag to rustc, either by using cargo rustc -- -Znext-solver or RUSTFLAGS=-Znext-solver <whatever>, you compile your code using the next generation trait solver for Rust: rust-lang/rust#107374.
cargo rustc is similar to cargo build, except that you can pass arguments to the compiler, rustc, after --.
The +rust1 is to change cargo to use my local toolchain instead of the default. You can also do cargo +nightly build or sth like this.
So cargo +rust1 rustc -- -Znext-solver builds your crate (in this case with the promotion example uncommented) using my local toolchain which includes the changes in rust-lang/rust#119735 and using the next gen trait solver. It does not run tests.
For RUSTFLAGS=-Znext-solver time cargo +rust1 test I changed main.rs to the smaller example again and ran all tests this time, using the time command to get accurate timings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
getting the following error after 2:30min was a bit scary 😅
with that change and rust-lang/rust#119735
cargo +rust1 rustc -- -Znext-solvercompiles successfully in 4m26,600s after changing the recursion limit to 1024. Unsure what exactly is responsible for the higher recursion limit requirement, but tbh, I don't care too much about that.RUSTFLAGS=-Znext-solver time cargo +rust1 testtakes nearly 13 minutes, can probably trivially speed this up by deduplicating obligations in the new solver as well 🤷