-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 9 pull requests #120190
Rollup of 9 pull requests #120190
Conversation
We were able to uplift any value from `Tables` to `'static`, which is unsound.
The internal function was unsound, it could cause UB in rare cases where the user inadvertly stored the returned object in a location that could outlive the TyCtxt. In order to make it safe, we now take a type context as an argument to the internal fn, and we ensure that interned items are lifted using the provided context. Thus, this change ensures that the compiler can properly enforce that the object does not outlive the type context it was lifted to.
InPlaceDstBufDrop holds onto the allocation before the shrinking happens which means it must deallocate the destination elements but the source allocation.
Added back previously available exports: * Forward/Backward: used when implementing `AnalysisDomain` * Engine: used in user's code to solve the dataflow problem * SwitchIntEdgeEffects: used when implementing functions of the `Analysis` trait * graphviz: potentially useful for debugging purposes These exports are used when implementing external tools based on MIR dataflow framework. Closes rust-lang#120130
Update Readme A couple minor formatting fixes and re-add missing "Installing from Source" section to the table of contents.
…imulacrum Un-hide `iter::repeat_n` ACP accepted in rust-lang/libs-team#120 (comment)
…nval Make stable_mir::with_tables sound See the first commit for the actual soundness fix. The rest is just fallout from that and is entirely safe code. Includes most of rust-lang#120120 The major difference to rust-lang#120120 is that we don't need an unsafe trait, as we can now rely on the type system (the only unsafe part, and the actual source of the unsoundness was in `with_tables`) r? `@celinval`
…uviper fix: Drop guard was deallocating with the incorrect size InPlaceDstBufDrop holds onto the allocation before the shrinking happens which means it must deallocate the destination elements but the source allocation. Thanks ``@cuviper`` for spotting this.
…thercote `rustc_mir_dataflow`: Restore removed exports Added back previously available exports: * `Forward`/`Backward`: used when implementing `AnalysisDomain` * `Engine`: used in user's code to solve the dataflow problem * `SwitchIntEdgeEffects`: used when implementing functions of the `Analysis` trait * `graphviz`: potentially useful for debugging purposes Closes rust-lang#120130
Capture the rationale for `-Zallow-features=` in bootstrap.py Based on the discussion in rust-lang#120096.
…ert, r=tmiasko Fix assume and assert in jump threading r? `@tmiasko`
…r=dtolnay Warn users about limited review for tier 2 and 3 code Needs rust-lang/std-dev-guide#61
…s, r=dtolnay Document some alternatives to `Vec::split_off` One of the discussion points that came up in rust-lang#119917 is that some people use `Vec::split_off` in cases where they probably shouldn't, because the alternatives (like `mem::take`) are hard to discover. This PR adds some suggestions to the documentation of `split_off` that should point people towards alternatives that might be more appropriate for their use-case. I've deliberately tried to keep these changes as simple and uncontroversial as possible, so that they don't depend on how the team decides to handle the concerns raised in rust-lang#119917. That's why I haven't touched the existing documentation for `split_off`, and haven't added links to `split_off` to the documentation of other methods.
@bors r+ rollup=never p=3 |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
Successful merges:
iter::repeat_n
#120045 (Un-hideiter::repeat_n
)rustc_mir_dataflow
: Restore removed exports #120158 (rustc_mir_dataflow
: Restore removed exports)-Zallow-features=
in bootstrap.py #120167 (Capture the rationale for-Zallow-features=
in bootstrap.py)Vec::split_off
#120180 (Document some alternatives toVec::split_off
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup