| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Rollup of 5 pull requests
Successful merges:
- #132732 (Use attributes for `dangling_pointers_from_temporaries` lint)
- #133108 (lints_that_dont_need_to_run: never skip future-compat-reported lints)
- #133190 (CI: use free runner in dist-aarch64-msvc)
- #133196 (Make rustc --explain compatible with BusyBox less)
- #133216 (Implement `~const Fn` trait goal in the new solver)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Implement `~const Fn` trait goal in the new solver
Split out from https://github.com/rust-lang/rust/pull/132329 since this should be easier to review on its own.
r? lcnr
|
|
Make rustc --explain compatible with BusyBox less
busybox less does not support the -r flag and less(1) says:
USE OF THE -r OPTION IS NOT RECOMMENDED.
|
|
CI: use free runner in dist-aarch64-msvc
try-job: dist-aarch64-msvc
|
|
lints_that_dont_need_to_run: never skip future-compat-reported lints
Follow-up to https://github.com/rust-lang/rust/pull/125116: future-compat lints show up with `--json=future-incompat` even if they are otherwise allowed in the crate. So let's ensure we do not skip those as part of the `lints_that_dont_need_to_run` logic.
I could not find a current future compat lint that is emitted by a lint pass, so there's no clear way to add a test for this.
Cc `@blyxyas` `@cjgillot`
|
|
Use attributes for `dangling_pointers_from_temporaries` lint
Checking for dangling pointers by function name isn't ideal, and leaves out certain pointer-returning methods that don't follow the `as_ptr` naming convention. Using an attribute for this lint cleans things up and allows more thorough coverage of other methods, such as `UnsafeCell::get()`.
|
|
continue `ParamEnv` to `TypingEnv` transition
cc #132279
r? `@compiler-errors`
|
|
Drop debug info instead of panicking if we exceed LLVM's capability to represent it
Recapping a bit of history here:
In #128861 I made debug info correctly represent parameters to inline functions by removing a fake lexical block that had been inserted to suppress LLVM assertions and by deduplicating those parameters.
LLVM, however, expects to see a single parameter _with distinct locations_, particularly distinct inlinedAt values on the DILocations. This generally worked because no matter how deep the chain of inlines it takes two different call sites in the original function to result in the same function being present multiple times, and a function call requires a non-zero number of characters, but macros threw a wrench in that in #131944. At the time I thought the issue there was limited to proc-macros, where an arbitrary amount of code can be generated at a single point in the source text.
In #132613 I added discriminators to DILocations that would otherwise be the same to repair #131944[^1]. This works, but LLVM's capacity for discriminators is not infinite (LLVM actually only allocates 12 bits for this internally). At the time I thought it would be very rare for anyone to hit the limit, but #132900 proved me wrong. In the relatively-minimized test case it also became clear to me that the issue affects regular macros too, because the call to the inlined function will (without collapse_debuginfo on the macro) be attributed to the (repeated, if the macro is used more than once) textual callsite in the macro definition.
This PR fixes the panic by dropping debug info when we exceed LLVM's maximum discriminator value. There's also a preceding commit for a related but distinct issue: macros that use collapse_debuginfo should in fact have their inlinedAts collapsed to the macro callsite and thus not need discriminators at all (and not panic/warn accordingly when the discriminator limit is exhausted).
Fixes #132900
r? `@jieyouxu`
[^1]: Editor's note: `fix` is a magic keyword in PR description that apparently will close the linked issue (it's closed already in this case, but still).
|
|
Rollup of 8 pull requests
Successful merges:
- #123947 (Add vec_deque::Iter::as_slices and friends)
- #125405 (Add std::thread::add_spawn_hook.)
- #133175 (ci: use free runner in dist-i686-msvc)
- #133183 (Mention std::fs::remove_dir_all in std::fs::remove_dir)
- #133188 (Add `visit` methods to ast nodes that already have `walk`s on ast visitors)
- #133201 (Remove `TokenKind::InvalidPrefix`)
- #133207 (Default-enable `llvm_tools_enabled` when no `config.toml` is present)
- #133213 (Correct the tier listing of `wasm32-wasip2`)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Correct the tier listing of `wasm32-wasip2`
This target is tier 2, not tier 3, and I forgot to update this.
Closes #133206
|
|
Default-enable `llvm_tools_enabled` when no `config.toml` is present
Fixes #133195. cc `@wesleywiser` could you double check if with this patch and no `config.toml` that you can run `./x test tests/ui --stage 1`?
`llvm-objcopy` is usually required by cg_ssa on macOS to workaround bad `strip`s.
cc `@bjorn3` I hope this doesn't break cg_clif...
r? bootstrap
|
|
r=compiler-errors
Remove `TokenKind::InvalidPrefix`
It's not needed. Best reviewed one commit at a time.
r? `@estebank`
|
|
Add `visit` methods to ast nodes that already have `walk`s on ast visitors
Some `walk` functions are called directly, because there were no correspondent visit functions.
related to #128974 & #127615
r? `@petrochenkov`
|
|
Mention std::fs::remove_dir_all in std::fs::remove_dir
|
|
ci: use free runner in dist-i686-msvc
try-job: dist-i686-msvc
|
|
Add std::thread::add_spawn_hook.
Implementation of https://github.com/rust-lang/rfcs/pull/3642
|
|
Add vec_deque::Iter::as_slices and friends
Add the following methods, that work similarly to VecDeque::as_slices:
- alloc::collections::vec_deque::Iter::as_slices
- alloc::collections::vec_deque::IterMut::into_slices
- alloc::collections::vec_deque::IterMut::as_slices
- alloc::collections::vec_deque::IterMut::as_mut_slices
Obtaining slices from a VecDeque iterator was not previously possible.
|
|
|
|
|
|
|
|
|
|
|
|
Resolve tweaks
A couple of small perf improvements, and some minor refactorings, all in `rustc_resolve`.
r? `@petrochenkov`
|
|
|
|
|
|
|
|
Co-authored-by: waffle <waffle.lapkin@gmail.com>
|
|
|
|
|
|
|
|
|
|
1. Make the effect thread local.
2. Don't return a io::Result from hooks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 4 pull requests
Successful merges:
- #131081 (Use `ConstArgKind::Path` for all single-segment paths, not just params under `min_generic_const_args`)
- #132577 (Report the `unexpected_cfgs` lint in external macros)
- #133023 (Merge `-Zhir-stats` into `-Zinput-stats`)
- #133200 (ignore an occasionally-failing test in Miri)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
This target is tier 2, not tier 3, and I forgot to update this.
Closes #133206
|
|
interpret: do not ICE when a promoted fails with OOM
Fixes https://github.com/rust-lang/rust/issues/130687
try-job: aarch64-apple
try-job: dist-x86_64-linux
|
|
info for the function instead of panicking.
The maximum discriminator value LLVM can currently encode is 2^12. If macro use
results in more than 2^12 calls to the same function attributed to the same
callsite, and those calls are MIR-inlined, we will require more than the maximum
discriminator value to completely represent the debug information. Once we reach
that point drop the debug info instead.
|
|
The test relies on the fact that inlining more than 2^12 calls at the same
callsite will trigger a panic (and after the following commit, a warning) due to
LLVM limitations but with collapse_debuginfo the callsites should not be the
same.
|
|
|
|
|