Fix ICE when include_str! reads binary files
ICE occurred when an invalid UTF8 file with an absolute path were included.
resolve: rust-lang/rust#149304
Show backtrace on allocation failures when possible
And if an allocation while printing the backtrace fails, don't try to print another backtrace as that will never succeed.
Split out of https://github.com/rust-lang/rust/pull/147725 to allow landing this independently of a decision whether or not to remove `-Zoom=panic`.
Run `eval_config_entry` on all branches so we always emit lints
Fixes https://github.com/rust-lang/rust/issues/149090
Ideally I'd have liked to fix this issue using https://github.com/rust-lang/rust/pull/149215, and this is still the long term plan, but this is slightly more annoying to implement than I'd have liked to, and this is also a nice and easy solution to the problem.
r? `@tgross35`
rustc_borrowck: Don't suggest changing closure param type not under user control
This changes output of a handful of tests more than the one added in the first commit, but as far as I can tell, all removed suggestions were invalid.
Closesrust-lang/rust#128381 which is **D-invalid-suggestion** with two 👍-votes.
Gate tests with the right edition
This PR guarantees that `./x test --test-args="--edition XXXX" ui` runs correctly with the 2015, 2018 and 2021 editions.
I don't expect this PR to hold up over time but it helps to submit further updates to the `//@ edition` directives of tests where we can use the new range syntax to have a more robust testing across different editions
r? `@fmease`
---
try-job: aarch64-gnu
try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: x86_64-mingw-1
try-job: test-various
try-job: armhf-gnu
Port the `#![windows_subsystem]` attribute to the new attribute system
Part of rust-lang/rust#131229.
I think it's worth running the Windows test suite before merging that (I don't have the rights for this).
Tidying up UI tests [4/N]
> [!NOTE]
> Intermediate commits are intended to help review, but will be squashed prior to merge.
part of rust-lang/rust#133895
Relocate 4 tests in fn-main and issues and remove fn-main directory
r? Kivooeo
Relocate issues/issue-51022.rs to
entry-point/main-with-lifetime-param.rs
Relocate issue-50714.rs to entry-point/main-where-fn-bound.rs
Rename issue-118772.rs to main-with-invalid-signature.rs and delete
duplicate test
remove ui/entry-point/issue-118772.rs in issues.txt
Relocate fn-main/wrong-location.rs to entry-point/main-in-submodule.rs
Remove fn-main directory
Relocate issue-50688.rs to mismatched_types/array-len-is-closure.rs
The content of the baz function has always been on line 5, not line 15.
Presumably it previously accidentally worked as the call in the foo
function is on line 15, but now it likely tail calls to bar.
Tidying up UI tests [3/N]
> [!NOTE]
> Intermediate commits are intended to help review, but will be squashed prior to merge.
part of rust-lang/rust#133895
Relocate 5 tests from tests/ui/issues
fix rustdoc search says “Consider searching for "null" instead.” #149324fixrust-lang/rust#149324
Now builds the “generic parameter” correction banner from discrete sentence fragments and appends the “Consider searching …” clause only when query.proposeCorrectionTo is non-null, so the UI no longer renders null as the suggested type.
Adds a PARSED section with two queries: one typo (Result<SomeTraiz>) that still produces a concrete suggestion and one fully unknown type (Result<NoSuchTrait>) that leaves proposeCorrectionTo null.
Forbid `CHECK: br` and `CHECK-NOT: br` in codegen tests (suggest `br {{.*}}` instead)
`// CHECK-NOT: br` is fragile to false positives in mangled symbol names, while `// CHECK-NOT: br {{.*}}` is not. Remove and forbid the former in codegen tests, and suggest the latter.
cc https://github.com/rust-lang/rust/pull/149125#issuecomment-3560003847 where this caused a CI failure due to a v0 mangled symbol containing `br` in a disambiguator/crate hash/something.
Add a diagnostic attribute for special casing const bound errors for non-const impls
Somewhat of a follow-up to https://github.com/rust-lang/rust/pull/144194
My plan is to resolve
f4e19c6878/compiler/rustc_hir_typeck/src/callee.rs (L907-913)
but doing so without being able to mark impls the way I do in this PR wrould cause all nice diagnostics about for loops and pointer comparisons to just be a `*const u32 does not implement [const] PartialEq` errors.