Commit Graph

268189 Commits

Author SHA1 Message Date
Matthias Krüger
1c62cff897
Rollup merge of #131491 - lcnr:nalgebra-perrrrf, r=compiler-errors
impossible obligations fast path

fixes the remaining performance regression in nalgebra for #130654

r? `@compiler-errors`

Fixes #124894
2024-10-10 12:49:22 +02:00
Matthias Krüger
7eb5621e12
Rollup merge of #131484 - jhpratt:review-rotation, r=jieyouxu
Add myself back to review rotation
2024-10-10 12:49:21 +02:00
Matthias Krüger
02930953d8
Rollup merge of #131482 - compiler-errors:struct-res, r=lcnr
structurally resolve adts and tuples expectations too

r? lcnr
2024-10-10 12:49:21 +02:00
Matthias Krüger
68313623fc
Rollup merge of #131480 - madsmtm:macos-fix-strip-binary, r=nnethercote
Fix hardcoded strip path when cross-compiling from Linux to Darwin

Fixes https://github.com/rust-lang/rust/issues/131206.

I fear that https://github.com/rust-lang/rust/pull/131405 might end up taking some time, so opening this PR to resolve the regression.

`@rustbot` label O-apple
2024-10-10 12:49:20 +02:00
Matthias Krüger
173c50fb0e
Rollup merge of #131479 - madsmtm:avoid-redundant-dylib, r=jieyouxu
Apple: Avoid redundant `-Wl,-dylib` flag when linking

Seems to have been introduced all the way back in e338a4154b, but should be redundant, `-dynamiclib` should already make `cc` set `-dylib` when linking.

Spotted this while trying to get `-Clinker-flavor=gcc` and `-Clinker-flavor=ld` closer together, not that important to fix.

`@rustbot` label O-apple
2024-10-10 12:49:19 +02:00
Matthias Krüger
a2c43eb806
Rollup merge of #131397 - RalfJung:const-escaping-ref-teach, r=chenyukang
fix/update teach_note from 'escaping mutable ref/ptr' const-check

The old note was quite confusing since it talked about statics, but the message is also shown for consts. So let's reword to something that is true for both of them.
2024-10-10 12:49:19 +02:00
Matthias Krüger
6d41be2700
Rollup merge of #130625 - heiseish:issue-124028-fix, r=jieyouxu
Fix a few relative paths in rustc doc

## Changes

- Don't inline the doc for re-exporting some structs that have relative paths in doc.

## Context

See #124028.

- Most of the relative links in rustdoc are there because of circular import (so syntax like `[MyType]: rustc_foo::bar` is difficult to achieve when we cannot import `rustc_xxx` due to circular import)
- Here, I disable new links for re-exports. I think it's fine for re-exported items in `hir::*`.
- There is a few more relative links in other `rustc` crates, however they are not addressed in this PR, as they are not re-exported and/so the relative paths are working.

Closes #124028.

r​? `@fmease`

Let me know if I miss anything or there's any other way to address this issue.
2024-10-10 12:49:18 +02:00
Kajetan Puchalski
335f67b652 rustc_target: Add sme-b16b16 as an explicit aarch64 target feature
LLVM 20 split out what used to be called b16b16 and correspond to aarch64
FEAT_SVE_B16B16 into sve-b16b16 and sme-b16b16.
Add sme-b16b16 as an explicit feature and update the codegen accordingly.
2024-10-10 10:24:57 +00:00
Kajetan Puchalski
2900c58a02 stdarch: Bump stdarch submodule 2024-10-10 10:16:16 +00:00
lcnr
d6fd45c2e3 impossible obligations check fast path 2024-10-10 06:09:50 -04:00
Michael Goulet
8715bfbf0e Make super combine into fns 2024-10-10 06:07:52 -04:00
Michael Goulet
a4cd2202ef Use SolverRelating in favor of TypeRelating in the old solver where possible 2024-10-10 06:07:52 -04:00
Michael Goulet
30a2ecddb4 Remove unnecessary StructurallyRelateAliases from CombineFields/TypeRelating 2024-10-10 06:07:52 -04:00
Michael Goulet
3da257a98d Use SolverRelating in new solver 2024-10-10 06:07:52 -04:00
Michael Goulet
efb1c23ff6 Introduce SolverRelating 2024-10-10 06:07:51 -04:00
Michael Goulet
ce7a61b9d0 Uplift super_combine 2024-10-10 06:07:51 -04:00
Michael Goulet
09da2ebd63 Move ty::Error branch into super_combine_tys 2024-10-10 06:07:51 -04:00
Mads Marquart
1edff466e1 Avoid redundant additions to PATH when linking 2024-10-10 11:46:11 +02:00
Manuel Drehwald
b12dc20910 add config to explicitely test rustc with autodiff/enzyme disabled 2024-10-10 11:38:28 +02:00
bors
a21a9fe332
Auto merge of #13464 - y21:issue13458, r=flip1995
Don't warn on proc macro generated code in `needless_return`

