about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-12-04Merge pull request #18595 from markmurphydev/remove_platform_intrinsicLaurențiu Nicola-5/+0
Remove references to platform-intrinsic ABI
2024-12-04Merge pull request #18607 from ChayimFriedman2/pattern-record-no-recordLaurențiu Nicola-7/+30
fix: Fix shadowing of record enum variant in patterns
2024-12-04Merge pull request #18606 from ChayimFriedman2/improve-soundness-just-a-bitLaurențiu Nicola-13/+17
minor: Improve soundness a bit by making `TaggedArcPtr::try_as_arc_owned()` unsafe
2024-12-04Fix shadowing of record enum variant in patternsChayim Refael Friedman-7/+30
2024-12-04Improve soundness a bit by making `TaggedArcPtr::try_as_arc_owned()` unsafeChayim Refael Friedman-13/+17
Since the `ManuallyDrop` it returns can be safely used to consume the `Arc`, which is can cause UB if done incorrectly. See #18499.
2024-12-03Remove references to platform-intrinsic ABIMark Murphy-5/+0
2024-12-03Merge pull request #18555 from ChayimFriedman2/issue-17321Lukas Wirth-4/+80
fix: Fix a bug when synthetic AST node were searched in the AST ID map and caused panics
2024-12-03Merge pull request #18592 from darichey/status-bar-visibilityLukas Wirth-1/+56
vscode: Only show status bar item in relevant files
2024-12-03Only show status bar item in relevant filesDavid Richey-1/+56
2024-12-03Merge pull request #18589 from SomeoneToIgnore/proper-resolve-advertisementLukas Wirth-22/+45
Advertise completions and inlay hints resolve server capabilities based on the client capabilities
2024-12-03Advertise completions and inlay hints resolve server capabilities based on ↵Kirill Bulatov-22/+45
the client capabilities.
2024-12-02Merge pull request #18561 from markmurphydev/macro_name_raw_variableLukas Wirth-0/+28
Add macro expansion test for raw variable names
2024-12-02Merge pull request #18587 from Veykril/push-urrlrursyrwsLukas Wirth-1/+17
fix: Fix syntax fixup inserting unnecessary semicolons
2024-12-02fix: Fix syntax fixup inserting unnecessary semicolonsLukas Wirth-1/+17
2024-12-02Merge pull request #18586 from Veykril/push-kolxkxyntxttLukas Wirth-154/+42
fix: Fix debug configuration querying not inheriting environment
2024-12-02Fix debug configuration querying not inheriting environmentLukas Wirth-154/+42
2024-11-30Merge pull request #18577 from compiler-errors/redundant-dyn-atbLaurențiu Nicola-4/+4
Remove redundant associated type bounds from `dyn TypeFolder`
2024-11-30Remove redundant associated type bounds from dynMichael Goulet-4/+4
2024-11-28Merge pull request #18567 from lnicola/sync-from-rustLaurențiu Nicola-369/+545
minor: fix proc macro test
2024-11-28Merge from rust-lang/rustLaurențiu Nicola-368/+544
2024-11-30Remove hir::ArrayLen, introduce ConstArgKind::InferDominik Stolz-182/+105
Remove Node::ArrayLenInfer
2024-11-28Preparing for merge from rust-lang/rustLaurențiu Nicola-1/+1
2024-11-28Auto merge of #133568 - GuillaumeGomez:rollup-js22ovb, r=GuillaumeGomezbors-186/+438
Rollup of 7 pull requests Successful merges: - #133358 (Don't type error if we fail to coerce `Pin<T>` because it doesnt contain a ref) - #133422 (Fix clobber_abi in RV32E and RV64E inline assembly) - #133452 (Support predicate registers (clobber-only) in Hexagon inline assembly) - #133463 (Fix handling of x18 in AArch64 inline assembly on ohos/trusty or with -Zfixed-x18) - #133487 (fix confusing diagnostic for reserved `##`) - #133557 (Small doc fixes in `rustc_codegen_ssa`) - #133560 (Trim extra space in 'repeated `mut`' diagnostic) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-28Rollup merge of #133560 - clubby789:mut-mut-space, r=jieyouxuGuillaume Gomez-14/+33
Trim extra space in 'repeated `mut`' diagnostic Trim an extra space when removing repeated `mut`. Also an extra test for even more repeated `mut`s
2024-11-28Rollup merge of #133557 - Monadic-Cat:small_doc_fixes, r=bjorn3Guillaume Gomez-3/+3
Small doc fixes in `rustc_codegen_ssa` I'm trying to make a toy codegen backend for `rustc`, and I got confused for a few minutes about what `codegen_backend` was referring to in the `CodegenBackend::join_codegen` docs. Experimentally, it looks like the result of `CodegenBackend::codegen_crate` is passed to `CodegenBackend::join_codegen`, so this updates the docs to refer to that. This time using intra-doc links to hopefully cause people to notice if that gets out of date again. Also, added another intra-doc link nearby, on `CodegenBackend::link`, for the same reason.
2024-11-28Rollup merge of #133487 - pitaj:reserve-guarded-strings, r=fee1-deadGuillaume Gomez-107/+141
fix confusing diagnostic for reserved `##` Closes #131615
2024-11-28Rollup merge of #133463 - taiki-e:aarch64-asm-x18, r=AmanieuGuillaume Gomez-49/+80
Fix handling of x18 in AArch64 inline assembly on ohos/trusty or with -Zfixed-x18 Currently AArch64 inline assembly allows using x18 on ohos/trusty or with -Zfixed-x18. https://github.com/rust-lang/rust/blob/7db7489f9bc274cb60c4956bfa56de0185eb1b9b/compiler/rustc_target/src/asm/aarch64.rs#L74-L76 However, x18 is reserved in these environments and should not be allowed in the input/output operands of inline assemblies as it is in Android, Windows, etc.. https://github.com/rust-lang/rust/blob/7db7489f9bc274cb60c4956bfa56de0185eb1b9b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_ohos.rs#L19 https://github.com/rust-lang/rust/blob/7db7489f9bc274cb60c4956bfa56de0185eb1b9b/compiler/rustc_target/src/spec/targets/aarch64_unknown_trusty.rs#L18 https://github.com/rust-lang/rust/blob/7db7489f9bc274cb60c4956bfa56de0185eb1b9b/compiler/rustc_codegen_llvm/src/llvm_util.rs#L764-L771 (As for ohos, +reserve-x18 is [redundant](https://github.com/llvm/llvm-project/commit/c417b7a695704d5bc3be23f34d1bfa505f5172de#diff-0ddf23e0bf2b28b2d05f842f087d1e6f694e8e06d1765e8d0f10d47fddcdff9c) since https://github.com/rust-lang/rust/commit/7a966b918870485e9b364e77f50c511f8c2cc275 that starting using llvm's ohos targets. So removed it from target-spec.) This fix may potentially break the code for tier 2 target (aarch64-unknown-linux-ohos). (As for others, aarch64-unknown-trusty is tier 3 and -Zfixed-x18 is unstable so breaking them should be fine.) However, in any case, it seems suspicious that the code that is broken by this was sound. r? `@Amanieu` `@rustbot` label O-AArch64 +A-inline-assembly
2024-11-28Rollup merge of #133452 - taiki-e:hexagon-asm-pred, r=AmanieuGuillaume Gomez-0/+53
Support predicate registers (clobber-only) in Hexagon inline assembly The result of the Hexagon instructions such as comparison, store conditional, etc. is stored in predicate registers (`p[0-3]`), but currently there is no way to mark it as clobbered in `asm!`. This is also needed for `clobber_abi` (although implementing `clobber_abi` will require the addition of support for [several more register classes](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/Hexagon/HexagonRegisterInfo.cpp#L71-L90). see also https://github.com/rust-lang/rust/issues/93335#issuecomment-2395210055). Refs: - [Section 6 "Conditional Execution" in Qualcomm Hexagon V73 Programmer’s Reference Manual](https://docs.qualcomm.com/bundle/publicresource/80-N2040-53_REV_AB_Qualcomm_Hexagon_V73_Programmers_Reference_Manual.pdf#page=90) - [Register definition in LLVM](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/Hexagon/HexagonRegisterInfo.td#L155) cc `@androm3da` (target maintainer of hexagon-unknown-{[none-elf](https://doc.rust-lang.org/nightly/rustc/platform-support/hexagon-unknown-none-elf.html#target-maintainers),[linux-musl](https://doc.rust-lang.org/nightly/rustc/platform-support/hexagon-unknown-linux-musl.html#target-maintainers)}) r? `@Amanieu` `@rustbot` label +A-inline-assembly (Currently there is no O-hexagon label...)
2024-11-28Rollup merge of #133422 - taiki-e:riscv-e-clobber-abi, r=AmanieuGuillaume Gomez-6/+95
Fix clobber_abi in RV32E and RV64E inline assembly Currently clobber_abi in RV32E and RV64E inline assembly is implemented using InlineAsmClobberAbi::RiscV, but broken since x16-x31 cannot be used in RV32E and RV64E. ``` error: cannot use register `x16`: register can't be used with the `e` target feature --> <source>:42:14 | 42 | asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags)); | ^^^^^^^^^^^^^^^^ error: cannot use register `x17`: register can't be used with the `e` target feature --> <source>:42:14 | 42 | asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags)); | ^^^^^^^^^^^^^^^^ error: cannot use register `x28`: register can't be used with the `e` target feature --> <source>:42:14 | 42 | asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags)); | ^^^^^^^^^^^^^^^^ error: cannot use register `x29`: register can't be used with the `e` target feature --> <source>:42:14 | 42 | asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags)); | ^^^^^^^^^^^^^^^^ error: cannot use register `x30`: register can't be used with the `e` target feature --> <source>:42:14 | 42 | asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags)); | ^^^^^^^^^^^^^^^^ error: cannot use register `x31`: register can't be used with the `e` target feature --> <source>:42:14 | 42 | asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags)); | ^^^^^^^^^^^^^^^^ ``` r? `@Amanieu` `@rustbot` label O-riscv +A-inline-assembly
2024-11-28Rollup merge of #133358 - compiler-errors:pin-coerce, r=eholkGuillaume Gomez-7/+33
Don't type error if we fail to coerce `Pin<T>` because it doesnt contain a ref Fixes https://github.com/rust-lang/rust/issues/133222. Also moves some tests into a directory for better bookkeeping. r? eholk or re-roll
2024-11-28Auto merge of #133564 - lnicola:sync-from-ra, r=lnicolabors-211/+477
Subtree update of `rust-analyzer` r? `@ghost`
2024-11-28Fix proc macro testLaurențiu Nicola-0/+1
2024-11-28Merge pull request #18566 from lnicola/sync-from-rustLaurențiu Nicola-36683/+79162
minor: Sync from downstream
2024-11-28Bump rustc cratesLaurențiu Nicola-17/+17
2024-11-28Merge from rust-lang/rustLaurențiu Nicola-36665/+79144
2024-11-28Preparing for merge from rust-lang/rustLaurențiu Nicola-1/+1
2024-11-28Auto merge of #133561 - GuillaumeGomez:rollup-g4upmv4, r=GuillaumeGomezbors-440/+1023
Rollup of 12 pull requests Successful merges: - #129409 (Expand std::os::unix::fs::chown() doc with a warning) - #133320 (Add release notes for Rust 1.83.0) - #133368 (Delay a bug when encountering an impl with unconstrained generics in `codegen_select`) - #133428 (Actually use placeholder regions for trait method late bound regions in `collect_return_position_impl_trait_in_trait_tys`) - #133512 (Add `as_array` and `as_mut_array` conversion methods to slices.) - #133519 (Check `xform_ret_ty` for WF in the new solver to improve method winnowing) - #133520 (Structurally resolve before applying projection in borrowck) - #133534 (extend group-forbid-always-trumps-cli test) - #133537 ([rustdoc] Fix new clippy lints) - #133543 ([AIX] create shim for lgammaf_r) - #133547 (rustc_span: Replace a `HashMap<_, ()>` with `HashSet`) - #133550 (print generated doc paths) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-28Rollup merge of #133550 - onur-ozkan:doc-log, r=jieyouxuGuillaume Gomez-1/+5
print generated doc paths Resolves #133002
2024-11-28Rollup merge of #133547 - cuviper:span-set-entry, r=jieyouxuGuillaume Gomez-5/+7
rustc_span: Replace a `HashMap<_, ()>` with `HashSet` Now that `HashSet::entry()` exists, we don't need to fake it with a map.
2024-11-28Rollup merge of #133543 - mustartt:aix-lgammaf_r-shim, r=cuviperGuillaume Gomez-0/+8
[AIX] create shim for lgammaf_r On AIX, we don't have 32bit floating point for re-entrant `lgammaf_r` but we do have the 64bit floating point re-entrant `lgamma_r` so we can use the 64bit version instead and truncate back to a 32bit float. This solves the linker missing symbol for `.lgammaf_r` when testing and using these parts of the `std`.
2024-11-28Rollup merge of #133537 - GuillaumeGomez:fix-clippy-lints, r=GuillaumeGomezGuillaume Gomez-340/+325
[rustdoc] Fix new clippy lints Lots of small things that clippy lints about. r? `@fmease`
2024-11-28Rollup merge of #133534 - RalfJung:cli-lint-flags, r=NadrierilGuillaume Gomez-7/+88
extend group-forbid-always-trumps-cli test Test it not just for a lint group, but also an individual lint, or when mixing the lint and the group. And test both orders in which the flags could be passed.
2024-11-28Rollup merge of #133520 - compiler-errors:structurally-resolve-mir-borrowck, ↵Guillaume Gomez-2/+72
r=lcnr Structurally resolve before applying projection in borrowck As far as I can tell, all other `.normalize` calls in borrowck are noops and can remain that way. This is the only one that actually requires structurally resolving the type. r? lcnr
2024-11-28Rollup merge of #133519 - compiler-errors:xform-ret-wf, r=lcnrGuillaume Gomez-0/+69
Check `xform_ret_ty` for WF in the new solver to improve method winnowing This is a bit interesting. Method probing in the old solver is stronger than the new solver because eagerly normalizing types causes us to check their corresponding trait goals. This is important because we don't end up checking all of the where clauses of a method when method probing; just the where clauses of the impl. i.e., for: ``` impl Foo where WC1, { fn method() where WC2, {} } ``` We only check WC1 and not WC2. This is because at this point in probing the method is instantiated w/ infer vars, and checking the where clauses in WC2 will lead to cycles if we were to check them (at least that's my understanding; I could investigate changing that in general, incl. in the old solver, but I don't have much confidence that it won't lead to really bad overflows.) This PR chooses to emulate the old solver by just checking that the return type is WF. This is theoretically stronger, but I'm not too worried about it. I think we alternatively have several approaches we can take here, though this one seems the simplest. Thoughts? r? lcnr
2024-11-28Rollup merge of #133512 - bjoernager:slice-as-array, r=AmanieuGuillaume Gomez-16/+75
Add `as_array` and `as_mut_array` conversion methods to slices. Tracking issue: #133508 This PR unstably implements the `as_array` and `as_mut_array` converters to `[T]`, `*const [T]`, and `*mut [T]`.
2024-11-28Rollup merge of #133428 - compiler-errors:rpitit-unsound, r=lcnrGuillaume Gomez-44/+92
Actually use placeholder regions for trait method late bound regions in `collect_return_position_impl_trait_in_trait_tys` So in https://github.com/rust-lang/rust/pull/113182, I introduced a "diagnostics improvement" in the form of 473c88dfb69f95b2e8c5f71ba7f6b7b448d22dc2, which changes which signature we end up instantiating with placeholder regions and which signature we end up instantiating with fresh region vars so that we have placeholders corresponding to the names of the late-bound regions coming from the *impl*. However, this is not sound, since now we're essentially no longer proving that *all* instantiations of the trait method are compatible with an instantiation of the impl method, but vice versa (which is weaker). Let's look at the example `tests/ui/impl-trait/in-trait/do-not-imply-from-trait-impl.rs`: ```rust trait MkStatic { fn mk_static(self) -> &'static str; } impl MkStatic for &'static str { fn mk_static(self) -> &'static str { self } } trait Foo { fn foo<'a: 'static, 'late>(&'late self) -> impl MkStatic; } impl Foo for str { fn foo<'a: 'static>(&'a self) -> impl MkStatic + 'static { self } } fn call_foo<T: Foo + ?Sized>(t: &T) -> &'static str { t.foo().mk_static() } fn main() { let s = call_foo(String::from("hello, world").as_str()); println!("> {s}"); } ``` To collect RPITITs, we were previously instantiating the trait signature with infer vars (`fn(&'?0 str) -> ?1t` where `?1t` is the variable we use to infer the RPITIT) and the impl signature with placeholders (there are no late-bound regions in that signature, so we just have `fn(&'a str) -> Opaque`). Equating the signatures works, since all we do is unify `?1t` with `Opaque` and `'?0` with `'a`. However, conceptually it *shouldn't* hold, since this definition is not valid for *all* instantiations of the trait method but just the one where `'0` (i.e. `'late`) is equal to `'a` :( ## So what This PR effectively reverts 473c88dfb69f95b2e8c5f71ba7f6b7b448d22dc2 to fix the unsoundness. Fixes #133427 Also fixes #133425, which is actually coincidentally another instance of this bug (but not one that is weaponized into UB, just one that causes an ICE in refinement checking).
2024-11-28Rollup merge of #133368 - ↵Guillaume Gomez-24/+44
compiler-errors:codegen-select-unconstrained-params, r=lcnr Delay a bug when encountering an impl with unconstrained generics in `codegen_select` Despite its name, `codegen_select` is what powers `Instance::try_resolve`, which is used in pre-codegen contexts to try to resolve a method where possible. One place that it's used is in the "recursion MIR lint" that detects recursive MIR bodies. If we encounter an impl in `codegen_select` that contains unconstrained generic parameters, we expect that impl to caused an error to be reported; however, there's no temporal guarantee that this error is reported *before* we call `codegen_select`. This is what a delayed bug is *for*, and this PR makes us use a delayed bug rather than asserting something about errors already having been emitted. Fixes #126646
2024-11-28Rollup merge of #133320 - cuviper:relnotes-1.83.0, r=cuviperGuillaume Gomez-1/+233
Add release notes for Rust 1.83.0 Issues: https://github.com/rust-lang/rust/issues?q=is%3Aissue%20state%3Aopen%20label%3Arelnotes-tracking-issue%20milestone%3A1.83.0 r? `@Mark-Simulacrum` cc `@rust-lang/release`
2024-11-28Rollup merge of #129409 - grinapo:patch-1, r=AmanieuGuillaume Gomez-0/+5
Expand std::os::unix::fs::chown() doc with a warning Include warning about losing setuid/gid when chowning, per POSIX. It is about the underlying system call but it is rather useful to mention it in the help in case someone accidentally forgets (don't look at me :)).
2024-11-28Fix new clippy lintsGuillaume Gomez-340/+325