Commit Graph

255554 Commits

Author SHA1 Message Date
bors
98d768bf75 Auto merge of #17239 - Veykril:metrics-caching, r=Veykril
internal: Key ignoring the job-id in metrics cache
2024-05-15 11:32:48 +00:00
Lukas Wirth
b5fbde7f1c Key ignoring the job-id in metrics cache 2024-05-15 13:31:11 +02:00
Renato A
e1611aa690
Update library/core/src/result.rs
Co-authored-by: joboet <jonasboettiger@icloud.com>
2024-05-15 08:07:16 -03:00
bors
38640806cc Auto merge of #17238 - Veykril:metrics-caching, r=Veykril
Fix metrics workflow not actually updating the toolchain

The install won't persist across jobs
2024-05-15 10:57:26 +00:00
Lukas Wirth
9db0b656e8 Fix metrics workflow not actually updating the toolchain 2024-05-15 12:54:24 +02:00
bors
3cb0030fe9 Auto merge of #123413 - petrochenkov:delegmulti2, r=fmease
delegation: Implement list delegation

```rust
reuse prefix::{a, b, c};
```

Using design described in https://github.com/rust-lang/rfcs/pull/3530#issuecomment-2020869823 (the lists are desugared at macro expansion time).
List delegations are expanded eagerly when encountered, similarly to `#[cfg]`s, and not enqueued for later resolution/expansion like regular macros or glob delegation (https://github.com/rust-lang/rust/pull/124135).

Part of https://github.com/rust-lang/rust/issues/118212.
2024-05-15 10:35:31 +00:00
Guillaume Gomez
c765480efe Migrate run-make/rustdoc-themes to new rmake 2024-05-15 12:22:40 +02:00
Guillaume Gomez
c87ae947eb Add new htmldocck function to run-make-support 2024-05-15 11:46:04 +02:00
bors
d5878844a8 Auto merge of #17235 - Veykril:metrics-caching, r=Veykril
internal: Use Swatinem/rust-cache for metrics CI

Current metrics caching uses a base cache action, whereas I think the one we use for general ci works here as well. Saw this while noticing that our metrics CI is broken as it for some reason uses an outdated rust stable? (unsure why that is)
2024-05-15 09:36:33 +00:00
J-ZhengLi
1b7fc5f5aa add some msrv checks in is_min_const_fn 2024-05-15 16:38:57 +08:00
bors
a71c3ffce9 Auto merge of #125032 - compiler-errors:crash-dump-dir, r=onur-ozkan
Make crashes dump mir to build dir

Set `-Zdump-mir-dir` for `crashes`-style tests.

Alternatively, we just remove `tests/crashes/124436.rs`, since if the only way to get it to repro is via `-Zdump-mir`, then maybe it's not worth it to fix.

Fixes #125029
2024-05-15 08:28:02 +00:00
Ralf Jung
0afd50e852 MIR operators: clarify Shl/Shr handling of negative offsets 2024-05-15 10:25:39 +02:00
Lukas Wirth
2e0f2a23a4 Bump Swatinem/rust-cache 2024-05-15 09:50:34 +02:00
Lukas Wirth
4b2998d4c5 Use Swatinem/rust-cache for metrics CI 2024-05-15 09:49:42 +02:00
bors
44fa5fd39a Auto merge of #125136 - matthiaskrgr:rollup-ljm15m3, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #124990 (Also expand weak alias tys inside consts inside `expand_weak_alias_tys`)
 - #125108 (coverage: `CoverageIdsInfo::mcdc_bitmap_bytes` is never needed)
 - #125132 (Add `on_unimplemented" typo suggestions)
 - #125135 (Fix the dedup error because of spans from suggestion)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-05-15 06:21:19 +00:00
Matthias Krüger
5f1a120ee5
Rollup merge of #125135 - chenyukang:yukang-fix-116502, r=compiler-errors
Fix the dedup error because of spans from suggestion

Fixes #116502

I believe this kind of issue is supposed resolved by #118057, but the `==` in `span` respect syntax context, here we should only care that they point to the same bytes of source text, so should use `source_equal`.
2024-05-15 07:16:49 +02:00
Matthias Krüger
f7c2934420
Rollup merge of #125132 - mejrs:diag, r=compiler-errors
Add `on_unimplemented" typo suggestions
2024-05-15 07:16:48 +02:00
Matthias Krüger
a8ff937b07
Rollup merge of #125108 - Zalathar:info-bitmap-bytes, r=nnethercote
coverage: `CoverageIdsInfo::mcdc_bitmap_bytes` is never needed

This code for recalculating `mcdc_bitmap_bytes` in a query doesn't provide any benefit, because its result won't have changed from the value in `FunctionCoverageInfo` that was computed during the MIR instrumentation pass.

Extracted from #124571, to avoid having this held up by unrelated issues with condition count checks.

`@rustbot` label +A-code-coverage
2024-05-15 07:16:48 +02:00
Matthias Krüger
03ff673dcc
Rollup merge of #124990 - fmease:expand-weak-aliases-within-cts, r=compiler-errors
Also expand weak alias tys inside consts inside `expand_weak_alias_tys`

Ever since #121344 has been merged, I couldn't let go of the fear that I might've slipped a tiny bug into rustc (:P).

Checking the type flags of the `Const` is strictly more correct than only checking the ones of the `Const`'s `Ty`. I don't think it's possible to trigger an ICE rn (i.e., one of the two `bug!("unexpected weak alias type")` I added in branches where `expand_weak_alias_tys` should've expanded *all* weak alias tys) because presently const exprs aren't allowed to capture late-bound vars. To be future-proof however, we should iron this out.

A possible reproducer would be the following if I'm not mistaken (currently fails to compile due to the aforementioned restriction):

```rs
#![feature(lazy_type_alias, adt_const_params, generic_const_exprs)]

type F = for<'a> fn(A<{ S::<Weak<'a>>(loop {}) }>) -> &'a ();