Fixes #13458
Fixes #13457
Fixes #13467
Fixes #13479
Fixes #13481
Fixes #13526
Fixes #13486

The fix is unfortunately a little more convoluted than just simply adding a `is_from_proc_macro`. That check *does*  fix the issue, however it also introduces a bunch of false negatives in the tests, specifically when the returned expression is in a different syntax context, e.g. `return format!(..)`.

The proc macro check builds up a start and end pattern based on the HIR nodes and compares it to a snippet of the span, however that would currently fail for `return format!(..)` because we would have the patterns `("return", <something inside of the format macro>)`, which doesn't compare equal. So we now return an empty string pattern for when it's in a different syntax context.

"Hide whitespace" helps a bit for reviewing the proc macro detection change

changelog: none
2024-10-10 11:34:13 +02:00
bors
de19f2b73d Auto merge of #131453 - onur-ozkan:llvm-ci-check-for-rustc-ci, r=Kobzol
disable `download-rustc` if LLVM submodule has changes in CI

We can't use CI rustc while using in-tree LLVM (which happens in LLVM submodule update PRs) and this PR handles that by ignoring CI-rustc in CI and failing in non-CI environments.
2024-10-10 08:31:30 +00:00
onur-ozkan
de744eafe1 update rustc_borrowck::places_conflict doc-comment
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-10 10:33:29 +03:00
onur-ozkan
b27aee9b8b stabilize ci_rustc_if_unchanged_logic test
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-10 10:33:24 +03:00
onur-ozkan
f6b75575e1 stabilize download_ci_llvm test
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-10 10:32:15 +03:00
onur-ozkan
ef51577656 make llvm::is_ci_llvm_modified logic more precise
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-10 10:23:27 +03:00
onur-ozkan
b198a46665 disable download-rustc if LLVM submodule has changes in CI
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-10 08:55:15 +03:00
Jacob Pratt
e481599536
Add myself back to review rotation 2024-10-10 01:09:13 -04:00
Michael Goulet
2a8f08083f Structurallyresolve adts and tuples expectations too 2024-10-10 00:34:06 -04:00
Mads Marquart
09b634a4ba Fix hardcoded strip path when cross-compiling from Linux to Darwin 2024-10-10 04:03:48 +02:00
Mads Marquart
d6aaf7b036 Avoid redundant -Wl,-dylib flag when linking 2024-10-10 03:51:11 +02:00
bors
df1b5d3cc2 Auto merge of #131466 - matthiaskrgr:rollup-3qtz83x, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #123951 (Reserve guarded string literals (RFC 3593))
 - #130827 (Library: Rename "object safe" to "dyn compatible")
 - #131383 (Add docs about slicing slices at the ends)
 - #131403 (Fix needless_lifetimes in rustc_serialize)
 - #131417 (Fix methods alignment on mobile)
 - #131449 (Decouple WASIp2 sockets from WasiFd)
 - #131462 (Mention allocation errors for `open_buffered`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-10 01:12:11 +00:00
