| Age | Commit message (Collapse) | Author | Lines |
|
This is a straightforward replacement except for two places where we
have to convert to `LocalInternedString` to get a stable sort.
|
|
This requires changing the `PartialOrd`/`Ord` implementations to look at
the chars rather than the symbol index.
|
|
It's a full conversion, except in `DefKey::compute_stable_hash()` where
a `Symbol` now is converted to an `InternedString` before being hashed.
This was necessary to avoid test failures.
|
|
|
|
|
|
This avoids the needs for various conversions, and makes the code
slightly faster, because `Symbol` comparisons and hashing is faster.
|
|
variables.
|
|
rustc: arena-allocate the slice in `ty::GenericsPredicate`, not the whole struct.
While rebasing #59789 I noticed we can do this now. However, it doesn't help much without changing `inferred_outlives_of` to the same type, which I might try next.
|
|
struct.
|
|
Remove lint store from Session
|
|
Rollup of 8 pull requests
Successful merges:
- #65237 (Move debug_map assertions after check for err)
- #65316 (make File::try_clone produce non-inheritable handles on Windows)
- #65319 (InterpCx: make memory field public)
- #65461 (Don't recommend ONCE_INIT in std::sync::Once)
- #65465 (Move syntax::ext to a syntax_expand and refactor some attribute logic)
- #65475 (add example for type_name)
- #65478 (fmt::Write is about string slices, not byte slices)
- #65486 (doc: fix typo in OsStrExt and OsStringExt)
Failed merges:
r? @ghost
|
|
Optimize dropck
This does two things: caches the `trivial_dropck` check by making it a query, and shifts around the implementation of the primary dropck itself to avoid allocating many small vectors.
|
|
|
|
Implement AsRef<[T]> for List<T>
r? @Mark-Simulacrum
|
|
Return `false` from `needs_drop` for all zero-sized arrays.
Resolves #65348.
This changes the result of the `needs_drop` query from `true` to `false` for types such as `[Box<i32>; 0]`. I believe this change to be sound because a zero-sized array can never actually hold a value. This is an elegant way of resolving #65348 and #64945, but obviously it has much broader implications.
|
|
Optimize `try_expand_impl_trait_type`
A lot of time was being spent expanding some large `impl Future` types in fuchsia. This PR takes the number of types being visited in one expansion from >3 billion to about a thousand, and eliminates the compile time regression in https://github.com/rust-lang/rust/issues/65147 (in fact, compile times are better than they were before).
Thanks to @Mark-Simulacrum for helping identify the issue and to @matthewjasper for suggesting this change.
Fixes #65147.
r? @matthewjasper,@nikomatsakis
|
|
Remove last uses of gensyms
Underscore bindings now use unique `SyntaxContext`s to avoid collisions. This was the last use of gensyms in the compiler, so this PR also removes them.
closes #49300
cc #60869
r? @petrochenkov
|
|
|
|
|
|
rustc_metadata: Privatize private code and remove dead code
Also some minor cleanup and documentation improvements.
r? @eddyb
|
|
|
|
|
|
Compute the layout of uninhabited structs
fixes #64506
r? @eddyb
|
|
Use a more traditional scheme with providing them as a resolver output
|
|
|
|
Add `Instance::resolve_for_fn_ptr` (RFC 2091 #2/N)
Supercedes: https://github.com/rust-lang/rust/pull/65082
Depends on: https://github.com/rust-lang/rust/pull/65037
Tracking issue: https://github.com/rust-lang/rust/issues/47809
[RFC text](https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md)
steps taken:
* [x] add a `ReifyShim` that is similar to `VirtualShim` in behavior (see #54183)
* [x] add `ty::Instance::resolve_for_fn_ptr` (leave `ty::Instance::resolve_vtable` alone), migrate appropriate callers
* [x] `resolve_for_fn_ptr` returns the shim if calling a `#[track_caller]` function
|
|
This allows caching some recursive types and getting to an error much
more quickly.
|
|
Deduplicate is_{freeze,copy,sized}_raw
Fixes #65259
Deduplicates `is_{freeze,copy,sized}_raw` by delegating to a new method which takes in a `LangItem`.
|
|
Function pointers as const generic arguments
Makes function pointers as const generic arguments usable.
Fixes #62395
r? @varkor
|
|
|
|
Union fields may now never have a type with attached destructor.
This for example allows unions to use arbitrary field types only by
wrapping
them in ManuallyDrop.
The stable rule remains, that union fields must be Copy. We use the new
rule for the `untagged_union` feature.
See RFC 2514.
Note for ui tests:
We can't test move out through Box's deref-move since we can't
have a Box in a union anymore.
|
|
Per review feedback.
|
|
|
|
|
|
|
|
Also add a missing terminal newline to a test.
|
|
This ICEs in MIR currently, which I think is to be expected since none of the MIR plumbing is set up. I added a test which confirms that the shim is being used for reifying a track_caller function.
|
|
|
|
|
|
|
|
|
|
|
|
r=michaelwoerister
Remove -Zprofile-queries
r? @michaelwoerister
Per [zulip thread](https://zulip-archive.rust-lang.org/131828tcompiler/57361RemoveZprofilequeries.html).
|
|
|
|
|
|
function pointer const parameters.
|
|
Remove query-related macros
The query system has a few macros that only have one or two call sites, and I find they hurt readability. This PR removes them.
r? @michaelwoerister
|
|
r=michaelwoerister
Remove loaded_from_cache map from DepGraph
It's now unused, even with -Zquery-dep-graph
From https://github.com/rust-lang/rust/pull/63756/files#r316039379 -- it'll simplify that PR to get this landed separately so we can just remove some of the code that it touches.
r? @Zoxc or @michaelwoerister
|
|
Avoid `SmallVec::collect`
We can get sizeable speed-ups by avoiding `SmallVec::collect` when the number of elements is small.
|
|
fix bug in folding for constants
These was a bug in the folding for constants that caused it to overlook bound regions. This branch includes some other little things that I did while trying to track the bug down.
r? @oli-obk
|