| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
and inferred_outlives_of.
|
|
|
|
|
|
This field is created lazily on first use and after that is read only.
That's exactly what Once is for.
|
|
|
|
This is done by moving some data definitions to syntax::expand.
|
|
Fix the start/end byte positions in the compiler JSON output
Track the changes made during normalization in the `SourceFile` and use this information to correct the `start_byte` and `end_byte` fields in the JSON output.
This should ensure the start/end byte fields can be used to index the original file, even if Rust normalized the source code for parsing purposes. Both CRLF to LF and BOM removal are handled with this one.
The rough plan was discussed with @matklad in rust-lang-nursery/rustfix#176 - although I ended up going with `u32` offset tracking so I wouldn't need to deal with `u32 + i32` arithmetics when applying the offset to the span byte positions.
Fixes #65029
|
|
Remove `InternedString`
This PR removes `InternedString` by converting all occurrences to `Symbol`. There are a handful of places that need to use the symbol chars instead of the symbol index, e.g. for stable sorting; local conversions `LocalInternedString` is used in those places.
r? @eddyb
|
|
|
|
|
|
|
|
|
|
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.
|
|
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
|
|
|
|
(AoS -> SoA).
|
|
|
|
|
|
|
|
PerDefTable.
|
|
|
|
|
|
|
|
|
|
self-profiling: Add events for metadata loading (plus a small dep-tracking optimization)
This PR
- adds self-profiling events related to loading things from crate metadata
- makes the compiler cache the `DepNodeIndex` of upstream crates, so that they don't have to be looked up over and over.
The commits are best reviewed in isolation.
Self-profiling tracking issue: https://github.com/rust-lang/rust/issues/58967
r? @Mark-Simulacrum
cc @wesleywiser
|
|
Improve message when attempting to instantiate tuple structs with private fields
Fixes #58017, fixes #39703.
```
error[E0603]: tuple struct `Error` is private
--> main.rs:22:16
|
2 | pub struct Error(usize, pub usize, usize);
| ----- ----- field is private
| |
| field is private
...
22 | let x = a::Error(3, 1, 2);
| ^^^^^
|
= note: a tuple struct constructor is private if any of its fields is private
```
|
|
|
|
|
|
and table lookups on each access of crate metadata.
|
|
|
|
metadata: Some crate loading cleanup
So, my goal was to fix caching of loaded crates which is broken and causes ICEs like #56935 or #64450.
While investigating I found that the code is pretty messy and likes to confuse various things that look similar but are actually different.
This PR does some initial cleanup in that area, I hope to get to the caching itself a bit later.
|
|
It duplicates `CrateRoot::name`
|
|
It was only used for retreiving edition, which was a bug.
In case of dual proc macros the edition should be taken from the target crate version, like any other metadata.
|
|
|
|
|
|
reserve `impl<T> From<!> for T`
this is necessary for never-type stabilization.
cc #57012 #35121
I think we wanted a crater run for this @nikomatsakis?
r? @nikomatsakis
|
|
Rustdoc render async function re-export
Closes #63710
r? @nikomatsakis
|
|
|
|
|
|
|
|
|
|
This ensures that we match the order used by proc macro metadata
serialization.
Fixes #64251
|
|
This allows lints and other diagnostics to refer to items
by a unique ID instead of relying on whacky path
resolution schemes that may break when items are
relocated.
|
|
resolve: Block expansion of a derive container until all its derives are resolved
So, it turns out there's one more reason to block expansion of a `#[derive]` container until all the derives inside it are resolved, beside `Copy` (https://github.com/rust-lang/rust/pull/63248).
The set of derive helper attributes registered by derives in the container also has to be known before the derives themselves are expanded, otherwise it may be too late (see https://github.com/rust-lang/rust/pull/63468#issuecomment-524550872 and the `#[stable_hasher]`-related test failures in https://github.com/rust-lang/rust/pull/63468).
So, we stop our attempts to unblock the container earlier, as soon as the `Copy` status is known, and just block until all its derives are resolved.
After all the derives are resolved we immediately go and process their helper attributes in the item, without delaying it until expansion of the individual derives.
Unblocks https://github.com/rust-lang/rust/pull/63468
r? @matthewjasper (as a reviewer of https://github.com/rust-lang/rust/pull/63248)
cc @c410-f3r
|
|
Resolve some small issues related to #63580
This resolves some feedback left on #63580 after it was merged:
- Adds documentation to `mir::Static` and `mir::StaticKind`
- Simplifies `maybe_get_optimized_mir()` and `maybe_get_promoted_mir()`
cc @bjorn3 @RalfJung
|
|
|
|
Since both functions are always unwrapped, don't wrap the return value
in an `Option`.
|
|
Cleanup: Consistently use `Param` instead of `Arg` #62426
Fixes #62426
|