León Orell Valerian Liehr
20cebae312
UI tests: Rename "object safe" to "dyn compatible" 2024-10-10 01:13:29 +02:00
León Orell Valerian Liehr
2e7a52b22f
Rename feature object_safe_for_dispatch to dyn_compatible_for_dispatch 2024-10-10 00:57:59 +02:00
León Orell Valerian Liehr
62b24ea7c5
Compiler: Replace remaining occurrences of "object safe" with "dyn compatible" 2024-10-10 00:57:52 +02:00
bors
fc0f045dd1 Auto merge of #131458 - matthiaskrgr:rollup-82qeotv, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #131382 (Add "reference" as a known compiletest header)
 - #131420 (Dont ICE when encountering post-mono layout cycle error)
 - #131424 (compiler: Stop reexporting enum-globs from `rustc_target::abi`)
 - #131426 (Fix quotation marks around debug line in `src/ci/run.sh`)
 - #131435 (Ignore broken-pipe-no-ice on apple (specifically macOS) for now)
 - #131447 (add more crash tests)
 - #131456 (Fix typo in E0793)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-09 22:21:43 +00:00
Matthias Krüger
7a76489454
Rollup merge of #131462 - cuviper:open_buffered-error, r=RalfJung
Mention allocation errors for `open_buffered`

This documents that `File::open_buffered` may return an error on allocation failure.
2024-10-09 23:03:50 +02:00
Matthias Krüger
866869bbbd
Rollup merge of #131449 - nickrum:wasip2-net-decouple-fd, r=alexcrichton
Decouple WASIp2 sockets from WasiFd

This is a follow up to #129638, decoupling WASIp2's socket implementation from WASIp1's `WasiFd` as discussed with `@alexcrichton.`

Quite a few trait implementations in `std::os::fd` rely on the fact that there is an additional layer of abstraction between `Socket` and `OwnedFd`. I thus had to add a thin `WasiSocket` wrapper struct that just "forwards" to `OwnedFd`. Alternatively, I could have added a lot of conditional compilation to `std::os::fd`, which feels even worse.

Since `WasiFd::sock_accept` is no longer accessible from `TcpListener` and since WASIp2 has proper support for accepting sockets through `Socket::accept`, the `std::os::wasi::net` module has been removed from WASIp2, which only contains a single `TcpListenerExt` trait with a `sock_accept` method as well as an implementation for `TcpListener`. Let me know if this is an acceptable solution.
2024-10-09 23:03:50 +02:00
Matthias Krüger
47344c3179
Rollup merge of #131417 - GuillaumeGomez:mobile-methods-left-margin, r=notriddle
Fix methods alignment on mobile

I realized that on mobile, the methods are not aligned the same depending if they have documentation or not:

