| Age | Commit message (Collapse) | Author | Lines |
|
it's type.
|
|
|
|
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.
|
|
Changed `resolve_type_vars_with_obligations` to also resolve const inference variables
Fixes #65380
r? @varkor
|
|
Clean up `contains()` `insert()` chains on HashSet
They can be merged to a single `insert()` call, which may avoid double-hashing/lookup of the value.
|
|
move `parse_cfgspecs` to `rustc_interface`
Part of https://github.com/rust-lang/rust/pull/65324.
r? @Mark-Simulacrum
|
|
|
|
iterators
|
|
variables.
|
|
Use structured suggestion for restricting bounds
When a trait bound is not met and restricting a type parameter would
make the restriction hold, use a structured suggestion pointing at an
appropriate place (type param in param list or `where` clause).
Account for opaque parameters where instead of suggesting extending
the `where` clause, we suggest appending the new restriction:
`fn foo(impl Trait + UnmetTrait)`. Fix #64565, fix #41817, fix #24354,
cc #26026, cc #37808, cc #24159, fix #37138, fix #24354, cc #20671.
|
|
Add check for overlapping ranges to unreachable patterns lint
Fix #63987.
|
|
|
|
[const-prop] Handle remaining MIR Rvalue cases
r? @oli-obk
|
|
More symbol cleanups
Some minor improvements, mostly aimed at reducing unimportant differences between `Symbol` and `InternedString`. Helps a little with #60869.
r? @petrochenkov
|
|
expand: Simplify expansion of derives
And make it more uniform with other macros.
This is done by merging placeholders for future derives' outputs into the derive container's output fragment early (addressing FIXMEs from https://github.com/rust-lang/rust/pull/63667).
Also, macros with names starting with `_` are no longer reported as unused, in accordance with the usual behavior of `unused` lints.
r? @matthewjasper or @mark-i-m
|
|
|
|
And make it more uniform with other macros.
By merging placeholders for future derives' outputs into the derive container's output fragment early.
|
|
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.
|
|
Speed up `LexicalResolve::expansion()`
A couple of improvements that speed up `unicode_normalization` by about 4%. The first commit was enabled by the improvements to `BitSet` iteration in #65425.
r? @nikomatsakis
|
|
Use a sharded dep node to dep node index map
Split out from https://github.com/rust-lang/rust/pull/61845 and based on https://github.com/rust-lang/rust/pull/63756.
r? @nikomatsakis
|
|
Prepare `MutVisitor`s to handle interned projections
The following are all the files where mir's `MutVisitor` is implemented. The `-` there stands for no changes, `visit_place` wasn't making any change on `Place`s. `x` stands for this file was changed to make `visit_place` do whatever it was doing with the base but avoid modifying the projection, instead just create a new one and assign to it.
```
[-] src/librustc_mir/transform/no_landing_pads.rs
[x] src/librustc_mir/transform/promote_consts.rs
[x] src/librustc_mir/transform/generator.rs
[x] src/librustc_mir/transform/erase_regions.rs
[-] src/librustc_mir/transform/instcombine.rs
[x] src/librustc_mir/transform/inline.rs
[x] src/librustc_mir/transform/simplify.rs
[x] src/librustc_mir/util/def_use.rs
[-] src/librustc_mir/transform/const_prop.rs
[-] src/librustc_mir/transform/cleanup_post_borrowck.rs
[x] src/librustc_mir/borrow_check/nll/renumber.rs
[-] src/librustc_mir/transform/copy_prop.rs
```
There is some code repetition, just created the PR so we can start discussing it.
/cc @oli-obk @nikomatsakis
|
|
|
|
They aren't used.
|
|
|
|
In particular, use a blank visit_place for mutable visitor to be sure,
non modified visitors are not trying to mutating place.
|
|
struct.
|
|
Move to using Box<dyn Fn() -> ...> so that we can let plugins register
state.
This also adds a callback that'll get called from plugin registration so
that Clippy and other tools can register lints without using the plugin
API. The plugin API still works, but this new API is more compatible
with drivers other than rustc.
|
|
Remove lint store from Session
|
|
Access through tcx is fine -- by that point, the lint store is frozen,
but direct access through Session will go away in future commits, as
lint store is still mutable in early stages of Session, and will be
removed completely.
|
|
Avoid querying LintStore when not necessary
|
|
Moves this information to a direct field of Lint, which is where it
belongs.
|
|
|
|
This stops storing the pass objects and instead stores constructor
functions.
The primary effect is that LintStore no longer has any interior
mutability.
|
|
|
|
This moves from calling get_lints on instantiated pass objects to the
raw object
|
|
This is in preparation for on-demand constructing passes
|
|
|
|
|
|
|
|
This extracts the call to get_lints() to callers.
|
|
This is straight up removing dead code, but is a separate commit from
the previous to avoid conflating clean up and important changes.
|
|
Replace early_error and sess.err with bug!, in all cases. If the
compiler we're running with, including plugins, is registering something
twice, that's a (compiler/plugin) programmer error -- we should not try
to be nice at the cost of developer ergononomics (hiding the stacktrace
of the second registration is bad).
This also is basically a static bug in ~all cases so it should not be a
detriment to users, including with plugins.
|
|
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.
|
|
Move syntax::ext to a syntax_expand and refactor some attribute logic
Part of https://github.com/rust-lang/rust/pull/65324.
r? @petrochenkov
|
|
|