Commit Graph

263674 Commits

Author SHA1 Message Date
Jubilee
5858329f1a
Rollup merge of #128965 - Zalathar:no-pat, r=Nadrieril
Remove `print::Pat` from the printing of `WitnessPat`

After the preliminary work done in #128536, we can now get rid of `print::Pat` entirely.

- First, we introduce a variant `PatKind::Print(String)`.
- Then we incrementally remove each other variant of `PatKind`, by having the relevant code produce `PatKind::Print` instead.
- Once `PatKind::Print` is the only remaining variant, it becomes easy to remove `print::Pat` and replace it with `String`.

There is more cleanup that I have in mind, but this seemed like a natural stopping point for one PR.

r? ```@Nadrieril```
2024-08-15 18:44:16 -07:00
Jubilee
4fd4da9e23
Rollup merge of #128922 - Nadrieril:r-a-use-upstream-pat-ana, r=Veykril
rust-analyzer: use in-tree `pattern_analysis` crate

r? ```@Veykril```
2024-08-15 18:44:16 -07:00
Jubilee
f624f2d3f9
Rollup merge of #128064 - ijackson:noop-waker-doc, r=workingjubilee
Improve docs for Waker::noop and LocalWaker::noop

 * Add a warning about a likely misuse.  (See my commit message for longer rationale.)
 * Apply some probably-accidentally-omitted changes to `LocalWaker`'s docs
 * Add a comment about the clone-and-hack of the docs