| before | after |
|-|-|
| ![Screenshot from 2024-10-08 20-40-22](https://github.com/user-attachments/assets/d31ba5e1-cf84-431f-9b2b-9962bc5a0365) | ![image](https://github.com/user-attachments/assets/ffde2161-bfcb-4462-8c5b-88538e61b366) |

r? `@notriddle`
2024-10-09 23:03:49 +02:00
Matthias Krüger
50f7e80423
Rollup merge of #131403 - practicalrs:fix_needless_lifetimes_p2, r=petrochenkov
Fix needless_lifetimes in rustc_serialize

Hi,

This PR fixes the following clipy warnings:

```
warning: the following explicit lifetimes could be elided: 'a
   --> compiler/rustc_serialize/src/serialize.rs:328:6
    |
328 | impl<'a, S: Encoder, T: Encodable<S>> Encodable<S> for Cow<'a, [T]>
    |      ^^                                                    ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    = note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
    |
328 - impl<'a, S: Encoder, T: Encodable<S>> Encodable<S> for Cow<'a, [T]>
328 + impl<S: Encoder, T: Encodable<S>> Encodable<S> for Cow<'_, [T]>
    |

warning: the following explicit lifetimes could be elided: 'a
   --> compiler/rustc_serialize/src/serialize.rs:348:6
    |
348 | impl<'a, S: Encoder> Encodable<S> for Cow<'a, str> {
    |      ^^                                   ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
348 - impl<'a, S: Encoder> Encodable<S> for Cow<'a, str> {
348 + impl<S: Encoder> Encodable<S> for Cow<'_, str> {
    |

warning: the following explicit lifetimes could be elided: 'a
   --> compiler/rustc_serialize/src/serialize.rs:355:6
    |
355 | impl<'a, D: Decoder> Decodable<D> for Cow<'a, str> {
    |      ^^                                   ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
355 - impl<'a, D: Decoder> Decodable<D> for Cow<'a, str> {
355 + impl<D: Decoder> Decodable<D> for Cow<'_, str> {
```

Best regards,
Michal
2024-10-09 23:03:49 +02:00
Matthias Krüger
d58345010c
Rollup merge of #131383 - AngelicosPhosphoros:better_doc_for_slice_slicing_at_ends, r=cuviper
Add docs about slicing slices at the ends

Closes https://github.com/rust-lang/rust/issues/60783
2024-10-09 23:03:48 +02:00
Matthias Krüger
627d0b4067
Rollup merge of #130827 - fmease:library-mv-obj-save-dyn-compat, r=ibraheemdev
Library: Rename "object safe" to "dyn compatible"

Completed T-lang FCP: https://github.com/rust-lang/lang-team/issues/286#issuecomment-2338905118.
Tracking issue: https://github.com/rust-lang/rust/issues/130852

Regarding https://github.com/rust-lang/rust/labels/relnotes, I guess I will manually open a https://github.com/rust-lang/rust/labels/relnotes-tracking-issue since this change affects everything (compiler, library, tools, docs, books, everyday language).

r? ghost
2024-10-09 23:03:47 +02:00
Matthias Krüger
b41e939cb5
Rollup merge of #123951 - pitaj:reserve-guarded-strings, r=traviscross
Reserve guarded string literals (RFC 3593)

Implementation for RFC 3593, including:
- lexer / parser changes
- diagnostics
- migration lint
- tests

We reserve `#"`, `##"`, `###"`, `####`, and any other string of four or more repeated `#`. This avoids infinite lookahead in the lexer, though we still use infinite lookahead in the parser to provide better forward compatibility diagnostics.

This PR does not implement any special lexing of the string internals:
- strings preceded by one or more `#` are denied
- regardless of the number of trailing `#`
- string contents are lexed as if it was just a bare `"string"`

Tracking issue: #123735
RFC: rust-lang/rfcs#3593
2024-10-09 23:03:47 +02:00
Alex Crichton
9c9d3c85bb Update wasm-component-ld to 0.5.10
This pulls in a bug fix relative to the 0.5.9 release which was
updated-to recently.
2024-10-09 13:21:00 -07:00
bors
eb4e234674 Auto merge of #131461 - onur-ozkan:ignore-ci-rustc-change-test, r=onur-ozkan
ignore `ci_rustc_if_unchanged_logic` test

Temporary hotfix for unblocking CI.

r? ghost
2024-10-09 19:51:01 +00:00
onur-ozkan
118f7a6b88 ignore ci_rustc_if_unchanged_logic test
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-09 22:44:29 +03:00
Josh Stone
7b52e6bc47 Mention allocation errors for open_buffered 2024-10-09 12:43:23 -07:00
Guillaume Gomez
5e6033ea8b Strengthen some GUI tests 2024-10-09 21:23:20 +02:00
Guillaume Gomez
12d5f0aa2c Add GUI regression test for methods left margin on mobile 2024-10-09 21:01:08 +02:00
Guillaume Gomez
16844e2485 Fix methods alignment on mobile 2024-10-09 21:01:08 +02:00
Matthias Krüger
0fe2532a37
Rollup merge of #131456 - kupiakos:patch-3, r=compiler-errors
Fix typo in E0793

`s/references/reference/`
2024-10-09 20:27:26 +02:00