rustc_borrowck memory management tweaks#131225
Merged
bors merged 5 commits intorust-lang:masterfrom Oct 7, 2024
Merged
Conversation
The `regioncx` and `borrow_set` fields can be references instead of `Rc`. They use the existing `'a` lifetime. This avoids some heap allocations and is a bit simpler.
Refcounting isn't needed.
It can own these two fields.
Either `&T` or `Rc<T>` is preferable.
By making it own two of its fields.
Member
|
@bors r+ rollup |
Collaborator
klensy
reviewed
Oct 7, 2024
| infcx, | ||
| param_env, | ||
| implicit_region_bound, | ||
| universal_regions, |
Contributor
There was a problem hiding this comment.
Rc clone()'s better be Rc::clone, so whenever field refactored out of Rc, compiler will warn, instead of wasting clone()'s.
Actually, i want lint for it :-) : https://rust-lang.github.io/rust-clippy/master/index.html#/clone_on_ref_ptr
Member
There was a problem hiding this comment.
I’m aware and prefer Rc::clone, but it’s fine until the lint is used.
Contributor
There was a problem hiding this comment.
Submitted #131375, but is some discussion required before enabling it in CI?
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 7, 2024
…kingjubilee Rollup of 7 pull requests Successful merges: - rust-lang#128721 (Don't allow the `#[pointee]` attribute where it doesn't belong) - rust-lang#130479 (skip in-tree compiler build for llvm-bitcode-linker if ci-rustc is on) - rust-lang#130899 (Couple of changes to make it easier to compile rustc for wasm) - rust-lang#131225 (`rustc_borrowck` memory management tweaks) - rust-lang#131351 (Remove valgrind test suite and support from compiletest, bootstrap and opt-dist) - rust-lang#131359 (Fix used_underscore_binding in rustc_serialize) - rust-lang#131367 (Mark Boxy as on vacation) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 7, 2024
Rollup merge of rust-lang#131225 - nnethercote:rustc_borrowck-mm, r=lqd `rustc_borrowck` memory management tweaks Minor cleanups in `rustc_borrowck` relating to memory management. r? `@lqd`
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Oct 28, 2024
compiler: apply clippy::clone_on_ref_ptr for CI Apply lint https://rust-lang.github.io/rust-clippy/master/index.html#/clone_on_ref_ptr for compiler, also see rust-lang#131225 (comment). Some Arc's can be misplaced with Lrc's, sorry. https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/enable.20more.20clippy.20lints.20for.20compiler.20.28and.5Cor.20std.29
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this pull request
Oct 29, 2024
compiler: apply clippy::clone_on_ref_ptr for CI Apply lint https://rust-lang.github.io/rust-clippy/master/index.html#/clone_on_ref_ptr for compiler, also see rust-lang#131225 (comment). Some Arc's can be misplaced with Lrc's, sorry. https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/enable.20more.20clippy.20lints.20for.20compiler.20.28and.5Cor.20std.29
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this pull request
Oct 29, 2024
compiler: apply clippy::clone_on_ref_ptr for CI Apply lint https://rust-lang.github.io/rust-clippy/master/index.html#/clone_on_ref_ptr for compiler, also see rust-lang#131225 (comment). Some Arc's can be misplaced with Lrc's, sorry. https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/enable.20more.20clippy.20lints.20for.20compiler.20.28and.5Cor.20std.29
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this pull request
Oct 29, 2024
compiler: apply clippy::clone_on_ref_ptr for CI Apply lint https://rust-lang.github.io/rust-clippy/master/index.html#/clone_on_ref_ptr for compiler, also see rust-lang#131225 (comment). Some Arc's can be misplaced with Lrc's, sorry. https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/enable.20more.20clippy.20lints.20for.20compiler.20.28and.5Cor.20std.29
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 29, 2024
Rollup merge of rust-lang#131375 - klensy:clone_on_ref_ptr, r=cjgillot compiler: apply clippy::clone_on_ref_ptr for CI Apply lint https://rust-lang.github.io/rust-clippy/master/index.html#/clone_on_ref_ptr for compiler, also see rust-lang#131225 (comment). Some Arc's can be misplaced with Lrc's, sorry. https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/enable.20more.20clippy.20lints.20for.20compiler.20.28and.5Cor.20std.29
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Oct 30, 2024
compiler: apply clippy::clone_on_ref_ptr for CI Apply lint https://rust-lang.github.io/rust-clippy/master/index.html#/clone_on_ref_ptr for compiler, also see rust-lang/rust#131225 (comment). Some Arc's can be misplaced with Lrc's, sorry. https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/enable.20more.20clippy.20lints.20for.20compiler.20.28and.5Cor.20std.29
lnicola
pushed a commit
to lnicola/rust-analyzer
that referenced
this pull request
Nov 1, 2024
compiler: apply clippy::clone_on_ref_ptr for CI Apply lint https://rust-lang.github.io/rust-clippy/master/index.html#/clone_on_ref_ptr for compiler, also see rust-lang/rust#131225 (comment). Some Arc's can be misplaced with Lrc's, sorry. https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/enable.20more.20clippy.20lints.20for.20compiler.20.28and.5Cor.20std.29
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Minor cleanups in
rustc_borrowckrelating to memory management.r? @lqd