Commit Graph

147052 Commits

Author SHA1 Message Date
bors
1921968cc5 Auto merge of #123497 - GuillaumeGomez:rollup-usqb4q9, r=GuillaumeGomez
Rollup of 8 pull requests

Successful merges:

 - #122334 (Vendor rustc_codegen_gcc)
 - #122894 (Move check for error in impl header outside of reporting)
 - #123149 (Port argument-non-c-like-enum to Rust)
 - #123311 (Match ergonomics: implement "`&`pat everywhere")
 - #123350 (Actually use the inferred `ClosureKind` from signature inference in coroutine-closures)
 - #123474 (Port `run-make/issue-7349` to a codegen test)
 - #123489 (handle rustc args properly in bootstrap)
 - #123496 (ping on wf changes, remove fixme)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-05 15:20:50 +00:00
Guillaume Gomez
b0ca3cd9d4
Rollup merge of #123489 - onur-ozkan:handle-rustc-args-properly, r=clubby789
handle rustc args properly in bootstrap

Because `RUSTFLAGS` gets overwritten during the conversion from `Cargo` to `Command`, the passed rustc args were being lost. This change combines the rustc args with the values that override `RUSTFLAGS`.

Fixes #123228
2024-04-05 16:38:52 +02:00
Guillaume Gomez
0d5ee650f8
Rollup merge of #123474 - jieyouxu:issue-7349-port, r=Mark-Simulacrum
Port `run-make/issue-7349` to a codegen test

The test does not need to be a run-make test, it can use the codegen test infrastructure.

Also took the opportunity to rename the test to `no-redundant-item-monomorphization` so it's not just some opaque issue number.

Part of #121876.
2024-04-05 16:38:51 +02:00
Guillaume Gomez
02ee8a8cee
Rollup merge of #123350 - compiler-errors:async-closure-by-move, r=oli-obk
Actually use the inferred `ClosureKind` from signature inference in coroutine-closures

A follow-up to https://github.com/rust-lang/rust/pull/123349, which fixes another subtle bug: We were not taking into account the async closure kind we infer during closure signature inference.

When I pass a closure directly to an arg like `fn(x: impl async FnOnce())`, that should have the side-effect of artificially restricting the kind of the async closure to `ClosureKind::FnOnce`. We weren't doing this -- that's a quick fix; however, it uncovers a second, more subtle bug with the way that `move`, async closures, and `FnOnce` interact.

Specifically, when we have an async closure like:
```
let x = Struct;
let c = infer_as_fnonce(async move || {
  println!("{x:?}");
}
```

The outer closure captures `x` by move, but the inner coroutine still immutably borrows `x` from the outer closure. Since we've forced the closure to by `async FnOnce()`, we can't actually *do* a self borrow, since the signature of `AsyncFnOnce::call_once` doesn't have a borrowed lifetime. This means that all `async move` closures that are constrained to `FnOnce` will fail borrowck.

We can fix that by detecting this case specifically, and making the *inner* async closure `move` as well. This is always beneficial to closure analysis, since if we have an `async FnOnce()` that's `move`, there's no reason to ever borrow anything, so `move` isn't artificially restrictive.
2024-04-05 16:38:51 +02:00
Guillaume Gomez
c36c009577
Rollup merge of #123149 - jieyouxu:rmake-arguments-non-c-like-enum, r=Mark-Simulacrum
Port argument-non-c-like-enum to Rust

Part of #121876.
2024-04-05 16:38:50 +02:00
Guillaume Gomez
8873ca57f8
Rollup merge of #122334 - GuillaumeGomez:vendor-cg_gcc, r=Mark-Simulacrum
Vendor rustc_codegen_gcc

I used https://github.com/rust-lang/rust/pull/115274 as base for this update.

r? `@bjorn3`
2024-04-05 16:38:49 +02:00
bors
5958f5e08f Auto merge of #123317 - RalfJung:test-in-miri, r=m-ou-se,saethlin,onur-ozkan
Support running library tests in Miri

This adds a new bootstrap subcommand `./x.py miri` which can test libraries in Miri. This is in preparation for eventually doing that as part of bors CI, but this PR only adds the infrastructure, and doesn't enable it yet.

