| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Co-authored-by: csmoe <35686186+csmoe@users.noreply.github.com>
|
|
|
|
|
|
This leads to a lot of simplifications, as most code doesn't actually need to know about the specific lifetime/type data; rather, it's concerned with properties like name, index and def_id.
|
|
|
|
|
|
Fixes #50501
|
|
|
|
|
|
|
|
Move query code outside macros and store query jobs separately from query results
Based on https://github.com/rust-lang/rust/pull/50067
r? @michaelwoerister
|
|
|
|
InternedString
|
|
|
|
|
|
|
|
(rather than issuing multiple errors)
Also, reorder so that the annotations are considered "used" when the
lint runs.
|
|
editions are allowed to be used on non-nightly builds
|
|
Make Handler more thread-safe
The use of `code_emitted` to suppress extended explanations is not thread safe. I'm not sure why we keep the documentation for errors outside `diagnostics.rs` anyway. It would be better to add a `teach` method to `DiagnosticsBuilder`, so instead of:
```
if self.tcx.sess.teach(&err.get_code().unwrap()) {
err.note("...");
}
```
we'd use `err.teach("...")`
cc @estebank
r? @michaelwoerister
|
|
Various rustfmt and commenting changes
These are factored out of #49320
There aren't actually any changes in functionality, just rustfmt and doccomments.
|
|
|
|
|
|
|
|
More thread-safety changes
r? @michaelwoerister
|
|
Prevent broken pipes causing ICEs
As the private `std::io::print_to` panics if there is an I/O error, which is used by `println!`, the compiler would ICE if one attempted to use a broken pipe (e.g. `rustc --help | false`). This introduces a new (private) macro `try_println!` which allows us to avoid this.
As a side note, it seems this macro might be useful publicly (and actually there seems to be [a crate specifically for this purpose](https://crates.io/crates/try_print/)), though that can probably be left for a future discussion.
One slight alternative approach would be to simply early exit without an error (i.e. exit code `0`), which [this comment](https://github.com/rust-lang/rust/issues/34376#issuecomment-377822526) suggests is the usual approach. I've opted not to take that approach initially, because I think it's more helpful to know when there is a broken pipe.
Fixes #34376.
|
|
Skip MIR encoding for cargo check
Resolves #48662.
r? @michaelwoerister
|
|
|
|
r=petrochenkov
Use InternedString rather than Name for RegionParameterDef
This makes it consistent with `TypeParameterDef`.
|
|
This makes it consistent with TypeParameterDef.
|
|
Even more thread-safety changes
r? @michaelwoerister
|
|
Use sort_by_cached_key where appropriate
A follow-up to https://github.com/rust-lang/rust/pull/48639, converting various slice sorting calls to `sort_by_cached_key` when the key functions are more expensive.
|
|
|
|
Move deny(warnings) into rustbuild
This permits easier iteration without having to worry about warnings
being denied.
Fixes #49517
|
|
Use InternedString instead of Symbol for type parameter types (2)
Reduced alternative to #49266. Let's see if this causes a performance regression.
|
|
|
|
|
|
|
|
|
|
This permits easier iteration without having to worry about warnings
being denied.
Fixes #49517
|
|
|
|
|
|
|
|
|
|
rustc_driver: get rid of the extra thread
**Do not rollup**
We can alter the stack size afterwards on Unix.
Having a separate thread causes poor debugging experience when interrupting with signals. I have to get the backtrace of the all thread, as the main thread is waiting to join doing nothing else. This patch allows me to just run `bt` to get the desired backtrace.
|
|
Implement some trivial size_hints for various iterators
This also implements ExactSizeIterator where applicable.
Addresses most of the Iterator traits mentioned in #23708.
I intend to do more, but I don't want to make the PR too large.
|
|
Remove universes from `ty::ParamEnv`
This change was never meant to land. #48407 takes an alternate approach. However, that PR is now blocked on some issues with canonicalization, and rebasing these reverts gets harder each time, so let's just get this bit out of the way now.
r? @nikomatsakis
|
|
If the cached data can't be loaded from disk, just issue a warning to
the user so they know why compilation is taking longer than usual but
don't fail the entire compilation since we can recover by ignorning the
on disk cache.
In the same way, if the disk cache can't be deserialized (because it has
been corrupted for some reason), report the issue as a warning and
continue without failing the compilation. `Decodable::decode()` tends to
panic with various errors like "entered unreachable code" or "index out
of range" if the input data is corrupted. Work around this by catching
panics from the `decode()` calls when joining the thread and continuing
without the cached data.
Fixes #48847
|
|
Always print `aborting due to n previous error(s)`
r? @michaelwoerister
|
|
This reverts commit 17df455c2eda9717e2d7ff2f43809b553852d7e6.
|