| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Bring attention to suggestions when the only difference is capitalization
CC #65386.
|
|
r=nikomatsakis
Optimize `LexicalResolve::expansion`.
A win for `unicode_normalization`.
r? @nikomatsakis
|
|
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
|
|
|
|
Rollup of 7 pull requests
Successful merges:
- #65215 (Add long error explanation for E0697)
- #65292 (Print lifetimes with backticks)
- #65362 (syntax: consolidate function parsing in item.rs)
- #65363 (Remove implicit dependencies on syntax::pprust)
- #65379 (refactor session::config::build_session_options_and_crate_config)
- #65392 (Move `Nonterminal::to_tokenstream` to parser & don't rely directly on parser in lowering)
- #65395 (Add some tests for fixed ICEs)
Failed merges:
r? @ghost
|
|
Move `Nonterminal::to_tokenstream` to parser & don't rely directly on parser in lowering
Split out from https://github.com/rust-lang/rust/pull/65324.
r? @petrochenkov
|
|
refactor session::config::build_session_options_and_crate_config
I'm not exactly sure what happened in https://github.com/rust-lang/rust/pull/65361#issuecomment-541420179 so in an effort to bisect the error I'm extracting out the first commit so it can hopefully land (I suspect the error is in the 2nd-3rd commits.)
r? @petrochenkov
(I'll r=you when the PR builder is happy)
|
|
Remove implicit dependencies on syntax::pprust
Part of https://github.com/rust-lang/rust/pull/65324.
The main goal here is to facilitate the eventual move of pprust out from libsyntax and because an AST definition typically should not depend on its pretty printer.
r? @estebank
|
|
Print lifetimes with backticks
Fixes #65287
r? @varkor
|
|
Add long error explanation for E0697
Part of #61137
r? @GuillaumeGomez
|
|
|
|
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
|
|
|
|
|
|
|
|
Don't discard value names when using address or memory sanitizer
The value names are used when reporting issues found by address
sanitizer or memory sanitizer. Avoid discarding names when those
sanitizers are enabled, unless explicitly requested to do otherwise.
|
|
Split non-CAS atomic support off into target_has_atomic_load_store
This PR implements my proposed changes in https://github.com/rust-lang/rust/issues/32976#issuecomment-518542029 by removing `target_has_atomic = "cas"` and splitting `target_has_atomic` into two separate `cfg`s:
* `target_has_atomic = 8/16/32/64/128`: This indicates the largest width that the target can atomically CAS (which implies support for all atomic operations).
* ` target_has_atomic_load_store = 8/16/32/64/128`: This indicates the largest width that the target can support loading or storing atomically (but may not support CAS).
cc #32976
r? @alexcrichton
|
|
|
|
Report `CONST_ERR` lint in external macros
fixes #65300
fixes #61058
r? @oli-obk
|
|
The value names are used when reporting issues found by address
sanitizer or memory sanitizer. Avoid discarding names when those
sanitizers are enabled, unless explicitly requested to do otherwise.
|
|
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
|
|
Instead just use `pprust::path_to_string(..)` where needed.
This has two benefits:
a) The AST definition is now independent of printing it.
(Therefore we get closer to extracting a data-crate.)
b) Debugging should be easier as program flow is clearer.
|
|
|
|
stability: Do not use `buffer_lint` after lowering to HIR
Fixes https://github.com/rust-lang/rust/issues/65253
|
|
Query generator kind for error reporting
Fixes https://github.com/rust-lang/rust/pull/65166#discussion_r333114545
r? @estebank
cc @cramertj
|
|
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`.
|
|
Add ?Sized bound to a supertrait listing in E0038 error documentation
This example failed to compile because of implicit `Sized` bound for `A` parameter that wasn't required by `Trait`.
|
|
Function pointers as const generic arguments
Makes function pointers as const generic arguments usable.
Fixes #62395
r? @varkor
|
|
|
|
|
|
Stabilize mem::take (mem_take)
Tracking issue: https://github.com/rust-lang/rust/issues/61129
r? @matklad
|
|
|
|
|
|
|
|
|
|
Add llvm.sideeffect to potential infinite loops and recursions
LLVM assumes that a thread will eventually cause side effect. This is
not true in Rust if a loop or recursion does nothing in its body,
causing undefined behavior even in common cases like `loop {}`.
Inserting llvm.sideeffect fixes the undefined behavior.
As a micro-optimization, only insert llvm.sideeffect when jumping back
in blocks or calling a function.
A patch for LLVM is expected to allow empty non-terminate code by
default and fix this issue from LLVM side.
https://github.com/rust-lang/rust/issues/28728
**UPDATE:** [Mentoring instructions here](https://github.com/rust-lang/rust/pull/59546#issuecomment-515072429) to unstall this PR
|
|
Per review feedback.
|
|
|
|
|
|
|
|
|
|
The function only has one call site, so we don't need a tag argument.
|
|
This wins 6% on `unicode_normalization`, by avoiding a call to
`lub_concrete_regions()` and a `Region` equality test.
|
|
Some places use the local `tcx` variable, some use `self.tcx()`. This
commit removes the local variable so that all places use `self.tcx()`,
for consistency.
|
|
Note when a mutable trait object is needed
Fix https://github.com/rust-lang/rust/issues/63619, fix https://github.com/rust-lang/rust/issues/37914. CC https://github.com/rust-lang/rust/issues/64068.
|
|
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.
|