| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
Add some UI tests and reword error-code docs
Added UI tests for `E0013` and `E0015`. Error code docs for `E0015` were a bit unclear (they referred to all non-const errors in const context, when only non-const functions applied), so I touched them up a bit.
I also fixed up some issues in the new `error_codes.rs` tidy check (linked #106341), that I overlooked previously.
r? ``@GuillaumeGomez``
|
|
|
|
Point out span where we could introduce higher-ranked lifetime
Somewhat addresses #105422, but not really. We don't have that much useful information here since we're still in resolution :^(
Maybe this suggestion isn't worth it. If the reviewer has an idea how we can get a more succinct binder information for a structured suggestion, it would be appreciated.
|
|
Reduce spans for `unsafe impl` errors
Because huge spans aren't great for IDEs.
Prior art: https://github.com/rust-lang/rust/pull/103749
|
|
|
|
|
|
refactor: merge error code `E0465` into `E0464`
`E0465` is an undocumented and untested error code that is functionally identical to `E0464`. This PR merges `E0465` into `E0464`, thus documenting and testing another error code (#61137).
r? `@GuillaumeGomez` (not sure if you want to review this but it's relevant to my other PRs that you have reviewed)
|
|
Use verbose suggestions for mutability errors
|
|
|
|
|
|
|
|
Fix #56036, fix #76589.
|
|
|
|
|
|
print argument name in arg mismatch if possible
A bit more contextual than just `/* value */`, at least when the argument is named something related to its context.
The UI test cases are... not super convincing, but also they're minimized tests.
|
|
|
|
|
|
|
|
Suggest `collect`ing into `Vec<_>`
Fix #105510.
|
|
Make some diagnostics not depend on the source of what they reference being available
r? `@estebank`
follow up to https://github.com/rust-lang/rust/pull/104449
|
|
Remove previously existing fallback that tried to give a good turbofish
suggestion, `need_type_info` is already good enough.
Special case `::<Vec<_>` suggestion for `Iterator::collect`.
|
|
|
|
Synthesize a more accurate span and use verbose suggestion output to
make the message clearer.
|
|
|
|
|
|
|
|
available
|
|
|
|
On type error with long types, print an abridged type and write the full
type to disk.
Print the widest possible short type while still fitting in the
terminal.
|
|
|
|
When printing requirement overflow errors, do not print out the full
type name when it is longer than 50 characters long.
|
|
|
|
|
|
|
|
Implement `std::marker::Tuple`, use it in `extern "rust-call"` and `Fn`-family traits
Implements rust-lang/compiler-team#537
I made a few opinionated decisions in this implementation, specifically:
1. Enforcing `extern "rust-call"` on fn items during wfcheck,
2. Enforcing this for all functions (not just ones that have bodies),
3. Gating this `Tuple` marker trait behind its own feature, instead of grouping it into (e.g.) `unboxed_closures`.
Still needing to be done:
1. Enforce that `extern "rust-call"` `fn`-ptrs are well-formed only if they have 1/2 args and the second one implements `Tuple`. (Doing this would fix ICE in #66696.)
2. Deny all explicit/user `impl`s of the `Tuple` trait, kinda like `Sized`.
3. Fixing `Tuple` trait built-in impl for chalk, so that chalkification tests are un-broken.
Open questions:
1. Does this need t-lang or t-libs signoff?
Fixes #99820
|
|
Stabilize the `instruction_set` feature
Closes https://github.com/rust-lang/rust/issues/74727
FCP is complete on https://github.com/rust-lang/rust/issues/74727#issuecomment-1242773253
r? `@pnkfelix` and/or `@nikomatsakis`
cc `@xd009642`
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
|
|
|
|
Specify that `break` cannot be used outside of loop *or* labeled block
Closes #103981
`@rustbot` label +A-diagnostics
|
|
|
|
|
|
Use `adt_def` during type collection.
This removes a wrapper which is close to what `adt_def` does.
|
|
|
|
Enable varargs support for calling conventions other than C or cdecl
This patch makes it possible to use varargs for calling conventions,
which are either based on C (efiapi) or C is based on them (sysv64 and win64).
Also pinging ``@phlopsi,`` because he noticed first this oversight when writing a library for UEFI.
|
|
|
|
This patch makes it possible to use varargs for calling conventions,
which are either based on C (like efiapi) or C is based
on them (for example sysv64 and win64).
|
|
|
|
|
|
|