Skip to content

rustc: Leak the LLVM module and context. #3552 - #7659

Closed
brson wants to merge 1 commit into
rust-lang:masterfrom
brson:leak-llvm
Closed

rustc: Leak the LLVM module and context. #3552#7659
brson wants to merge 1 commit into
rust-lang:masterfrom
brson:leak-llvm

Conversation

@brson

@brsonbrson commented Jul 9, 2013

Copy link
Copy Markdown
Contributor

During normal batch operation, rustc will not bother to dispose of the LLVM module and context in order to save some time.

before
time: 9.696 s translation
time: 37.966 s LLVM passes
time: 0.302 s linking
real 1m4.415s
user 1m3.528s
sys 0m0.788s
after
time: 9.759 s translation
time: 35.625 s LLVM passes
time: 0.308 s linking
real 1m3.528s
user 1m2.468s
sys 0m0.968s

@sanxiyn

Copy link
Copy Markdown
Contributor

Bot failure is Valgrind complaining LLVM module and context are leaked. Duh...

@emberian

Copy link
Copy Markdown
Contributor

@brson is there a way to silence valgrind?

@sanxiyn

Copy link
Copy Markdown
Contributor

@cmr Valgrind can be silenced by adding new supressions to src/etc/*.supp files.

@brson

Copy link
Copy Markdown
ContributorAuthor

It's only a subset of the tests where valgrind is actually valgrinding rustc. I'll investigate. Trying to revive this patch.

@brsonbrson closed this Sep 9, 2013
@brson

brson commented Sep 9, 2013

Copy link
Copy Markdown
ContributorAuthor

Not going to finish this.

flip1995 pushed a commit to flip1995/rust that referenced this pull request Sep 28, 2021
Change `while_let_on_iterator` suggestion to use `by_ref()`
It came up in the discussion rust-lang#7659 that suggesting `iter.by_ref()` is a clearer suggestion than `&mut iter`. I personally think they're equivalent, but if `by_ref()` is clearer to people then that should be the suggestion.
changelog: Change `while_let_on_iterator` suggestion when using `&mut` to use `by_ref()`
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
7659: Improve "Generate From impl" r=Veykril a=jDomantas
* Allows any field type. Previously it was restricted to path types, but I don't see why it couldn't apply to all other types too. (the main reason for is PR is that I'm too lazy to write out `From<&'static str>` by hand 😄)
* More correct handling for generic enums - previously it wouldn't emit generic params on the impl.
* Also accepts variants with named field.
The impl generation code got mostly copy-pasted from generate_impl assist - please tell if there's an easy way to avoid this duplication.
Co-authored-by: Domantas Jadenkus <djadenkus@gmail.com>
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
7664: refactor impl generation in assists r=Veykril a=jDomantas
Follow-up to rust-lang#7659: all impl generation in assists (at least what I found) is now done through `utils::{generate_impl_text, generate_trait_impl_text}`.
Co-authored-by: Domantas Jadenkus <djadenkus@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@brson@sanxiyn@emberian