-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Rollup of 17 pull requests #145210
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 17 pull requests #145210
Conversation
This uses a very hacky regex that will probably miss some variables. But having some docs seems better than none at all. This uses a very hacky regex that will probably miss some variables. But having some docs seems better than none at all. In particular, this generates stubs for the following env vars: - COLORTERM - QNX_TARGET - RUST_BACKTRACE - RUSTC_BLESS - RUSTC_BOOTSTRAP - RUSTC_BREAK_ON_ICE - RUSTC_CTFE_BACKTRACE - RUSTC_FORCE_RUSTC_VERSION - RUSTC_GRAPHVIZ_FONT - RUSTC_ICE - RUSTC_LOG - RUSTC_OVERRIDE_VERSION_STRING - RUSTC_RETRY_LINKER_ON_SEGFAULT - RUSTC_TRANSLATION_NO_DEBUG_ASSERT - RUST_DEP_GRAPH_FILTER - RUST_DEP_GRAPH - RUST_FORBID_DEP_GRAPH_EDGE - RUST_MIN_STACK - RUST_TARGET_PATH - SDKROOT - TERM - UNSTABLE_RUSTDOC_TEST_LINE - UNSTABLE_RUSTDOC_TEST_PATH [rendered]()
The suboptimal error only appears with NLLs due to liveness differences where polonius cannot have as many boring locals. Sometimes this causes NLLs to emit a duplicate error as well.
Remove incomplete handling of kills during traversal for loan liveness to get to a simpler and actionable prototype. This handles the cases, on sufficiently simple examples, that were deferred from NLLs (NLL problem case 3, lending iterators), and is still a good step to put in people's hands without needing to wait for another full implementation. This is a practical cut in scope, but it also shows where are the areas of improvement, that we will explore in the future.
These are just some sanity checks to ensure NLLs, the polonius alpha analysis, and the datalog implementation behave the same on these common examples.
This test showcases the same imprecision as NLLs, unlike the datalog implementation, when using reachability as a liveness approximation.
This is an example similar to the linked-list cursor examples where the alpha shows the same imprecision as NLLs, but that can work due to the loans not being live after the loop, or the constraint graph being simple enough that the cfg/subset relationships are the same for reachability and liveness.
- linked-list cursor-like patterns - issue-46589 These are known-bugs for the polonius alpha, where they show the same imprecision as NLLs, but are supported by the old datalog implementation.
also add a note to `GenericArgs::truncate_to`
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
some clauses can be merged together without requiring an attribute for each trait derived. also manually impl `Eq` because the `derive_where` generated code is too much for my comfort
Co-authored-by: Florian Bartels <108917393+flba-eb@users.noreply.github.com> Co-authored-by: Mads Marquart <mads@marquart.dk>
rustdoc has its own issue template now, mention that. swap the order of the last two sentances so it reads more like a typical if/else chain (base case listed last). adjust some labels and descriptions
Every other feature in the list uses a doc comment; fix one that used a regular comment to use a doc comment.
unstable-book: Add stubs for environment variables; document some of the important ones This uses a very hacky regex that will probably miss some variables. But having some docs seems better than none at all. In particular, this documents the following env vars explicitly (cc ````````@madsmtm```````` ````````@flba-eb```````` - do the docs for SDKROOT and QNX_TARGET look right?): - COLORTERM - QNX_TARGET - SDKROOT - TERM and generates stubs for the following env vars: - RUST_BACKTRACE - RUSTC_BLESS - RUSTC_BREAK_ON_ICE - RUSTC_CTFE_BACKTRACE - RUSTC_FORCE_RUSTC_VERSION - RUSTC_GRAPHVIZ_FONT - RUSTC_ICE - RUSTC_LOG - RUSTC_RETRY_LINKER_ON_SEGFAULT - RUSTC_TRANSLATION_NO_DEBUG_ASSERT - RUST_DEP_GRAPH_FILTER - RUST_DEP_GRAPH - RUST_FORBID_DEP_GRAPH_EDGE - RUST_MIN_STACK - RUST_TARGET_PATH - UNSTABLE_RUSTDOC_TEST_LINE - UNSTABLE_RUSTDOC_TEST_PATH rendered: 
Simplify polonius location-sensitive analysis This PR reworks the location-sensitive analysis into what we think is a worthwhile subset of the datalog analysis. A sort of polonius alpha analysis that handles NLL problem case 3 and more, but is still using the faster "reachability as an approximation of liveness", as well as the same loans-in-scope computation as NLLs -- and thus doesn't handle full flow-sensitivity like the datalog implementation. In the last few months, we've identified this subset as being actionable: - we believe we can make a stabilizable version of this analysis - it is an improvement over the status quo - it can also be modeled in a-mir-formality, or some other formalism, for assurances about soundness, and I believe ````````@nikomatsakis```````` is interested in looking into this during H2. - and we've identified the areas of work we wish to explore later to gradually expand the supported cases: the differences between reachability and liveness, support of kills, and considerations of time-traveling, for example. The approach in this PR is to try less to have the graph only represent live paths, by checking whether we reach a live region during traversal and recording the loan as live there, instead of equating traversal with liveness like today because it has subtleties with the typeck edges in statements (that could forward loans to the successor point without ensuring their liveness). We can then also simplify these typeck stmt edges. And we also can simplify traversal by removing looking at kills, because that's enough to handle a bunch of NLL problem 3 cases -- and we can gradually support them more and more in traversal in the future, to reduce the approximation of liveness. There's still some in-progress pieces of work w/r/t opaque types that I'm expecting [lcnr's opaque types rework](rust-lang#139587), and [amanda's SCCs rework](rust-lang#130227) to handle. That didn't seem to show up in tests until I rebased today (and shows lack of test coverage once again) when rust-lang#142255 introduced a couple of test failures with the new captures rules from edition 2024. It's not unexpected since we know more work is needed with member constraints (and we're not even using SCCs in this prototype yet) I'll look into these anyways, both for future work, and checking how these other 2 PRs would change things. --- I'm not sure the following means a lot until we have some formalism in-place, but: - I've changed the polonius compare-mode to use this analysis: the tests pass with it, except 2 cases with minor diagnostics differences, and the 2 edition 2024 opaque types one I mentioned above and need to investigate - things that are expected to work still do work: it bootstraps, can run our rustc-perf benchmarks (and the results are not even that bad), and a crater run didn't find any regressions (forgetting that crater currently fails to test around a quarter of all crates 👼) - I've added tests with improvements, like the NLL problem case 3 and others, as well as some that behave the same as NLLs today and are thus worse than the datalog implementation r? ````````@jackh726```````` (no rush I know you're deep in phd work and "implmentating" the new trait solver for r-a :p <3) This also fixes rust-lang#135646, a diagnostics ICE from the previous implementation.
@bors try jobs=test-various,dist-sparcv9-solaris |
Rollup of 17 pull requests try-job: test-various try-job: dist-sparcv9-solaris
Rollup of 17 pull requests Successful merges: - #141624 (unstable-book: Add stubs for environment variables; document some of the important ones) - #143093 (Simplify polonius location-sensitive analysis) - #144402 (Stabilize loongarch32 inline asm) - #144403 (`tests/ui/issues/`: The Issues Strike Back [4/N]) - #144739 (Use new public libtest `ERROR_EXIT_CODE` constant in rustdoc) - #145089 (Improve error output when a command fails in bootstrap) - #145112 ([win][arm64ec] Partial fix for raw-dylib-link-ordinal on Arm64EC) - #145129 ([win][arm64ec] Add `/machine:arm64ec` when linking LLVM as Arm64EC) - #145130 (improve "Documentation problem" issue template.) - #145135 (Stabilize `duration_constructors_lite` feature) - #145145 (some `derive_more` refactors) - #145147 (rename `TraitRef::from_method` to `from_assoc`) - #145156 (Override custom Cargo `build-dir` in bootstrap) - #145160 (Change days-threshold to 28 in [behind-upstream]) - #145162 (`{BTree,Hash}Map`: add "`Entry` API" section heading) - #145187 (Fix an unstable feature comment that wasn't a doc comment) - #145191 (`suggest_borrow_generic_arg`: use the correct generic args) r? `@ghost` `@rustbot` modify labels: rollup
💔 Test failed - checks-actions |
A job failed! Check out the build log: (web) (plain enhanced) (plain) Click to see the possible cause of the failure (guessed by this bot)
|
Looks mega spurious. @bors retry |
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 7f7b8ef (parent) -> 18eeac0 (this PR) Test differencesShow 460 test diffsStage 1
Stage 2
(and 92 additional test diffs) Additionally, 268 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 18eeac04fc5c2a4c4a8020dbdf1c652077ad0e4e --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
📌 Perf builds for each rolled up PR:
previous master: 7f7b8ef27d In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (18eeac0): comparison URL. Overall result: ❌✅ regressions and improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary -4.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 4.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 463.378s -> 462.481s (-0.19%) |
Successful merges:
tests/ui/issues/
: The Issues Strike Back [4/N] #144403 (tests/ui/issues/
: The Issues Strike Back [4/N])ERROR_EXIT_CODE
constant in rustdoc #144739 (Use new public libtestERROR_EXIT_CODE
constant in rustdoc)/machine:arm64ec
when linking LLVM as Arm64EC #145129 ([win][arm64ec] Add/machine:arm64ec
when linking LLVM as Arm64EC)duration_constructors_lite
feature #145135 (Stabilizeduration_constructors_lite
feature)derive_more
refactors #145145 (somederive_more
refactors)TraitRef::from_method
tofrom_assoc
#145147 (renameTraitRef::from_method
tofrom_assoc
)build-dir
in bootstrap #145156 (Override custom Cargobuild-dir
in bootstrap){BTree,Hash}Map
: add "Entry
API" section heading #145162 ({BTree,Hash}Map
: add "Entry
API" section heading)suggest_borrow_generic_arg
: use the correct generic args #145191 (suggest_borrow_generic_arg
: use the correct generic args)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup