| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
HirIdify hir::Def
cc @ljedrz
r? @oli-obk
|
|
update polonius-engine
This updates polonius-engine to [version 0.7.0](https://github.com/rust-lang/polonius/blob/master/RELEASES.md#v070), which adds a hybrid algorithm that starts off with performing a cheaper, location-insensitive analysis before proceeding with the full analysis.
r? @nikomatsakis
|
|
Increase `Span` from 4 bytes to 8 bytes.
This increases the size of some important types, such as `ast::Expr` and
`mir::Statement`. However, it drastically reduces how much the interner
is used, and the fields are more natural sizes that don't require bit
operations to extract.
As a result, instruction counts drop across a range of workloads, by as
much as 10% for `script-servo` incremental builds.
Peak memory usage goes up a little for some cases, but down by more for
some other cases -- as much as 18% for non-incremental builds of
`packed-simd`.
The commit also:
- removes the `repr(packed)`, because it has negligible effect, but can
cause undefined behaviour;
- replaces explicit impls of common traits (`Copy`, `PartialEq`, etc.)
with derived ones.
r? @petrochenkov
|
|
|
|
|
|
|
|
|
|
Rollup of 6 pull requests
Successful merges:
- #59776 (Apply resource-suffix to search-index and source-files scripts as well)
- #59784 (Suggest importing macros from the crate root)
- #59812 (Exclude profiler-generated symbols from MSVC __imp_-symbol workaround.)
- #59874 (Clean up handling of `-Z pgo-gen` commandline option.)
- #59890 (Don't generate empty json variables)
- #59911 (Revert "compile crates under test w/ -Zemit-stack-sizes")
Failed merges:
r? @ghost
|
|
Clean up handling of `-Z pgo-gen` commandline option.
This PR adapts the `-Z pgo-gen` flag to how Clang and GCC handle the corresponding `-fprofile-generate` flag. In particular, the flag now optionally takes a directory to place the profiling data in and allows to omit the argument (instead of having to pass an empty string).
|
|
In `-Zprint-type-size` output, sort enum variants by size.
It's useful to see the biggest variants first.
r? @pnkfelix
|
|
Make duplicate matcher bindings a hard error
r? @Centril
Closes #57742
|
|
remove lookup_char_pos_adj
It is now exactly equivalent to lookup_char_pos.
|
|
Use measureme in self profiler
r? @michaelwoerister
~Changes are still very rough.~
~I'm not sure what the right way to add the `measureme` dependency is. Currently it's just added with a relative path which Works On My Machine ™️.~
I'm also not sure what to do with the category data.
|
|
Related to #58372
Related to #58967
|
|
Suggest removing `?` to resolve type errors.
Fixes #59756.
|
|
Add discr_index to multi-variant layouts
We remove the assumption that the discriminant is always field 0, in
preparations for layouts like generators where this is not (always) going to be
the case.
Specifically, upvars are going to go before the discriminant. In theory, it's possible to remove _that_ assumption instead and keep the discriminant at field index 0, but one assumption or the other had to go :)
There is one place I know of in the debuginfo code where we'll still need to remove assumptions that the discriminant is the _only_ field. I was planning on doing this along with the upcoming generator change, which will also include tests that exercise the code changing in this PR.
r? @eddyb
cc @oli-obk
cc @cramertj
|
|
Make trait_methods_not_found use a lock
r? @estebank
|
|
This uplifts `get_def_path` from Clippy. This is a follow up on the
implementation of internal lints: #59316
The internal lint implementation also copied the implementation of the
`AbsolutePathPrinter`. To get rid of this code duplication this also
uplifts the `get_def_path` function from Clippy.
This also renames `match_path` to `match_def_path`, as it was originally
named in Clippy.
|
|
Introduce an arena type which may be used to allocate a list of types with destructors
You can also specify that you want deserializers for `&'tcx [T]` and `&'tcx T` for a type in the list, which will allocate those using the arena.
Based on https://github.com/rust-lang/rust/pull/59517 and https://github.com/rust-lang/rust/pull/59533. Look at the last commit for the interesting changes.
An alternative to https://github.com/rust-lang/rust/pull/56448. cc @michaelwoerister @eddyb
r? @oli-obk
|
|
|
|
It's useful to see the biggest variants first.
|
|
We relax the assumption that the discriminant is always field 0, in
preparations for layouts like generators where this is not going to be
the case.
|
|
Fix lifetime on LocalInternedString::get function
cc @eddyb @nnethercote
|
|
|
|
|
|
|
|
This commit adds a suggestion to remove the `?` from expressions if
removing the `?` would resolve a type error.
|
|
|
|
|
|
|
|
|
|
More restrictive 2 phase borrows - take 2
Signal lint diagnostic `mutable_borrow_reservation_conflict` when borrow-check finds a 2-phase borrow's reservation overlapping with a shared borrow.
(pnkfelix updated description)
cc #56254 , #59159
blocks PR #59114
r? @pnkfelix
cc @RalfJung @nikomatsakis
|
|
Move match_path from DefId to lint::LateContext
cc https://github.com/rust-lang/rust/pull/59316#discussion_r272351353
r? @eddyb
|
|
Remove no_force from coherent_trait
r? @michaelwoerister
|
|
|
|
It is now exactly equivalent to lookup_char_pos.
|
|
|
|
This increases the size of some important types, such as `ast::Expr` and
`mir::Statement`. However, it drastically reduces how much the interner
is used, and the fields are more natural sizes that don't require bit
operations to extract.
As a result, instruction counts drop across a range of workloads, by as
much as 12% for incremental "check" builds of `script-servo`.
Peak memory usage goes up a little for some cases, but down by more for
some other cases -- as much as 18% for non-incremental builds of
`packed-simd`.
The commit also:
- removes the `repr(packed)`, because it has negligible effect, but can
cause undefined behaviour;
- replaces explicit impls of common traits (`Copy`, `PartialEq`, etc.)
with derived ones.
|
|
|
|
|
|
specialization to find the right field
|
|
destructors
|
|
Get us back below 100 characters per line to placate tidy.
|
|
We aren't sure if this will become an error or not yet.
|