about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-11-20Update LLVM to 19.1.4Earlopain-0/+0
2024-11-20Auto merge of #133234 - jhpratt:rollup-42dmg4p, r=jhprattbors-159/+305
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
2024-11-20Rollup merge of #133216 - compiler-errors:const-fn, r=lcnrJacob Pratt-109/+193
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
2024-11-20Rollup merge of #133196 - omnivagant:correct-less-r-flag, r=tgross35Jacob Pratt-1/+1
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.
2024-11-20Rollup merge of #133190 - MarcoIeni:dist-aarch64-msvc-free, r=KobzolJacob Pratt-1/+1
CI: use free runner in dist-aarch64-msvc try-job: dist-aarch64-msvc
2024-11-20Rollup merge of #133108 - RalfJung:future-compat-needs-to-run, r=lcnrJacob Pratt-16/+27
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`
2024-11-20Rollup merge of #132732 - gavincrawford:as_ptr_attribute, r=UrgauJacob Pratt-32/+83
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()`.
2024-11-20Auto merge of #133212 - lcnr:questionable-uwu, r=compiler-errorsbors-575/+512
continue `ParamEnv` to `TypingEnv` transition cc #132279 r? `@compiler-errors`
2024-11-20Auto merge of #133194 - khuey:master, r=jieyouxubors-34/+8301
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).
2024-11-19Auto merge of #133219 - matthiaskrgr:rollup-hnuq0zf, r=matthiaskrgrbors-90/+429
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
2024-11-19Rollup merge of #133213 - alexcrichton:fix-tier-listing, r=jieyouxuMatthias Krüger-1/+1
Correct the tier listing of `wasm32-wasip2` This target is tier 2, not tier 3, and I forgot to update this. Closes #133206
2024-11-19Rollup merge of #133207 - jieyouxu:macos-objcopy, r=Kobzol,bjorn3Matthias Krüger-0/+14
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
2024-11-19Rollup merge of #133201 - nnethercote:rm-TokenKind-InvalidPrefix, ↵Matthias Krüger-65/+55
r=compiler-errors Remove `TokenKind::InvalidPrefix` It's not needed. Best reviewed one commit at a time. r? `@estebank`
2024-11-19Rollup merge of #133188 - maxcabrajac:walk_no_visit, r=petrochenkovMatthias Krüger-16/+26
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`
2024-11-19Rollup merge of #133183 - n0toose:improve-remove-dir-docs, r=joboetMatthias Krüger-0/+4
Mention std::fs::remove_dir_all in std::fs::remove_dir
2024-11-19Rollup merge of #133175 - MarcoIeni:dist-i686-msvc-free, r=KobzolMatthias Krüger-1/+1
ci: use free runner in dist-i686-msvc try-job: dist-i686-msvc
2024-11-19Rollup merge of #125405 - m-ou-se:thread-add-spawn-hook, r=WaffleLapkinMatthias Krüger-7/+186
Add std::thread::add_spawn_hook. Implementation of https://github.com/rust-lang/rfcs/pull/3642
2024-11-19Rollup merge of #123947 - zopsicle:vec_deque-Iter-as_slices, r=AmanieuMatthias Krüger-0/+142
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.
2024-11-19Implement ~const Fn trait goals in the new solverMichael Goulet-109/+193
2024-11-19lints_that_dont_need_to_run: never skip future-compat-reported lintsRalf Jung-16/+27
2024-11-19additional `TypingEnv` cleanupslcnr-29/+20
2024-11-19resolve_instance: stop relying on `Reveal`lcnr-17/+17
2024-11-19`InterpCx` store `TypingEnv` instead of a `ParamEnv`lcnr-192/+167
2024-11-19Auto merge of #132761 - nnethercote:resolve-tweaks, r=petrochenkovbors-93/+53
Resolve tweaks A couple of small perf improvements, and some minor refactorings, all in `rustc_resolve`. r? `@petrochenkov`
2024-11-19`TypingMode::from_param_env` begonelcnr-20/+0
2024-11-19remove `TypingMode::from_param_env` in clippylcnr-68/+77
2024-11-19Update doc comments for spawn hook.Mara Bos-2/+6
2024-11-19Address review comments.Mara Bos-7/+6
Co-authored-by: waffle <waffle.lapkin@gmail.com>
2024-11-19Fix tracking issue.Mara Bos-1/+1
2024-11-19Add tracking issue.Mara Bos-2/+2
2024-11-19Use Send + Sync for spawn hooks.Mara Bos-2/+2
2024-11-19Add thread Builder::no_hooks().Mara Bos-7/+24
2024-11-19Update thread spawn hooks.Mara Bos-37/+86
1. Make the effect thread local. 2. Don't return a io::Result from hooks.
2024-11-19Use add_spawn_hook for libtest's output capturing.Mara Bos-4/+11
2024-11-19Add std::thread::add_spawn_hook.Mara Bos-0/+103
2024-11-19rustdoc: yeet `TypingEnv::from_param_env`lcnr-18/+11
2024-11-19generic_const_exprs: yeet `TypingEnv::from_param_env`lcnr-6/+11
2024-11-19impl trait overcaptures, yeet ` TypingMode::from_param_env`lcnr-3/+3
2024-11-19pattern lowering, yeet `TypingEnv::from_param_env`lcnr-63/+38
2024-11-19liveness checking, yeet `TypingEnv::from_param_env`lcnr-4/+5
2024-11-19unconditional recursion, yeet `TypingEnv::from_param_env`lcnr-10/+5
2024-11-19move `fn is_item_raw` to `TypingEnv`lcnr-168/+181
2024-11-19Correct comments concerning updated dangling pointer lintgavincrawford-10/+7
2024-11-19Auto merge of #133205 - matthiaskrgr:rollup-xhhhp5u, r=matthiaskrgrbors-368/+434
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
2024-11-19Correct the tier listing of `wasm32-wasip2`Alex Crichton-1/+1
This target is tier 2, not tier 3, and I forgot to update this. Closes #133206
2024-11-19Auto merge of #133164 - RalfJung:promoted-oom, r=jieyouxubors-7/+51
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
2024-11-19When the required discriminator value exceeds LLVM's limits, drop the debug ↵Kyle Huey-31/+4175
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.
2024-11-19Honor collapse_debuginfo when dealing with MIR-inlined functions inside macros.Kyle Huey-3/+4126
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.
2024-11-19Explicitly disable llvm tools for craneliftJieyou Xu-0/+5
2024-11-19Register change infoJieyou Xu-0/+5