| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
Eliminate confusing "globals" terminology.
There are some structures that are called "globals", but are they global
to a compilation session, and not truly global. I have always found this
highly confusing, so this commit renames them as "session globals" and
adds a comment explaining things.
Also, the commit fixes an unnecessary nesting of `set()` calls
`src/librustc_errors/json/tests.rs`
r? @Aaron1011
|
|
There are some structures that are called "globals", but are they global
to a compilation session, and not truly global. I have always found this
highly confusing, so this commit renames them as "session globals" and
adds a comment explaining things.
Also, the commit fixes an unnecessary nesting of `set()` calls
`src/librustc_errors/json/tests.rs`
|
|
|
|
Does not yet make its constness stable, though. Use of
`Location::caller` in const contexts is still gated by
`#![feature(const_caller_location)]`.
|
|
errors: use `-Z terminal-width` in JSON emitter
This PR makes the JSON emitter use `-Z terminal-width` in the "rendered" field of the JSON output.
r? @estebank
|
|
This commit makes the JSON emitter use `-Z terminal-width` in the
"rendered" field of the JSON output.
Signed-off-by: David Wood <david@davidtw.co>
|
|
This commit modifies the column width computation in the emitter when
`termize::dimensions` returns `None` so that it uses the default value
of 140 (which is used in UI testing currently) instead of `usize::MAX`
which just ends up causing overflows in later computations. This is hard
to test but appears to produce the same output as using saturating
functions instead.
Signed-off-by: David Wood <david@davidtw.co>
|
|
|
|
On recursive ADT, provide indirection structured suggestion
|
|
Handle assembler warnings properly
Previously all inline asm diagnostics were treated as errors, but LLVM sometimes emits warnings and notes as well.
Fixes #73160
r? @petrochenkov
|
|
|
|
Fixes more of:
clippy::unused_unit
clippy::op_ref
clippy::useless_format
clippy::needless_return
clippy::useless_conversion
clippy::bind_instead_of_map
clippy::into_iter_on_ref
clippy::redundant_clone
clippy::nonminimal_bool
clippy::redundant_closure
clippy::option_as_ref_deref
clippy::len_zero
clippy::iter_cloned_collect
clippy::filter_next
|
|
|
|
Update annotate-snippets-rs to 0.8.0
#59346
I made major changes to this library. In the previous version we worked with owned while in the current one with borrowed.
I have adapted it without changing the behavior.
I have modified the coverage since the previous one did not return correctly the index of the character in the line.
|
|
|
|
|
|
|
|
|
|
|
|
Fix off by one in treat err as bug
`-Ztreat-err-as-bug` doesn't work properly with delay_span_bug.
r? @eddyb
|
|
delay_span_bug bumps error_count after checking treat_err_as_bug
|
|
These are semantically the same, but `find_map()` is more concise.
|
|
|
|
|
|
|
|
|
|
Tweak output of type params and constraints in the wrong order
r? @Centril @varkor
|
|
(clippy::single_match)
Makes code more compact and reduces nestig.
|
|
|
|
When encountering constraints before type arguments or lifetimes,
suggest the correct order.
|
|
They used to be covered by `optin_builtin_traits` but negative impls
are now applicable to all traits, not just auto traits.
This also adds docs in the unstable book for the current state of auto traits.
|
|
pnkfelix:issue-68808-dont-turn-dummy-spans-into-invalid-lines, r=estebank
Revised span-to-lines conversion to produce an empty vec on DUMMY_SP.
This required revising some of the client code to stop relying on the returned set of lines being non-empty.
Fix #68808
|
|
|
|
This required revising some of the client code to stop relying on
the returned set of lines being non-empty.
|
|
|
|
|
|
This removes a hack from `load_macro_untracked` in which parsing is used.
|
|
These were introduced since I last fixed most of these occurences. (clippy::clone_on_copy, clippy::single_char_pattern)
|
|
anything.
For example: `if let Some(_) = foo() {}` can be reduced to `if foo().is_some() {}` (clippy::redundant_pattern_matching)
|
|
nnethercote:fix-DiagnosticBuilder-into_diagnostic-leak, r=Centril
Fix a leak in `DiagnosticBuilder::into_diagnostic`.
Fixes #69600.
r? @Centril
|
|
more cleanups
* use starts_with() instead of chars().next() == Some(x)
* use subsec_micros() instead of subsec_nanos() / 1000
* use for (idx, item) in iter.enumerate() instead of manually counting loop iterations with variables
* use values() or keys() respectively when iterating only over keys or values of maps.
|
|
stash API: remove panic to fix ICE.
Implements the temporary solution suggested in https://github.com/rust-lang/rust/pull/69537#issuecomment-593143975.
Fixes https://github.com/rust-lang/rust/issues/69396.
r? @petrochenkov
|
|
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
|