`@rust-lang/bootstrap` should this be `x.py test --miri library/core` or `x.py miri library/core`? The flag has the advantage that we don't have to copy all the arguments from `Subcommand::Test`. It has the disadvantage that most test steps just ignore `--miri` and still run tests the regular way. For clippy you went the route of making it a separate subcommand. ~~I went with a flag now as that seemed easier, but I can change this.~~ I made it a new subcommand. Note however that the regular cargo invocation would be `cargo miri test ...`, so `x.py` is still going to be different in that the `test` is omitted. That said, we could also make it `./x.py miri-test` to make that difference smaller -- that's in fact more consistent with the internal name of the command when bootstrap invokes cargo.

`@rust-lang/libs` ~~unfortunately this PR does some unholy things to the `lib.rs` files of our library crates.~~
`@m-ou-se` found a way that entirely avoids library-level hacks, except for some new small `lib.miri.rs` files that hopefully you will never have to touch. There's a new hack in cargo-miri but there it is in good company...
2024-04-05 13:17:09 +00:00
Ralf Jung
3ad9c83cd2 miri: go look for the item in all crates of the right name 2024-04-05 11:53:46 +02:00
bors
d009f60b55 Auto merge of #123469 - belovdv:remove-miri-jobserver-fixme, r=petrochenkov
remove miri jobserver workaround

This PR removes workaround, added in #113730, since jobserver is kept after [rust-lang/cargo#12776](https://github.com/rust-lang/cargo/pull/12776)
2024-04-05 09:09:35 +00:00
onur-ozkan
199589d814 handle rustc args properly in bootstrap
Because `RUSTFLAGS` gets overwritten during the conversion from `Cargo` to `Command`,
the passed rustc args were being lost. This change combines the rustc args with the values
that override `RUSTFLAGS`.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-05 11:45:31 +03:00
bors
3d7e88148a Auto merge of #123484 - jhpratt:rollup-usz4e64, r=jhpratt
Rollup of 9 pull requests

Successful merges:

 - #123206 (Require Pointee::Metadata to be Freeze)
 - #123363 (change `NormalizesTo` to fully structurally normalize)
 - #123407 (Default to light theme if JS is enabled but not working)
 - #123417 (Add Description for cargo in rustdoc documentation)
 - #123437 (Manually run `clang-format` on `CoverageMappingWrapper.cpp`)
 - #123454 (hir: Use `ItemLocalId::ZERO` in a couple more places)
 - #123464 (Cleanup: Rename `HAS_PROJECTIONS` to `HAS_ALIASES` etc.)
 - #123477 (do not ICE in `fn forced_ambiguity` if we get an error)
 - #123478 (CFI: Add test for `call_once` addr taken)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-05 02:32:03 +00:00
Jacob Pratt
50603cbb6d
Rollup merge of #123417 - harryhanYuhao:master, r=GuillaumeGomez
Add Description for cargo in rustdoc documentation

As most people use cargo now, I prioritised the description for cargo in rustdoc documentation.

I also added how to open the generated doc with cargo.

Btw, may I ask how to use `./x tidy`? It says `warning: `tidy` is not installed;`
2024-04-04 21:16:56 -04:00
Jacob Pratt
ac298726af
Rollup merge of #123407 - GuillaumeGomez:js-failed-theme, r=notriddle
Default to light theme if JS is enabled but not working

It doesn't [fix] #123399 but it allows to reduce the problem:

