| Age | Commit message (Collapse) | Author | Lines |
|
Fixes #69600.
|
|
|
|
iterations by variables
|
|
|
|
Rollup of 6 pull requests
Successful merges:
- #69477 (docs: add mention of async blocks in move keyword docs)
- #69504 (Use assert_ne in hash tests)
- #69546 (use to_vec() instead of .iter().cloned().collect() to convert slices to vecs.)
- #69551 (use is_empty() instead of len() == x to determine if structs are empty.)
- #69563 (Fix no_std detection for target triples)
- #69567 (use .to_string() instead of format!() macro to create strings)
Failed merges:
r? @ghost
|
|
perf: Buffer stderr when writing json errors/warnings
Since `stderr` is unbuffered, writing out json messages actually take up
about ~10%/0.1s of the runtime of the `inflate` benchmark as it generates a fair number of warnings.
cc #64413
|
|
use .to_string() instead of format!() macro to create strings
handles what is left after https://github.com/rust-lang/rust/pull/69541
|
|
|
|
|
|
|
|
Even when buffered. Ideally we would flush only when the emitter is
done, but that requires larger changes. This gives most of the benefit
of buffering in any case.
|
|
Since `stderr` is unbuffered, writing out json messages actually take up
about ~10%/0.1s of the runtime of the `inflate` benchmark.
cc #64413
|
|
Rollup of 8 pull requests
Successful merges:
- #66498 (Remove unused feature gates)
- #68816 (Tweak borrow error on `FnMut` when `Fn` is expected)
- #68824 (Enable Control Flow Guard in rustbuild)
- #69022 (traits: preallocate 2 Vecs of known initial size)
- #69031 (Use `dyn Trait` more in tests)
- #69044 (Don't run coherence twice for future-compat lints)
- #69047 (Don't rustfmt check the vendor directory.)
- #69055 (Clean up E0307 explanation)
Failed merges:
r? @ghost
|
|
Remove unused feature gates
I think many of the remaining unstable things can be easily be replaced with stable things. I have kept the `#![feature(nll)]` even though it is only necessary in `libstd`, to make regressions of it harder.
|
|
|
|
Caller now passes in a `decorate` function, which is only run if the
lint is allowed.
|
|
Initial implementation of `#![feature(move_ref_pattern)]`
Following up on #45600, under the gate `#![feature(move_ref_pattern)]`, `(ref x, mut y)` is allowed subject to restrictions necessary for soundness. The match checking implementation and tests for `#![feature(bindings_after_at)]` is also adjusted as necessary.
Closes #45600.
Tracking issue: #68354.
r? @matthewjasper
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Use termize instead of term_size
`termize` is a fork of `term_size` which uses `winapi` 0.3 instead of 0.2. This is a step towards removing the `winapi` 0.2 dependency.
r? @Mark-Simulacrum
|
|
|
|
|
|
|
|
|
|
|
|
Further improve `impl Trait`/`dyn Trait` suggestions
After reading [_Returning Trait Objects_ by Bryce Fisher-Fleig](https://bryce.fisher-fleig.org/blog/returning-trait-objects/), [I noticed that](https://www.reddit.com/r/rust/comments/esueur/returning_trait_objects/ffczl4k/) #68195 had a few bugs due to not ignoring `ty::Error`.
- Account for `ty::Error`.
- Account for `if`/`else` and `match` blocks when pointing at return types and referencing their types.
- Increase the multiline suggestion output from 6 lines to 20.
|
|
|
|
When encountering a multipart suggestion with spans belonging to
different contexts, skip that suggestion.
|
|
|
|
|
|
|
|
Do not ICE on malformed suggestion spans
Under the assumption that suggestions are by their very nature always "best effort", it is ok if we don't display them instead of having an ICE. The underlying issue of the malformed span being _created_ is left unaddressed.
Fix #67567.
r? @petrochenkov
|
|
|
|
|
|
found via clippy
|
|
|
|
|
|
|
|
- remove syntax::{help!, span_help!, span_note!}
- remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!}
- lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints
- inline syntax::{struct_span_warn!, diagnostic_used!}
- stringify_error_code! -> error_code! & use it more.
- find_plugin_registrar: de-fatalize an error
- de-fatalize metadata errors
- move type_error_struct! to rustc_typeck
- struct_span_err! -> rustc_errors
|
|
The existing code seems to assume that substitutions spans are disjoint,
which is not always the case.
In the example:
pub trait AAAA {}
pub trait B {}
pub trait C {}
pub type T<P: AAAA + B + C> = P;
, we get three substituions starting from ':' and ending respectively at
the end of each trait token.
With the former offset calculation, this would cause `underline_start` to
eventually become negative before being converted to `usize`...
The new version may report erroneous results for non perfectly overlapping
substitutions but I don't know if such examples exist. Alternatively, we
could detect these cases and trim out overlapping substitutions.
|
|
|
|
|
|
|
|
|
|
Set callbacks globally
This sets the callbacks from syntax and rustc_errors just once, utilizing static (rather than thread-local) storage.
|