type A<const N: S<Weak<'static>>> = ();

#[derive(PartialEq, Eq, std::marker::ConstParamTy)]
struct S<T>(T);

type Weak<'a> = &'a ();
```

Whether a late-bound region should actually be considered constrained by a const expr is a separate question — one which we don't need to answer until / unless we actually allow them in such contexts (probable answer: only inside the return exprs of a block but not inside the stmts).

r? oli-obk (he's not available rn but that's fine) or types or compiler
2024-05-15 07:16:47 +02:00
yukang
75895f59b0 Fix the dedup error because of spans from suggestion 2024-05-15 10:28:44 +08:00
bors
9e7aff7945 Auto merge of #125031 - Oneirical:dynamic-libs, r=jieyouxu
Migrate `run-make/issue-11908` to new `rmake.rs` format

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

Set as draft, because I have a few concerns:

- [x] I am not sure if `target().contains("darwin")` is a good way of checking that the target is on OSX.
- [x] I find it strange that the `dylib` part of the test adapts to different target platforms, but not the `rlib` part. Is `rlib` named the same on all platforms?
2024-05-15 02:10:09 +00:00
Michael Goulet
8994840f7e rustdoc: Negative impls are not notable 2024-05-14 20:40:59 -04:00
Oneirical
91a3f04a3f fix the test 2024-05-14 20:06:23 -04:00
bors
0160bff4b1 Auto merge of #125084 - Jules-Bertholet:fix-125058, r=Nadrieril
`rustc_hir_typeck`: Account for `skipped_ref_pats` in `expr_use_visitor`

Fixes #125058

r? `@Nadrieril`

cc https://github.com/rust-lang/rust/issues/123076

`@rustbot` label A-edition-2024 A-patterns
2024-05-15 00:04:28 +00:00
Vadim Petrochenkov
c30b41012d delegation: Implement list delegation
```rust
reuse prefix::{a, b, c}
```
2024-05-15 02:32:59 +03:00
mejrs
18d7411719 Add `on_unimplemented" typo suggestions 2024-05-15 00:49:33 +02:00
Oneirical
81f7e54962 Port issue-11908 to rmake 2024-05-14 18:15:37 -04:00
ardi
8dc6a5d145 improve maybe_consume_incorrect_semicolon 2024-05-14 23:07:40 +02:00
Oneirical
1f61cc3078 port no-cdylib-as-rdylib test 2024-05-14 17:02:20 -04:00
Julien
b1e5e5161a
remove cxx_flags 2024-05-14 16:43:39 -04:00
Oneirical
1f5837ae25 rewrite c-link-to-rust-staticlib 2024-05-14 16:37:00 -04:00
bors
f915c94f38 Auto merge of #17232 - Veykril:build-scripts-keep-going, r=Veykril
fix: Don't emit --keep-going for custom build script commands

Might be the cause for https://github.com/rust-lang/rust-analyzer/issues/17231
2024-05-14 19:28:22 +00:00
Lukas Wirth
dd0ea024d4 fix: Don't emit --keep-going for custom build script commands 2024-05-14 21:26:37 +02:00
bors
8387315ab3 Auto merge of #125125 - lovesegfault:opt-dist-specify-rustc-perf, r=Mark-Simulacrum
feat(tools/opt-dist): allow local builds to specify a rustc-perf checkout

This is a first step towards allowing `opt-dist` to work in a sandboxed /
air-gapped environment, as it allows users to bypass the ad-hoc download of
`rustc-perf`.
2024-05-14 17:57:11 +00:00
bors
c58b6e66fd Auto merge of #12798 - Alexendoo:no-effect-path-statements, r=y21
Don't lint path statements in no_effect