* if JS is completely disabled, then `noscript.css` will be applied
* if JS failed for any reason, then the light theme will be applied (because `noscript.css` won't be applied)

r? `@notriddle`
2024-04-04 21:16:56 -04:00
bors
9cbaa01599 Auto merge of #123465 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`
2024-04-05 00:30:47 +00:00
Michael Goulet
55e46612c1 Force move async-closures that are FnOnce to make their inner coroutines also move 2024-04-04 19:44:51 -04:00
Michael Goulet
3d9d5d7c96 Actually use the inferred ClosureKind from signature inference in coroutine-closures 2024-04-04 19:44:35 -04:00
y21
5d66521dfe use Lrc instead of the aliased type Arc directly 2024-04-05 00:17:27 +02:00
Guillaume Gomez
f2ff9c9035 Update browser-ui-test version to 0.17.1 2024-04-04 23:48:35 +02:00
许杰友 Jieyou Xu (Joe)
476156aedf
Port issue-7349 to a codegen test 2024-04-04 21:59:08 +01:00
belovdv
af81ab7628 remove miri jobserver workaround 2024-04-04 22:40:00 +03:00
Philipp Krones
eedf15a1dc
Merge commit '9725c4a162502a02c1c67fdca6b797fe09b2b73c' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
bors
a4b11c8e60 Auto merge of #121394 - oli-obk:define_opaque_types, r=compiler-errors
some smaller DefiningOpaqueTypes::No -> Yes switches

r? `@compiler-errors`

These are some easy cases, so let's get them out of the way first.
I added tests exercising the specialization code paths that I believe weren't tested so far.

follow-up to https://github.com/rust-lang/rust/pull/117348
2024-04-04 17:42:07 +00:00
Harry Han
612acf8397 rustdoc prioritise cargo doc: suggestions applied 2024-04-04 15:04:46 +01:00
Matthias Krüger
0b54db7e3f
Rollup merge of #122448 - high-cloud:move-hir-tree, r=oli-obk
Port hir-tree run-make test to ui test

As part of #121876

cc `@jieyouxu`
2024-04-04 14:51:15 +02:00
Yaodong Yang
2575b8e79c move hir-tree test from run-make to ui test 2024-04-04 18:43:26 +08:00
Oli Scherer
150448d2e0 use DefineOpaqueTypes::Yes in rustdoc
Since we have a `DefiningAnchor::Error`, we will reject registering hidden types already
2024-04-04 10:01:45 +00:00
Ralf Jung
c2e4916cf8 adjust frame_in_std to recognize std tests 2024-04-04 09:23:02 +02:00
Ralf Jung
9e35555474 smoke-test 'x.py test --miri' on CI 2024-04-04 09:23:02 +02:00
Ralf Jung
ecc714d88e fix parsing the test harness JSON when time could not be measured 2024-04-04 09:23:02 +02:00
bors
43f4f2a3b1 Auto merge of #119820 - lcnr:leak-check-2, r=jackh726
instantiate higher ranked goals outside of candidate selection

This PR modifies `evaluate` to more eagerly instantiate higher-ranked goals, preventing the `leak_check` during candidate selection from detecting placeholder errors involving that binder.

For a general background regarding higher-ranked region solving and the leak check, see https://hackmd.io/qd9Wp03cQVy06yOLnro2Kg.

> The first is something called the **leak check**. You can think of it as a "quick and dirty" approximation for the region check, which will come later. The leak check detects some kinds of errors early, essentially deciding between "this set of outlives constraints are guaranteed to result in an error eventually" or "this set of outlives constraints may be solvable".

## The ideal future

We would like to end up with the following idealized design to handle universal binders:
```rust
fn enter_forall<'tcx, T, R>(
    forall: Binder<'tcx, T>,
    f: impl FnOnce(T) -> R,
) -> R {
    let new_universe = infcx.increment_universe_index();
    let value = instantiate_binder_with_placeholders_in(new_universe, forall);

    let result = f(value);

    eagerly_handle_higher_ranked_region_constraints_in(new_universe);
    infcx.decrement_universe_index();

    assert!(!result.has_placeholders_in_or_above(new_universe));
    result
}
```

That is, when universally instantiating a binder, anything using the placeholders has to happen inside of a limited scope (the closure `f`). After this closure has completed, all constraints involving placeholders are known.

We then handle any *external constraints* which name these placeholders. We destructure `TypeOutlives` constraints involving placeholders and eagerly handle any region constraints involving these placeholders. We do not return anything mentioning the placeholders created inside of this function to the caller.

Being able to eagerly handle *all* region constraints involving placeholders will be difficult due to complex `TypeOutlives` constraints, involving inference variables or alias types, and higher ranked implied bounds. The exact issues and possible solutions are out of scope of this FCP.

#### How does the leak check fit into this

The `leak_check` is an underapproximation of `eagerly_handle_higher_ranked_region_constraints_in`. It detects some kinds of errors involving placeholders from `new_universe`, but not all of them.

It only looks at region outlives constraints, ignoring `TypeOutlives`, and checks whether one of the following two conditions are met for **placeholders in or above `new_universe`**, in which case it results in an error:
- `'!p1: '!p2` a placeholder `'!p2` outlives a different placeholder `'!p1`
- `'!p1: '?2` an inference variable `'?2` outlives a placeholder `'!p1` *which it cannot name*

It does not handle all higher ranked region constraints, so we still return constraints involving placeholders from `new_universe` which are then (re)checked by `lexical_region_resolve` or MIR borrowck.

As we check higher ranked constraints in the full regionck anyways, the `leak_check` is not soundness critical. It's current only purpose is to move some higher ranked region errors earlier, enabling it to guide type inference and trait solving. Adding additional uses of the `leak_check` in the future would only strengthen inference and is therefore not breaking.

## Where do we use currently use the leak check

The `leak_check` is currently used in two places:

Coherence does not use a proper regionck, only relying on the `leak_check` called [at the end of the implicit negative overlap check](8b94152af6/compiler/rustc_trait_selection/src/traits/coherence.rs (L235-L238)). During coherence all parameters are instantiated with inference variables, so the only possible region errors are higher-ranked. We currently also sometimes make guesses when destructuring `TypeOutlives` constraints which can theoretically result in incorrect errors. This could result in overlapping impls.

We also use the `leak_check` [at the end of `fn evaluation_probe`](8b94152af6/compiler/rustc_trait_selection/src/traits/select/mod.rs (L607-L610)). This function is used during candidate assembly for `Trait` goals. Most notably we use [inside of `evaluate_candidate` during winnowing](0e4243538b/compiler/rustc_trait_selection/src/traits/select/mod.rs (L491-L502)). Conceptionally, it is as if we compute each candidate in a separate `enter_forall`.

## The current use in `fn evaluation_probe` is undesirable

Because we only instantiate a higher-ranked goal once inside of `fn evaluation_probe`, errors involving placeholders from that binder can impact selection. This results in inconsistent behavior ([playground](
*[playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=dac60ebdd517201788899ffa77364831)*)):

```rust
trait Leak<'a> {}
impl Leak<'_>      for Box<u32> {}
impl Leak<'static> for Box<u16> {}

fn impls_leak<T: for<'a> Leak<'a>>() {}

trait IndirectLeak<'a> {}
impl<'a, T: Leak<'a>> IndirectLeak<'a> for T {}
fn impls_indirect_leak<T: for<'a> IndirectLeak<'a>>() {}

fn main() {
    // ok
    //
    // The `Box<u16>` impls fails the leak check,
    // meaning that we apply the `Box<u32>` impl.
    impls_leak::<Box<_>>();

    // error: type annotations needed
    //
    // While the `Box<u16>` impl would fail the leak check
    // we have already instantiated the binder while applying
    // the generic `IndirectLeak` impl, so during candidate
    // selection of `Leak` we do not detect the placeholder error.
    // Evaluation of `Box<_>: Leak<'!a>` is therefore ambiguous,
    // resulting in `for<'a> Box<_>: Leak<'a>` also being ambiguous.
    impls_indirect_leak::<Box<_>>();
}
```

We generally prefer `where`-bounds over implementations during candidate selection, both for [trait goals](11f32b73e0/compiler/rustc_trait_selection/src/traits/select/mod.rs (L1863-L1887)) and during [normalization](11f32b73e0/compiler/rustc_trait_selection/src/traits/project.rs (L184-L198)). However, we currently **do not** use the `leak_check` during candidate assembly in normalizing. This can result in inconsistent behavior:
```rust
trait Trait<'a> {
    type Assoc;
}
impl<'a, T> Trait<'a> for T {
    type Assoc = usize;
}

fn trait_bound<T: for<'a> Trait<'a>>() {}
fn projection_bound<T: for<'a> Trait<'a, Assoc = usize>>() {}

// A function with a trivial where-bound which is more
// restrictive than the impl.
fn function<T: Trait<'static, Assoc = usize>>() {
    // ok
    //
    // Proving `for<'a> T: Trait<'a>` using the where-bound results
    // in a leak check failure, so we use the more general impl,
    // causing this to succeed.
    trait_bound::<T>();

    // error
    //
    // Proving the `Projection` goal `for<'a> T: Trait<'a, Assoc = usize>`
    // does not use the leak check when trying the where-bound, causing us
    // to prefer it over the impl, resulting in a placeholder error.
    projection_bound::<T>();

    // error
    //
    // Trying to normalize the type `for<'a> fn(<T as Trait<'a>>::Assoc)`
    // only gets to `<T as Trait<'a>>::Assoc` once `'a` has been already
    // instantiated, causing us to prefer the where-bound over the impl
    // resulting in a placeholder error. Even if were were to also use the
    // leak check during candidate selection for normalization, this
    // case would still not compile.
    let _higher_ranked_norm: for<'a> fn(<T as Trait<'a>>::Assoc) = |_| ();
}
```

This is also likely to be more performant. It enables more caching in the new trait solver by simply [recursively calling the canonical query][new solver] after instantiating the higher-ranked goal.

It is also unclear how to add the leak check to normalization in the new solver. To handle https://github.com/rust-lang/trait-system-refactor-initiative/issues/1 `Projection` goals are implemented via `AliasRelate`. This again means that we instantiate the binder before ever normalizing any alias. Even if we were to avoid this, we lose the ability to [cache normalization by itself, ignoring the expected `term`](5bd5d214ef/compiler/rustc_trait_selection/src/solve/normalizes_to/mod.rs (L34-L49)). We cannot replace the `term` with an inference variable before instantiating the binder, as otherwise `for<'a> T: Trait<Assoc<'a> = &'a ()>` breaks. If we only replace the term after instantiating the binder, we cannot easily evaluate the goal in a separate context, as [we'd then lose the information necessary for the leak check](11f32b73e0/compiler/rustc_next_trait_solver/src/canonicalizer.rs (L230-L232)). Adding this information to the canonical input also seems non-trivial.

