| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
work
|
|
|
|
|
|
Most of these are meant to test possible future improvements, but since
they cover cases the existing test suite didn't, I figure including them
now may be helpful.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mode
|
|
|
|
|
|
This aligns the main error message a bit more with the phrasing in the
Edition Guide and provides a bit more information on the labels to
(hopefully!) aid in understanding.
|
|
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #136145 (Test validity of pattern types)
- #136339 (CompileTest: Add Directives to Ignore `arm-unknown-*` Targets)
- #136403 (Fix malformed error annotations in a UI test)
- #136414 (Shorten error message for callable with wrong return type)
- #136425 (Move `rustc_middle::infer::unify_key`)
- #136426 (Explain why we retroactively change a static initializer to have a different type)
- #136445 (Couple of cleanups to DiagCtxt and EarlyDiagCtxt)
- #136452 (Miri subtree update)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Miri subtree update
r? `@ghost`
Unblocks https://github.com/rust-lang/rust/pull/122408 from the Miri side
|
|
Couple of cleanups to DiagCtxt and EarlyDiagCtxt
|
|
Explain why we retroactively change a static initializer to have a different type
I keep getting confused about it and in turn confused `@GuillaumeGomez` while trying to explain it badly
|
|
Move `rustc_middle::infer::unify_key`
`rustc_infer` is a much better place for it.
r? `@lcnr`
|
|
Shorten error message for callable with wrong return type
```
error: expected `{closure@...}` to return `Ret`, but it returns `Other`
```
instead of
```
error: expected `{closure@...}` to be a closure that returns `Ret`, but it returns `Other`
```
|
|
Fix malformed error annotations in a UI test
The compiletest DSL still features a historical remnant from the time when its directives were merely prefixed with `//` instead of `//`@`` when unknown directive names weren't rejected since they could just as well be part of prose:
As an "optimization", it stops looking for directives once it stumbles upon a line which starts with either `fn` or `mod`. This allowed a malformed error annotation of the form `//`@[…]~^^^`` to go undetected & unexercised (as it's placed below `fn main() {`).
Obviously a character other than ``@`` would've mangled the error annotation, too (but it might've caught the reviewer's eye). I specifically found this file because I ran `rg '^(fn|mod)[\s\S]*?//`@'` tests/ui --multiline -trust` to check how footgun-y that "special feature" of compiletest is.
|
|
CompileTest: Add Directives to Ignore `arm-unknown-*` Targets
In #134626, I want to ignore `arm-unknown-*` targets because the LLVM IR for those looks very different compared to other targets: https://rust.godbolt.org/z/ssYMhdv4x.
I can use `ignore-arm` but, I think, it would exclude large number of Apple devices.
So this PR adds a few directives to ignore `arm-unknown-*` targets specifically.
|
|
Test validity of pattern types
r? `@RalfJung`
pulled out of #136006 so we don't have to rely on libcore types excercising this code path
There's nothing to fix. `rustc_layout_scalar_valid_range_start` structs just failed their validation on their value instead of their fields' value, causing a diff where moving to pattern types adds an additional `.0` field access to the validation error
|
|
|
|
shim Apple's futex primitives
|
|
|
|
|
|
This is necessary to unblock rust-lang/rust#122408. The documentation for these is available [here](https://developer.apple.com/documentation/os/os_sync_wait_on_address?language=objc).
Because the futex wait operations (`os_sync_wait_on_address` et al.) return the number of remaining waiters after returning, this required some changes to the common futex infrastructure, which I've changed to take a callback instead of precalculating the return values.
|
|
|
|
miri_get_backtrace: stop supporting the v0 protocol
|
|
files: make read/write take callback to store result
|
|
Rollup of 7 pull requests
Successful merges:
- #134272 (Remove rustc_encodable_decodable feature)
- #136283 (Update encode_utf16 to mention it is native endian)
- #136394 (Clean up MonoItem::instantiation_mode)
- #136402 (diagnostics: fix borrowck suggestions for if/while let conditionals)
- #136415 (Highlight clarifying information in "expected/found" error)
- #136422 (Convert two `rustc_middle::lint` functions to `Span` methods.)
- #136434 (rustc_allowed_through_unstable_modules: require deprecation message)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
RalfJung:rustc_allowed_through_unstable_modules-deprecation-required, r=compiler-errors
rustc_allowed_through_unstable_modules: require deprecation message
This changes the `#[rustc_allowed_through_unstable_modules]` attribute so that a deprecation message (ideally directing people towards the stable path) is required.
|
|
Convert two `rustc_middle::lint` functions to `Span` methods.
`rustc_middle` is a huge crate and it's always good to move stuff out of it. There are lots of similar methods already on `Span`, so these two functions, `in_external_macro` and `is_from_async_await`, fit right in. The diff is big because `in_external_macro` is used a lot by clippy lints.
r? ``@Noratrieb``
|
|
Highlight clarifying information in "expected/found" error
When the expected and found types have the same textual representation, we add clarifying in parentheses. We now visually highlight it in the output.
Detect a corner case where the clarifying information would be the same for both types and skip it, as it doesn't add anything useful.

|
|
r=compiler-errors
diagnostics: fix borrowck suggestions for if/while let conditionals
This code detects the case where one of the borrows is inside the let init expr while the other end is not. If that happens, we don't want to suggest adding a semicolon, because it won't work.
Fixes #133941
|
|
r=compiler-errors
Clean up MonoItem::instantiation_mode
More progress on cleaning up and documenting instantiation mode selection.
This should have no behavior changes at all, it just rearranges the code inside `MonoItem::instantiation_mode` to a more logical flow and I've tried to explain every choice the implementation is making.
|
|
Update encode_utf16 to mention it is native endian
Fixes #83102
|
|
r=oli-obk
Remove rustc_encodable_decodable feature
This has been shown in future-compat reports since Rust 1.79 (https://github.com/rust-lang/rust/pull/116016), released June 2024. Let's see if crater still finds any issues.
Part of https://github.com/rust-lang/rust/issues/134301.
Cc ``@rust-lang/libs-api``
|
|
'dest' directly
|