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 8 pull requests #120196

Merged
merged 20 commits into from
Jan 22, 2024
Merged

Rollup of 8 pull requests #120196

merged 20 commits into from
Jan 22, 2024

Commits on Jan 15, 2024

  1. Update Readme

    atouchet authored Jan 15, 2024
    Configuration menu
    Copy the full SHA
    7e64f29 View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2024

  1. Un-hide iter::repeat_n

    scottmcm committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    aa72e54 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2024

  1. Fix a soundness bug in with_tables.

    We were able to uplift any value from `Tables` to `'static`, which is unsound.
    oli-obk committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    06a9dbe View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    61361c1 View commit details
    Browse the repository at this point in the history
  3. Ensure internal function is safe

    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.
    celinval authored and oli-obk committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    9aace67 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6cd6539 View commit details
    Browse the repository at this point in the history
  5. 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.
    the8472 committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    5796b3c View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2024

  1. rustc_mir_dataflow: Add exports for external tools

    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
    jubnzv committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    270f151 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f6b3bcc View commit details
    Browse the repository at this point in the history
  3. Add a warning comment

    jubnzv committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    7842043 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cc8e56b View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2024

  1. Configuration menu
    Copy the full SHA
    6f1944d View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#120005 - atouchet:rd3, r=Mark-Simulacrum

    Update Readme
    
    A couple minor formatting fixes and re-add missing "Installing from Source" section to the table of contents.
    matthiaskrgr authored Jan 21, 2024
    Configuration menu
    Copy the full SHA
    7119ca1 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#120045 - scottmcm:unhide-repeat-n, r=Mark-S…

    …imulacrum
    
    Un-hide `iter::repeat_n`
    
    ACP accepted in rust-lang/libs-team#120 (comment)
    matthiaskrgr authored Jan 21, 2024
    Configuration menu
    Copy the full SHA
    092d627 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#120128 - oli-obk:smir_internal_lift, r=celi…

    …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`
    matthiaskrgr authored Jan 21, 2024
    Configuration menu
    Copy the full SHA
    a72d6c1 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#120145 - the8472:fix-inplace-dest-drop, r=c…

    …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.
    matthiaskrgr authored Jan 21, 2024
    Configuration menu
    Copy the full SHA
    4a941d3 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#120158 - jubnzv:120130-mirdf-exports, r=nne…

    …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
    matthiaskrgr authored Jan 21, 2024
    Configuration menu
    Copy the full SHA
    e59a6fe View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#120167 - dtolnay:bootstrap, r=clubby789

    Capture the rationale for `-Zallow-features=` in bootstrap.py
    
    Based on the discussion in rust-lang#120096.
    matthiaskrgr authored Jan 21, 2024
    Configuration menu
    Copy the full SHA
    ac71369 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#120174 - Mark-Simulacrum:link-libs-policy, …

    …r=dtolnay
    
    Warn users about limited review for tier 2 and 3 code
    
    Needs rust-lang/std-dev-guide#61
    matthiaskrgr authored Jan 21, 2024
    Configuration menu
    Copy the full SHA
    1229d4c View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#120180 - Zalathar:vec-split-off-alternative…

    …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.
    matthiaskrgr authored Jan 21, 2024
    Configuration menu
    Copy the full SHA
    3eb7fe3 View commit details
    Browse the repository at this point in the history