## Proposed solution

I propose to instantiate the binder outside of candidate assembly, causing placeholders from higher-ranked goals to get ignored while selecting their candidate. This mostly[^1] matches the [current behavior of the new solver][new solver]. The impact of this change is therefore as follows:

```rust
trait Leak<'a> {}
impl Leak<'_>      for Box<u32> {}
impl Leak<'static> for Box<u16> {}

fn impls_leak<T: for<'a> Leak<'a>>() {}

trait IndirectLeak<'a> {}
impl<'a, T: Leak<'a>> IndirectLeak<'a> for T {}
fn impls_indirect_leak<T: for<'a> IndirectLeak<'a>>() {}

fn guide_selection() {
    // ok -> ambiguous
    impls_leak::<Box<_>>();

    // ambiguous
    impls_indirect_leak::<Box<_>>();
}

trait Trait<'a> {
    type Assoc;
}
impl<'a, T> Trait<'a> for T {
    type Assoc = usize;
}

fn trait_bound<T: for<'a> Trait<'a>>() {}
fn projection_bound<T: for<'a> Trait<'a, Assoc = usize>>() {}

// A function which a trivial where-bound which is more
// restrictive than the impl.
fn function<T: Trait<'static, Assoc = usize>>() {
    // ok -> error
    trait_bound::<T>();

    // error
    projection_bound::<T>();

    // error
    let _higher_ranked_norm: for<'a> fn(<T as Trait<'a>>::Assoc) = |_| ();
}
```

This does not change the behavior if candidates have higher ranked nested goals, as in this case the `leak_check` causes the nested goal to result in an error ([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=a74c25300b23db9022226de99d8a2fa6)):
```rust
trait LeakCheckFailure<'a> {}
impl LeakCheckFailure<'static> for () {}

trait Trait<T> {}
impl Trait<u32> for () where for<'a> (): LeakCheckFailure<'a> {}
impl Trait<u16> for () {}
fn impls_trait<T: Trait<U>, U>() {}
fn main() {
    // ok
    //
    // It does not matter whether candidate assembly
    // considers the placeholders from higher-ranked goal.
    //
    // Either `for<'a> (): LeakCheckFailure<'a>` has no
    // applicable candidate or it has a single applicable candidate
    // when then later results in an error. This allows us to
    // infer `U` to `u16`.
    impls_trait::<(), _>()
}
```

## Impact on existing crates

