| Age | Commit message (Collapse) | Author | Lines |
|
r=estebank
Fix #58270, fix off-by-one error in error diagnostics.
This fixes #58270 by checking if two diagnostics overlap completely when we're calculating the line offset for each message.
|
|
Stabilize futures_api
cc https://github.com/rust-lang/rust/issues/59725.
Based on https://github.com/rust-lang/rust/pull/59733 and https://github.com/rust-lang/rust/pull/59119 -- only the last two commits here are relevant.
r? @withoutboats , @oli-obk for the introduction of `rustc_allow_const_fn_ptr`.
|
|
Replace HashMap implementation with SwissTable (as an external crate)
This is the same as #56241 except that it imports `hashbrown` as an external crate instead of copying the implementation into libstd.
This includes a few API changes (all unstable):
- `try_reserve` is added to `HashSet`.
- Some trait bounds have been changed in the `raw_entry` API.
- `search_bucket` has been removed from the `raw_entry` API (doesn't work with SwissTable).
|
|
|
|
|
|
Warn when ignore-tidy-linelength is present, but no lines are too long
It's easy for a `// ignore-tidy-linelength` to be added when there is a genuine need to ignore a file's line length, but then after refactoring the need is gone, but the tidy directive is not removed. This means that in the future, further editing may accidentally add unnecessarily long lines. This change forces `// ignore-tidy-linelength` to be used exactly when necessary, to make sure such changes are intentional.
|
|
|
|
|
|
Don't stop evaluating due to errors before borrow checking
r? @oli-obk
Fix #60005. Follow up to #59903. Blocked on #53708, fixing the ICE in `src/test/ui/consts/match_ice.rs`.
|
|
Disallow double trailing newlines in tidy
This wasn't done previously in https://github.com/rust-lang/rust/pull/47064#issuecomment-354533010 as it affected too many files, but I think it's best to fix it now so that the number of files with double trailing newlines doesn't keep increasing.
r? kennytm
|
|
|
|
|
|
|
|
|
|
|
|
avoid type-check body of DefId
fix: #60049
related: PR #59798
|
|
|
|
Point at try `?` on errors affecting the err match arm of the desugared code
Fix #59980.
|
|
Change suggestion of field when not in self context
Fix #60057.
|
|
Correct unused parameter diagnostic
The message was incorrect for unused lifetime parameters. There's no need to be specific.
|
|
When looking at the documentation for `std::f32` or `std::str`, for
example, it is easy to get confused and assume `std::f32` and `f32`
are the same thing. Because of this, it is not uncommon to attempt
writing `f32::consts::PI` instead of the correct
`std::f32::consts::PI`. When encountering the former, which results
in an access error due to it being an inexistent path, try to access
the same path under `std`. If this succeeds, this information is
stored for later tweaking of the final E0599 to provide an
appropriate suggestion.
This suggestion applies to both E0233 and E0599 and is only checked
when the first ident of a path corresponds to a primitive type.
|
|
|
|
|
|
|
|
|
|
|
|
Fix ICE on const evaluation of const method
Fix #54954.
|
|
Do not mention missing `PartialOrd` impl when involving uncalled fns
|
|
|
|
|
|
|
|
|
|
|
|
compiletest normalization: preserve non-JSON lines such as ICEs
Currently, every non-JSON line from stderr gets normalized away when compiletest normalizes the output. In particular, ICEs get normalized to the empty output. That does not seem desirable, so this changes normalization to preserve non-JSON lines instead.
Also see https://github.com/laumann/compiletest-rs/issues/169: because of that bug, Miri currently *looks* green in the toolstate, but some tests ICE. That same bug is likely no longer present in latest compiletest because the error code gets checked separately, but it still seems like a good idea to also make sure that ICEs are considered stderr output:
This change found an accidental user-visible `error!` in CTFE validation (fixed), and a non-deterministic panic when there are two `main` symbols (not fixed, no idea where this comes from). Both got missed before because non-JSON output got ignored.
|
|
Remove duplicated redundant spans
Fix #59895.
|
|
|
|
|
|
Improvement for comparision against fn
I try to add error message.
related: https://github.com/rust-lang/rust/issues/59488
|
|
|
|
Tweak unstable diagnostic output
|
|
Suggest removing `?` to resolve type errors.
Fixes #59756.
|
|
clarify what the item is in "not a module" error
The motivation here was that I was trying to import an associated constant when I thought it was an enum variant, and got confused by this error.
Ideally I would like to add a note saying that associated constants, types, and methods cannot be imported, but I'm not sure that the associated items for a `Def` can be checked at resolve time.
|
|
Remove check_match from const_eval
This fixes #59378.
It seems that the `check_match` may be unnecessary, so this removes it per instructions provided in the issue. I re-ran the tests for `librustc_mir` and everything seemed fine!
|
|
|
|
|
|
|
|
|
|
This commit adds a suggestion to remove the `?` from expressions if
removing the `?` would resolve a type error.
|
|
|
|
|