The rustc lint `path_statements` covers this case

Fixes #11547

changelog: none
2024-05-14 17:44:51 +00:00
Bernardo Meurer Costa
c3c9783de2 feat(tools/opt-dist): allow local builds to specify a rustc-perf checkout 2024-05-14 17:34:33 +00:00
Ralf Jung
5cc020d3df avoid using aligned_alloc; posix_memalign is better-behaved 2024-05-14 19:32:11 +02:00
Alex Macleod
9d790d6407 Don't lint path statements in no_effect 2024-05-14 17:22:56 +00:00
bors
ac385a5af6 Auto merge of #125120 - compiler-errors:rollup-mnjybwv, r=compiler-errors
Rollup of 7 pull requests

Successful merges:

 - #119838 (style-guide: When breaking binops handle multi-line first operand better)
 - #124844 (Use a proper probe for shadowing impl)
 - #125047 (Migrate `run-make/issue-14500` to new `rmake.rs` format)
 - #125080 (only find segs chain for missing methods when no available candidates)
 - #125088 (Uplift `AliasTy` and `AliasTerm`)
 - #125100 (Don't do post-method-probe error reporting steps if we're in a suggestion)
 - #125118 (Use new utility functions/methods in run-make tests)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-05-14 14:40:20 +00:00
bors
652426ce65 Auto merge of #17216 - Young-Flash:mod_with_path, r=Veykril
fix: extract mod to file should respect path attribute

close https://github.com/rust-lang/rust-analyzer/issues/17181
2024-05-14 14:29:00 +00:00
Benoît du Garreau
cfb04795a1 Fix read_exact and read_buf_exact for &[u8] and io:Cursor 2024-05-14 16:16:33 +02:00
jdonszelmann
42119ff45c
create a feature gate 2024-05-14 16:11:26 +02:00
Michael Goulet
31016d5879
Rollup merge of #125118 - GuillaumeGomez:cleanup-run-make, r=jieyouxu
Use new utility functions/methods in run-make tests

Little cleanup using new functions/methods I added into the `run-make-support` library.

r? `@jieyouxu`
2024-05-14 09:55:30 -04:00
Michael Goulet
d59f430eec
Rollup merge of #125100 - compiler-errors:faster, r=nnethercote
Don't do post-method-probe error reporting steps if we're in a suggestion

Currently in method probing, if we fail to pick a method, then we reset and try to collect relevant candidates for method errors:

34582118af/compiler/rustc_hir_typeck/src/method/probe.rs (L953-L993)

However, we do method lookups via `lookup_method_for_diagnostic` and only care about the result if the method probe was a *success*.

Namely, we don't need to do a bunch of other lookups on failure, since we throw away these results anyways, such as an expensive call to:

34582118af/compiler/rustc_hir_typeck/src/method/probe.rs (L959)

And:
34582118af/compiler/rustc_hir_typeck/src/method/probe.rs (L985)

---

This PR also renames some methods so it's clear that they're for diagnostics.

r? `@nnethercote`
2024-05-14 09:55:30 -04:00
Michael Goulet
712e7c37f7
Rollup merge of #125088 - compiler-errors:uplift-alias-ty, r=lcnr
Uplift `AliasTy` and `AliasTerm`

Follow-up from #125076.

r? lcnr
2024-05-14 09:55:29 -04:00
Michael Goulet
8c64acdbdc
Rollup merge of #125080 - bvanjoi:fix-124946, r=nnethercote
only find segs chain for missing methods when no available candidates

Fixes #124946

This PR includes two changes:
- Extracting the lookup for the missing method in chains into a single function.
- Calling this function only when there are no candidates available.
2024-05-14 09:55:29 -04:00
Michael Goulet
844c7e826e
Rollup merge of #125047 - Oneirical:test5, r=jieyouxu
Migrate `run-make/issue-14500` to new `rmake.rs` format

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

Note: I find suspicious that `libbar.a` is hardcoded and is not using the `STATICLIB` call to adapt to Windows platforms. Is this intentional? If not, this will need to be changed.
2024-05-14 09:55:28 -04:00
Michael Goulet
0458d8a53b
Rollup merge of #124844 - compiler-errors:shadow-probe, r=lcnr
Use a proper probe for shadowing impl

r? lcnr
2024-05-14 09:55:28 -04:00
Michael Goulet
36287830a2
Rollup merge of #119838 - joshtriplett:style-guide-binop-indent, r=compiler-errors
style-guide: When breaking binops handle multi-line first operand better

Use the indentation of the *last* line of the first operand, not the first.

Fixes https://github.com/rust-lang/style-team/issues/189
2024-05-14 09:55:27 -04:00
bohan
ade33b02f2 only find segs chain for missing methods when no available candidates 2024-05-14 20:28:55 +08:00