This is a **breaking change**. [A crater run](https://github.com/rust-lang/rust/pull/119820#issuecomment-1926862174) found 17 regressed crates with 7 root causes.

For a full analysis of all affected crates, see https://gist.github.com/lcnr/7c1c652f30567048ea240554a36ed95c.

---

I believe this breakage to be acceptable and would merge this change. I am confident that the new position of the leak check matches our idealized future and cannot envision any other consistent alternative. Where possible, I intend to open PRs fixing/avoiding the regressions before landing this PR.

I originally intended to remove the `coherence_leak_check` lint in the same PR. However, while I am confident in the *position* of the leak check, deciding on its exact behavior is left as future work, cc #112999. This PR therefore only moves the leak check while keeping the lint when relying on it in coherence.

[new solver]: https://github.com/rust-lang/rust/blob/master/compiler/rustc_trait_selection/src/solve/eval_ctxt/mod.rs#L479-L484

[^1]: the new solver has a separate cause of inconsistent behavior rn https://github.com/rust-lang/trait-system-refactor-initiative/issues/53#issuecomment-1914310171

r? `@nikomatsakis`
2024-04-04 04:36:12 +00:00
Boxy
f090de8875 rebase oddity 2024-04-03 22:48:55 +01:00
Matthias Krüger
65398c46b8
Rollup merge of #123421 - taiki-e:netbsd-doc, r=Nilstrieb
Fix target name in NetBSD platform-support doc

NetBSD platform-support doc currently mentions `amd64-unknown-netbsd`, but it is not a valid target name (the correct name is `x86_64-unknown-netbsd`).

ceab6128fa/src/doc/rustc/src/platform-support/netbsd.md (L16)

```console
$ rustc --print target-list | grep netbsd
aarch64-unknown-netbsd
aarch64_be-unknown-netbsd
armv6-unknown-netbsd-eabihf
armv7-unknown-netbsd-eabihf
i586-unknown-netbsd
i686-unknown-netbsd
mipsel-unknown-netbsd
powerpc-unknown-netbsd
riscv64gc-unknown-netbsd
sparc64-unknown-netbsd
x86_64-unknown-netbsd
```
2024-04-03 22:11:02 +02:00
Matthias Krüger
0c8c18fcc6
Rollup merge of #123291 - c410-f3r:testsssssss, r=petrochenkov
Move some tests

r? `@petrochenkov`
2024-04-03 22:11:01 +02:00
Matthias Krüger
80d592cc24
Rollup merge of #122964 - joboet:pointer_expose, r=Amanieu
Rename `expose_addr` to `expose_provenance`

`expose_addr` is a bad name, an address is just a number and cannot be exposed. The operation is actually about the provenance of the pointer.

This PR thus changes the name of the method to `expose_provenance` without changing its return type. There is sufficient precedence for returning a useful value from an operation that does something else without the name indicating such, e.g. [`Option::insert`](https://doc.rust-lang.org/nightly/std/option/enum.Option.html#method.insert) and [`MaybeUninit::write`](https://doc.rust-lang.org/nightly/std/mem/union.MaybeUninit.html#method.write).

Returning the address is merely convenient, not a fundamental part of the operation. This is implied by the fact that integers do not have provenance since
```rust
let addr = ptr.addr();
ptr.expose_provenance();
let new = ptr::with_exposed_provenance(addr);
```
must behave exactly like
```rust
let addr = ptr.expose_provenance();
let new = ptr::with_exposed_provenance(addr);
```
as the result of `ptr.expose_provenance()` and `ptr.addr()` is the same integer. Therefore, this PR removes the `#[must_use]` annotation on the function and updates the documentation to reflect the important part.

~~An alternative name would be `expose_provenance`. I'm not at all opposed to that, but it makes a stronger implication than we might want that the provenance of the pointer returned by `ptr::with_exposed_provenance`[^1] is the same as that what was exposed, which is not yet specified as such IIUC. IMHO `expose` does not make that connection.~~

A previous version of this PR suggested `expose` as name, libs-api [decided on](https://github.com/rust-lang/rust/pull/122964#issuecomment-2033194319) `expose_provenance` to keep the symmetry with `with_exposed_provenance`.

CC `@RalfJung`
r? libs-api

[^1]: I'm using the new name for `from_exposed_addr` suggested by #122935 here.
2024-04-03 22:11:00 +02:00
Ralf Jung
a6803b9de4 add 'x.py miri', and make it work for 'library/{core,alloc,std}' 2024-04-03 20:27:20 +02:00
Taiki Endo
6edb021fd3 Fix target name in NetBSD platform-support doc 2024-04-04 01:31:04 +09:00
Matthias Krüger
658c8f7367
Rollup merge of #123412 - Kobzol:ci-artifacts-in-summary, r=Mark-Simulacrum
Output URLs of CI artifacts to GitHub summary

I often want to download CI artifacts published from our workflows (I suspect others might do the same), but it's a bit annoying to extract their links from the CI logs currently. This PR also outputs URLs to them to the GitHub Actions summaries.

r? `@Mark-Simulacrum`
2024-04-03 17:15:50 +02:00
Matthias Krüger
29c72ce183
Rollup merge of #123386 - Rajveer100:branch-for-issue-123227, r=onur-ozkan
Set `CARGO` instead of `PATH` for Rust Clippy

Resolves #123227

Previously, clippy was using `cargo` from `PATH`, but since [PR](https://github.com/rust-lang/rust-clippy/pull/11944), it now prioritises checking `CARGO` first.
2024-04-03 17:15:49 +02:00
Matthias Krüger
f7c34c03be
Rollup merge of #123342 - RalfJung:noskip, r=onur-ozkan
x.py test: remove no-op --skip flag

None of the test commands seems to do anything with this flag, so we might as well remove it.
2024-04-03 17:15:48 +02:00
Matthias Krüger
1bde86b18b
Rollup merge of #123209 - ObsidianMinor:doc/external-clangrt, r=michaelwoerister
Add section to sanitizer doc for `-Zexternal-clangrt`

After spending a week looking for answers to how to do the very thing this flag lets me do, it felt appropriate to document it where I would've expected it to be.
2024-04-03 17:15:47 +02:00
joboet
989660c3e6
rename expose_addr to expose_provenance 2024-04-03 16:00:38 +02:00
Jakub Beránek
508530dbc5 Output URLs of CI artifacts to GitHub summary 2024-04-03 15:33:40 +02:00
Guillaume Gomez
2815edc671 Update rustdoc_css_themes.rs to take into account new selectors 2024-04-03 14:27:20 +02:00
Guillaume Gomez
2edc54c830 Default to light theme is JS is enabled but not working 2024-04-03 14:27:19 +02:00
Rajveer
66dee4a9aa Set CARGO instead of PATH for Rust Clippy
Resolves #123227
2024-04-03 17:17:40 +05:30
Jubilee
f700fb24f3
Rollup merge of #123349 - compiler-errors:async-closure-captures, r=oli-obk
Fix capture analysis for by-move closure bodies

The check we were doing to figure out if a coroutine was borrowing from its parent coroutine-closure was flat-out wrong -- a misunderstanding of mine of the way that `tcx.closure_captures` represents its captures.

Fixes #123251 (the miri/ui test I added should more than cover that issue)

r? `@oli-obk` -- I recognize that this PR may be underdocumented, so please ask me what I should explain further.
2024-04-02 23:44:29 -07:00
bors
8938f887d3 Auto merge of #123398 - weihanglo:update-cargo, r=weihanglo
Update cargo

8 commits in a59aba136aab5510c16b0750a36cbd9916f91796..0637083df5bbdcc951845f0d2eff6999cdb6d30a
2024-03-28 21:21:41 +0000 to 2024-04-02 23:55:05 +0000
- chore(deps): update compatible (rust-lang/cargo#13674)
- Maintain sorting of dependency features (rust-lang/cargo#13682)
- Update `der` crate (rust-lang/cargo#13692)
- fix: bash completion fallback in `nounset` mode (rust-lang/cargo#13686)
- CI: Update macos images to macos-13 (rust-lang/cargo#13685)
- chore(deps): update rust crate opener to 0.7.0 (rust-lang/cargo#13679)
- Remove useless parameters (rust-lang/cargo#13678)
- chore(deps): update rust crate supports-unicode to v3 (rust-lang/cargo#13680)

r? ghost
2024-04-03 04:14:41 +00:00
Weihang Lo
c6348a9768
Update cargo 2024-04-02 21:38:06 -04:00
Aaron Loyd
382459e047 Add section to sanitizer doc for -Zexternal-clangrt
After spending a week looking for answers to how to do the very thing
this flag lets me do, it felt appropriate to document it where I would've
expected it to be.
2024-04-02 19:51:20 -05:00
Jacob Pratt
f756095571
Rollup merge of #123380 - Nilstrieb:bomments, r=clubby789
Improve bootstrap comments

Rewrote a comment I found hard to understand, added some more.
2024-04-02 20:37:41 -04:00