I have used [semantic linefeeds](https://rhodesmill.org/brandon/2012/one-sentence-per-line/) for the docs formatting.
2024-08-15 18:44:15 -07:00
bors
4b7d074d76 Auto merge of #128787 - Oneirical:infohazardous-deprogram, r=jieyouxu
Coalesce `dep-info`, `dep-info-spaces` and `dep-info-doesnt-run-much` `run-make` tests into `dep-info` rmake.rs

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

This is one of the most ancient tests in the `run-make` directory and its Makefile does some unexpected things, like creating and deleting a `done` directory over and over, sleeping at certain times (this is the [commit](0d9fd8e2a1) that added the `sleep`).

I tried to preserve the intent of the test, which is smoke-testing that `dep-info` works.

try-job: x86_64-msvc
try-job: i686-mingw
try-job: aarch64-gnu
try-job: aarch64-apple
try-job: test-various
try-job: armhf-gnu
try-job: dist-various-1
2024-08-15 22:33:03 +00:00
bors
2c93fabd98 Auto merge of #129130 - matthiaskrgr:rollup-603jta0, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #128348 (Unconditionally allow shadow call-stack sanitizer for AArch64)
 - #129065 (Use `impl PartialEq<TokenKind> for Token` more.)
 - #129072 (Infer async closure args from `Fn` bound even if there is no corresponding `Future` bound on return)
 - #129096 (Print more verbose error for commands that capture output)
 - #129101 (Fix projections when parent capture is by-ref but child capture is by-value in the `ByMoveBody` pass)
 - #129106 (Remove redundant type ops: `Eq`/`Subtype`)
 - #129122 (Remove duplicated `Rustdoc::output` method from `run-make-support` lib)
 - #129124 (rustdoc-json: Use FxHashMap from rustdoc_json_types)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-15 20:04:49 +00:00
Matthias Krüger
ef72a6a711
Rollup merge of #129124 - aDotInTheVoid:rdj-hashmap-3, r=GuillaumeGomez
rustdoc-json: Use FxHashMap from rustdoc_json_types

Alternative to #110051 and #127456.

This lets us avoid rehashing the json index after building it by using the same hashmap type in construction and in rustdoc_json_types. The above PR's tried to do this by having rustdoc_json_types get the same hashmap that rustdoc has via rustc_data_structures. However, this can be made simpler if we change rustdoc instead.

For the rustdoc-type republish on crates.io, It will filter out the `pub use`, and not change source at all. https://github.com/aDotInTheVoid/rustdoc-types/pull/30. That code [already replaces the hashmap](8d6528669e/update.sh (L11)) to use the one in `std::collections` (instead of `FxHashMap`)

try-job: dist-arm-linux

r? ``@GuillaumeGomez``
2024-08-15 19:32:39 +02:00
Matthias Krüger
bc986c7290
Rollup merge of #129122 - GuillaumeGomez:remove-duplicated-rustdoc-output-methods, r=Kobzol
Remove duplicated `Rustdoc::output` method from `run-make-support` lib

I discovered recently that `--output` is deprecated in rustdoc and that `--out-dir` is doing the exact same thing. To keep things along with the current rustdoc status, I removed the `Rustdoc::output` method.

cc `@jieyouxu`
r? `@Kobzol`
2024-08-15 19:32:38 +02:00
Matthias Krüger
f3df807207
Rollup merge of #129106 - compiler-errors:unused-type-ops, r=jieyouxu
Remove redundant type ops: `Eq`/`Subtype`

r? lcnr or anyone really
2024-08-15 19:32:37 +02:00
Matthias Krüger
6c898d2b03
Rollup merge of #129101 - compiler-errors:deref-on-parent-by-ref, r=lcnr
Fix projections when parent capture is by-ref but child capture is by-value in the `ByMoveBody` pass

This fixes a somewhat strange bug where we build the incorrect MIR in #129074. This one is weird, but I don't expect it to actually matter in practice since it almost certainly results in a move error in borrowck. However, let's not ICE.

Given the code:

```
#![feature(async_closure)]

// NOT copy.
struct Ty;

fn hello(x: &Ty) {
    let c = async || {
        *x;
        //~^ ERROR cannot move out of `*x` which is behind a shared reference
    };
}

fn main() {}
```

The parent coroutine-closure captures `x: &Ty` by-ref, resulting in an upvar of `&&Ty`. The child coroutine captures `x` by-value, resulting in an upvar of `&Ty`. When constructing the by-move body for the coroutine-closure, we weren't applying an additional deref projection to convert the parent capture into the child capture, resulting in an type error in assignment, which is a validation ICE.

As I said above, this only occurs (AFAICT) in code that eventually results in an error, because it is only triggered by HIR that attempts to move a non-copy value out of a ref. This doesn't occur if `Ty` is `Copy`, since we'd instead capture `x` by-ref in the child coroutine.

Fixes #129074
2024-08-15 19:32:37 +02:00
Matthias Krüger
19e32bfc81
Rollup merge of #129096 - Kobzol:bootstrap-cmd-verbosity, r=onur-ozkan
Print more verbose error for commands that capture output

https://github.com/rust-lang/rust/pull/128874 made bootstrap command errors less verbose without `-v`. However, in some cases it's too extreme. If a command fails, it now outputs just `Command has failed. Rerun with -v to see more details.`, without providing any context.

I think that I found a reasonable heuristic to figure out when we should print a more verbose error. When the command doesn't capture output, its stdout/stderr is printed, therefore the user sees context about the error. However, when the command captures its output, the user won't see any error message in the output, which is not great. So only in that case, bootstrap now prints a slightly more verbose output (and also prints the captured output).

r? `@onur-ozkan`
2024-08-15 19:32:36 +02:00
Matthias Krüger
53bf554de8
Rollup merge of #129072 - compiler-errors:more-powerful-async-closure-inference, r=lcnr
Infer async closure args from `Fn` bound even if there is no corresponding `Future` bound on return

In #127482, I implemented the functionality to infer an async closure signature when passed into a function that has `Fn` + `Future` where clauses that look like:

```
fn whatever(callback: F)
where
  F: Fn(Arg) -> Fut,
  Fut: Future<Output = Out>,
```

However, #127781 demonstrates that this is still incomplete to address the cases users care about. So let's not bail when we fail to find a `Future` bound, and try our best to just use the args from the `Fn` bound if we find it. This is *fine* since most users of closures only really care about the *argument* types for inference guidance, since we require the receiver of a `.` method call to be known in order to probe methods.

When I experimented with programmatically rewriting `|| async {}` to `async || {}` in #127827, this also seems to have fixed ~5000 regressions (probably all coming from usages `TryFuture`/`TryStream` from futures-rs): the [before](https://github.com/rust-lang/rust/pull/127827#issuecomment-2254061733) and [after](https://github.com/rust-lang/rust/pull/127827#issuecomment-2255470176) crater runs.

Fixes #127781.
2024-08-15 19:32:36 +02:00
Matthias Krüger
bb63d75ac1
Rollup merge of #129065 - nnethercote:PartialEq-TokenKind, r=spastorino
Use `impl PartialEq<TokenKind> for Token` more.

This lets us compare a `Token` with a `TokenKind`. It's used a lot, but can be used even more, avoiding the need for some `.kind` uses.

r? `@spastorino`
2024-08-15 19:32:35 +02:00
Matthias Krüger
3075644a3d
Rollup merge of #128348 - dingxiangfei2009:allow-shadow-call-stack-sanitizer, r=tmandry
Unconditionally allow shadow call-stack sanitizer for AArch64

It is possible to do so whenever `-Z fixed-x18` is applied.

cc ``@Darksonn`` for context

The reasoning is that, as soon as reservation on `x18` is forced through the flag `fixed-x18`, on AArch64 the option to instrument with [Shadow Call Stack sanitizer](https://clang.llvm.org/docs/ShadowCallStack.html) is then applicable regardless of the target configuration.

At the every least, we would like to relax the restriction on specifically `aarch64-unknonw-none`. For this option, we can include a documentation change saying that users of compiled objects need to ensure that they are linked to runtime with Shadow Call Stack instrumentation support.

Related: #121972
2024-08-15 19:32:35 +02:00
Jakub Beránek
478d42bdc2
Print more verbose error for commands that capture output 2024-08-15 18:31:43 +02:00
Ian Jackson
9a95573c2b Add cautionary paragraph about noop wakers.
Based on a suggestion from @kpreid, with some further editing.
2024-08-15 16:18:49 +01:00
Oneirical
7c4d56102a coalesce dep-info-spaces and dep-info-doesnt-run-much into dep-info 2024-08-15 10:16:30 -04:00
bors
d2b5aa6552 Auto merge of #128936 - bjorn3:fix_thin_archive_reading, r=jieyouxu
Support reading thin archives in ArArchiveBuilder

And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed.

Fixes https://github.com/rust-lang/rust/issues/107407
Fixes https://github.com/rust-lang/rust/issues/107162
https://github.com/rust-lang/rust/issues/107495 has been fixed in a previous PR already.
2024-08-15 14:13:52 +00:00
Guillaume Gomez
d562a4a510 About rmake tests 2024-08-15 15:44:29 +02:00
Guillaume Gomez
a19a8f8e52 Remove duplicated Rustdoc::output method from run-make-support lib 2024-08-15 15:44:03 +02:00
Alona Enraght-Moony
9028b5381b rustdoc-json: Use FxHashMap from rustdoc_json_types 2024-08-15 13:12:11 +00:00
bors
3139ff09e9 Auto merge of #128861 - khuey:mir-inlining-parameters-debuginfo, r=wesleywiser
Rework MIR inlining debuginfo so function parameters show up in debuggers.

Line numbers of multiply-inlined functions were fixed in #114643 by using a single DISubprogram. That, however, triggered assertions because parameters weren't deduplicated. The "solution" to that in #115417 was to insert a DILexicalScope below the DISubprogram and parent all of the parameters to that scope. That fixed the assertion, but debuggers (including gdb and lldb) don't recognize variables that are not parented to the subprogram itself as parameters, even if they are emitted with DW_TAG_formal_parameter.

Consider the program:

```rust
use std::env;

#[inline(always)]
fn square(n: i32) -> i32 {
    n * n
}

#[inline(never)]
fn square_no_inline(n: i32) -> i32 {
    n * n
}

fn main() {
    let x = square(env::vars().count() as i32);
    let y = square_no_inline(env::vars().count() as i32);
    println!("{x} == {y}");
}
```

When making a release build with debug=2 and rustc 1.82.0-nightly (8b3870784 2024-08-07)

```
(gdb) r
Starting program: /ephemeral/tmp/target/release/tmp [Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, tmp::square () at src/main.rs:5
5	    n * n
(gdb) info args
No arguments.
(gdb) info locals
n = 31
(gdb) c
Continuing.

Breakpoint 2, tmp::square_no_inline (n=31) at src/main.rs:10
10	    n * n
(gdb) info args
n = 31
(gdb) info locals
No locals.
```

This issue is particularly annoying because it removes arguments from stack traces.

The DWARF for the inlined function looks like this:

```
< 2><0x00002132 GOFF=0x00002132>      DW_TAG_subprogram
                                        DW_AT_linkage_name          _ZN3tmp6square17hc507052ff3d2a488E
                                        DW_AT_name                  square
                                        DW_AT_decl_file             0x0000000f /ephemeral/tmp/src/main.rs
                                        DW_AT_decl_line             0x00000004
                                        DW_AT_type                  0x00001a56<.debug_info+0x00001a56>
                                        DW_AT_inline                DW_INL_inlined
< 3><0x00002142 GOFF=0x00002142>        DW_TAG_lexical_block
< 4><0x00002143 GOFF=0x00002143>          DW_TAG_formal_parameter
                                            DW_AT_name                  n
                                            DW_AT_decl_file             0x0000000f /ephemeral/tmp/src/main.rs
                                            DW_AT_decl_line             0x00000004
                                            DW_AT_type                  0x00001a56<.debug_info+0x00001a56>
< 4><0x0000214e GOFF=0x0000214e>          DW_TAG_null
< 3><0x0000214f GOFF=0x0000214f>        DW_TAG_null
```

That DW_TAG_lexical_block inhibits every debugger I've tested from recognizing 'n' as a parameter.

This patch removes the additional lexical scope. Parameters can be easily deduplicated by a tuple of their scope and the argument index, at the trivial cost of taking a Hash + Eq bound on DIScope.
2024-08-15 11:42:15 +00:00
bors
026e9ed3f0 Auto merge of #128037 - beetrees:repr128-c-style-use-natvis, r=michaelwoerister
Use the `enum2$` Natvis visualiser for repr128 C-style enums

Use the preexisting `enum2$` Natvis visualiser to allow PDB debuggers to display fieldless `#[repr(u128)]]`/`#[repr(i128)]]` enums correctly.

Tracking issue: #56071

try-job: x86_64-msvc
2024-08-15 09:17:24 +00:00
bors
c416a6fc73 Auto merge of #129066 - weihanglo:update-cargo, r=weihanglo
Update cargo

7 commits in 0d8d22f83b066503f6b2b755925197e959e58b4f..2f738d617c6ead388f899802dd1a7fd66858a691
2024-08-08 12:54:24 +0000 to 2024-08-13 10:57:52 +0000
- chore: downgrade to openssl v1.1.1 (again) (rust-lang/cargo#14391)
- feat(trim-paths): rustdoc supports trim-paths for diagnostics (rust-lang/cargo#14389)
- Use longhand gitoxide path-spec patterns (rust-lang/cargo#14380)
- feat: Add `info` cargo subcommand (rust-lang/cargo#14141)
- CI: Switch macos aarch64 to nightly (rust-lang/cargo#14382)
- Use context instead of with_context (rust-lang/cargo#14377)
- Fix: `cargo package` failed on bare commit git repo. (rust-lang/cargo#14359)

r? ghost
2024-08-15 06:09:39 +00:00
bors
0ba9db87e6 Auto merge of #129108 - matthiaskrgr:rollup-t4rjwgp, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #125970 (CommandExt::before_exec: deprecate safety in edition 2024)
 - #127905 (Add powerpc-unknown-linux-muslspe compile target)
 - #128925 (derive(SmartPointer): register helper attributes)
 - #128946 (Hash Ipv*Addr as an integer)
 - #128963 (Add possibility to generate rustdoc JSON output to stdout)
 - #129015 (Update books)
 - #129067 (Use `append` instead of `extend(drain(..))`)
 - #129100 (Fix dependencies cron job)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-15 03:44:39 +00:00
Matthias Krüger
e14f171e96
Rollup merge of #129100 - ehuss:fix-dependencies-update, r=Kobzol
Fix dependencies cron job

This fixes a mistake in #127786 that broke the dependencies update cron job. I accidentally set the wrong path in the cargo command.
2024-08-15 00:02:27 +02:00
Matthias Krüger
c582c0c137
Rollup merge of #129067 - cuviper:append, r=wesleywiser
Use `append` instead of `extend(drain(..))`

The first commit adds `IndexVec::append` that forwards to `Vec::append`, and uses it in a couple places.

The second commit updates `indexmap` for its new `IndexMap::append`, and also uses that in a couple places.

These changes are similar to what [`clippy::extend_with_drain`](https://rust-lang.github.io/rust-clippy/master/index.html#/extend_with_drain) would suggest, just for other collection types.
2024-08-15 00:02:27 +02:00
Matthias Krüger
d14fa852c7
Rollup merge of #129015 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/book

7 commits in 67fa536768013d9d5a13f3a06790521d511ef711..04bc1396bb857f35b5dda1d773c9571e1f253304
2024-07-31 13:19:44 UTC to 2024-07-16 18:18:38 UTC

- mdbook-trpl-listing: Add missing elided lifetimes (rust-lang/book#3995)
- infra: include ghp-import and git push in generate-preview script (rust-lang/book#3998)
- infra: add robots.txt for GH Pages previews (rust-lang/book#3997)
- Clarify function definitions vs. expressions (rust-lang/book#3870)
- infra: fix some shellcheck issues in CI config (rust-lang/book#3988)
- infra: support test renderer in mdbook preprocessors (rust-lang/book#3982)
- Improve handling of `<Listing>`s (rust-lang/book#3975)

## rust-lang/edition-guide

4 commits in 5454de3d12b9ccc6375b629cf7ccda8264640aac..aeeb287d41a0332c210da122bea8e0e91844ab3e
2024-08-06 21:16:24 UTC to 2024-07-29 21:41:36 UTC

- Stabilize unsafe extern blocks (rust-lang/edition-guide#313)
- Add chapter for Lifetime Capture Rules 2024 (rust-lang/edition-guide#316)
- 2024: Add page for missing_fragment_specifier (rust-lang/edition-guide#315)
- Add documentation for 2024 prelude migration. (rust-lang/edition-guide#314)

## rust-lang/nomicon

3 commits in 0ebdacadbda8ce2cd8fbf93985e15af61a7ab895..6ecf95c5f2bfa0e6314dfe282bf775fd1405f7e9
2024-08-11 16:55:29 UTC to 2024-08-09 23:25:22 UTC

- Stabilize `min_exhaustive_patterns` (rust-lang/nomicon#445)
- repr(int) enums: both size and sign matter (rust-lang/nomicon#458)
- Update what-unsafe-does.md (rust-lang/nomicon#457)

## rust-lang/reference

6 commits in 2e191814f163ee1e77e2d6094eee4dd78a289c5b..62cd0df95061ba0ac886333f5cd7f3012f149da1
2024-08-11 21:06:12 UTC to 2024-07-30 06:34:03 UTC

- Reformat (and only reformat) the inline assembly chapter (rust-lang/reference#1550)
- Changes for unsafe extern blocks (RFC 3484) (rust-lang/reference#1536)
- Stabilize Wasm relaxed SIMD (rust-lang/reference#1421)
- Remove custom blockquote styling (rust-lang/reference#1547)
- Fix std-links for generics with commas. (rust-lang/reference#1549)
- Add details on how names are introduced. (rust-lang/reference#1052)

## rust-lang/rust-by-example

3 commits in 89aecb6951b77bc746da73df8c9f2b2ceaad494a..8f94061936e492159f4f6c09c0f917a7521893ff
2024-08-06 17:25:35 UTC to 2024-07-16 20:58:25 UTC

- Update lifetime_bounds.md (rust-lang/rust-by-example#1869)
- Remove the link to Japanese translation (rust-lang/rust-by-example#1868)
- Add an example of implementing the FromStr trait for Circles. (rust-lang/rust-by-example#1865)

## rust-lang/rustc-dev-guide

12 commits in 0c4d55cb59fe440d1a630e4e5774d043968edb3f..43d83780db545a1ed6d45773312fc578987e3968
2024-08-08 17:54:27 UTC to 2024-07-19 07:15:12 UTC

- Added 'the' in chapter "Running test" subtitle "Run unit tests on the compiler/library" (rust-lang/rustc-dev-guide#2040)
- Correct rust code block in *Dataflow Analysis* (rust-lang/rustc-dev-guide#2037)
- linkcheck: fix filtering of the source files (rust-lang/rustc-dev-guide#2019)
- chore: fix some comments (rust-lang/rustc-dev-guide#2028)
- linkcheck: fix reported broken links (part 2) (rust-lang/rustc-dev-guide#2024)
- typo (rust-lang/rustc-dev-guide#2029)
- Fix broken links in `llvm-coverage-instrumentation.md` (rust-lang/rustc-dev-guide#2027)
- Fix invalid link to toolstate documentation (rust-lang/rustc-dev-guide#2021)
- linkcheck: fix reported broken links (part 1) (rust-lang/rustc-dev-guide#2022)
- fix link (rust-lang/rustc-dev-guide#2020)
- MIR docs: fix borked links and update style (rust-lang/rustc-dev-guide#2017)
- Update adding.md (rust-lang/rustc-dev-guide#2016)
2024-08-15 00:02:26 +02:00
Matthias Krüger
6c242a0da4
Rollup merge of #128963 - GuillaumeGomez:output-to-stdout, r=aDotInTheVoid
Add possibility to generate rustdoc JSON output to stdout

Fixes #127165.

I think it's likely common to want to get rustdoc json output directly instead of reading it from a file so I added this option to allow it. It's unstable and only works with `--output-format=json`.

r? `@aDotInTheVoid`
2024-08-15 00:02:26 +02:00
Matthias Krüger
cd1b42c3e9
Rollup merge of #128946 - orlp:faster-ip-hash, r=joboet
Hash Ipv*Addr as an integer

The `Ipv4Addr` and `Ipv6Addr` structs always have a fixed size, but directly derive `Hash`. This causes them to call the bytestring hasher implementation, which adds extra work for most hashers. This PR converts the internal representation to a fixed-width integer before passing to the hasher to prevent this.
2024-08-15 00:02:25 +02:00
Matthias Krüger
9938349c71
Rollup merge of #128925 - dingxiangfei2009:smart-ptr-helper-attr, r=compiler-errors
derive(SmartPointer): register helper attributes

Fix #128888

This PR enables built-in macros to register helper attributes, if any, to support correct name resolution in the correct lexical scope under the macros.

Also, `#[pointee]` is moved into the scope under `derive(SmartPointer)`.

cc `@Darksonn` `@davidtwco`
2024-08-15 00:02:25 +02:00
Matthias Krüger
442ba180d6
Rollup merge of #127905 - BKPepe:powerpc-muslspe, r=wesleywiser
Add powerpc-unknown-linux-muslspe compile target

This is almost identical to already existing targets:
- powerpc_unknown_linux_musl.rs
- powerpc_unknown_linux_gnuspe.rs

It has support for PowerPC SPE (muslspe), which
can be used with GCC version up to 8. It is useful for Freescale or IBM cores like e500.

This was verified to be working with OpenWrt build system for CZ.NIC's Turris 1.x routers, which are using Freescale P2020, e500v2, so add it as a Tier 3 target.

Follow-up of https://github.com/rust-lang/rust/pull/100860
2024-08-15 00:02:24 +02:00
Matthias Krüger
0bed4d1f1c
Rollup merge of #125970 - RalfJung:before_exec, r=m-ou-se
CommandExt::before_exec: deprecate safety in edition 2024

Similar to `set_var`, we had to find out after 1.0 was released that `before_exec` should have been unsafe. We partially rectified this by deprecating that function a long time ago, but since https://github.com/rust-lang/rust/pull/124636 we have the ability to also deprecate the safety of the old function and make it a *hard error* to call the old function outside `unsafe` in the next edition. So just in case anyone still uses the old function, let's ensure this can't be ignored when moving code to the new edition.

Cc `@rust-lang/libs-api`

Tracking:

- https://github.com/rust-lang/rust/issues/124866
2024-08-15 00:02:24 +02:00
bjorn3
901c9daa05 Fix null pointer dereference when a file is not an object file 2024-08-14 19:37:14 +00:00
Michael Goulet
4290943fb3 Infer async closure args from Fn bound even if there is no corresponding Future bound 2024-08-14 15:33:03 -04:00
bjorn3
7c972d75dc Use toString instead of raw_svector_ostream for error messages 2024-08-14 19:26:00 +00:00
bors
13a52890dd Auto merge of #128407 - Oneirical:feline-dotestication, r=jieyouxu
Migrate `min-global-align` and `no-alloc-shim` `run-make` tests to rmake

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

Please try:

try-job: aarch64-apple
try-job: test-various
try-job: armhf-gnu
try-job: aarch64-gnu
try-job: aarch64-gnu
2024-08-14 19:24:19 +00:00
Nadrieril
bb84372e43 rust-analyzer: use in-tree pattern_analysis crate 2024-08-14 20:52:19 +02:00
Michael Goulet
f264e5d011 Remove redundant type ops 2024-08-14 14:18:17 -04:00
Michael Goulet
1e1d839388 Fix projections when parent capture is by-ref 2024-08-14 13:24:07 -04:00
Eric Huss
4a2d0d9233 Fix dependencies cron job 2024-08-14 09:57:14 -07:00
bjorn3
9de0d147f4 Unconditionally use the LLVM symbol reader
This may fix a linker error on MSVC
2024-08-14 16:50:48 +00:00
bjorn3
2217014210 Apply some suggestions to the test rmake file 2024-08-14 16:44:05 +00:00
Eric Huss
e29360ce4d Update Cargo.lock 2024-08-14 08:09:38 -07:00
Oneirical
b85bedcb24 rewrite no-alloc-shim to rmake 2024-08-14 10:33:56 -04:00
Oneirical
5e04cefb01 rewrite min-global-align to rmake 2024-08-14 10:33:41 -04:00
bors
355a307a87 Auto merge of #129092 - jieyouxu:rollup-z2522nm, r=jieyouxu
Rollup of 6 pull requests

Successful merges:

 - #128570 (Stabilize `asm_const`)
 - #128828 (`-Znext-solver` caching)
 - #128954 (Explicitly specify type parameter on FromResidual for Option and ControlFlow.)
 - #129059 (Record the correct target type when coercing fn items/closures to pointers)
 - #129071 (Port `run-make/sysroot-crates-are-unstable` to rmake)
 - #129088 (Make the rendered html doc for rustc better)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-14 14:13:48 +00:00
许杰友 Jieyou Xu (Joe)
4d8c0b3b5d
Rollup merge of #129088 - Jaic1:fix-doc, r=GuillaumeGomez
Make the rendered html doc for rustc better

This PR adds `|` to make the html doc of [`rustc_error::Level`](https://doc.rust-lang.org/1.80.0/nightly-rustc/rustc_errors/enum.Level.html) rendered better. Previsouly it looks good in the source code, but not rendered correctly in the html doc.

r? `@GuillaumeGomez`
2024-08-14 21:43:09 +08:00
许杰友 Jieyou Xu (Joe)
7472d1bbaf
Rollup merge of #129071 - Zalathar:sysroot-unstable, r=jieyouxu
Port `run-make/sysroot-crates-are-unstable` to rmake

I already have a more elaborate draft at #126231 that tries to port the underlying Python script to rmake, but there's no need for the removal of Makefiles to be held up on complex tasks like that, so this PR simply takes the trivial Makefile and converts it into a trivial rmake recipe.

Part of #121876.

r? ``@jieyouxu``
2024-08-14 21:43:09 +08:00
许杰友 Jieyou Xu (Joe)
2200910659
Rollup merge of #129059 - compiler-errors:subtyping-correct-type, r=lcnr
Record the correct target type when coercing fn items/closures to pointers

Self-explanatory. We were previously not recording the *target* type of a coercion as the output of an adjustment. This should remedy that.

We must also modify the function pointer casts in MIR typeck to use subtyping, since those broke since #118247.

r? lcnr
2024-08-14 21:43:08 +08:00
许杰友 Jieyou Xu (Joe)
049b3e549e
Rollup merge of #128954 - zachs18:fromresidual-no-default, r=scottmcm
Explicitly specify type parameter on FromResidual for Option and ControlFlow.

~~Remove type parameter default `R = <Self as Try>::Residual` from `FromResidual`~~ _Specify default type parameter on `FromResidual` impls in the stdlib_ to work around https://github.com/rust-lang/rust/issues/99940 / https://github.com/rust-lang/rust/issues/87350 ~~as mentioned in https://github.com/rust-lang/rust/issues/84277#issuecomment-1773259264~~.

This does not completely fix the issue, but works around it for `Option` and `ControlFlow` specifically (`Result` does not have the issue since it already did not use the default parameter of `FromResidual`).

~~(Does this need an ACP or similar?)~~ ~~This probably needs at least an FCP since it changes the API described in [the RFC](https://github.com/rust-lang/rfcs/pull/3058). Not sure if T-lang, T-libs-api, T-libs, or some combination (The tracking issue is tagged T-lang, T-libs-api).~~ This probably doesn't need T-lang input, since it is not changing the API of `FromResidual` from the RFC? Maybe needs T-libs-api FCP?
2024-08-14 21:43:08 +08:00