Commit Graph

238657 Commits

Author SHA1 Message Date
Mark Rousskov
be67b7bdc7 Bump nightly version 2023-11-11 11:29:33 -05:00
Ralf Jung
86e5d36c19 Miri: use new init_logger function, avoid calling env::set_var 2023-11-11 15:24:33 +01:00
Ralf Jung
581a317bbb rustc_log: provide a way to init logging based on the values, not names, of the env vars 2023-11-11 15:24:33 +01:00
bors
1db4b12494 Auto merge of #117797 - weihanglo:update-cargo, r=weihanglo
Update cargo

12 commits in 7046d992f9f32ba209a8079f662ebccf9da8de25..6790a5127895debec95c24aefaeb18e059270df3
2023-11-08 03:24:57 +0000 to 2023-11-10 17:09:35 +0000
- refactor(source): Prepare for new PackageIDSpec syntax (rust-lang/cargo#12938)
- credential: include license files in all published crates (rust-lang/cargo#12953)
- fix: preserve jobserver file descriptors on rustc invocation in `fix_exec_rustc` (rust-lang/cargo#12951)
- refactor(resolver): Consolidate logic in `VersionPreferences` (rust-lang/cargo#12930)
- refactor(toml): Simplify code to make schema split easier (rust-lang/cargo#12948)
- Filter `cargo-credential-*` dependencies by OS (rust-lang/cargo#12949)
- refactor(util): Pull out `mod util_semver` (rust-lang/cargo#12940)
- Fix the invalidate feature name message (rust-lang/cargo#12939)
- refactor(util): Prepare for splitting out semver logic (rust-lang/cargo#12926)
- feat: Make browser links out of HTML file paths (rust-lang/cargo#12889)
- Do not allow empty feature name (rust-lang/cargo#12928)
- fix(timings): unnecessary backslash when error happens (rust-lang/cargo#12934)

r? ghost
2023-11-11 02:01:04 +00:00
Tomasz Miąsko
d7d2e761e0 Remove incorrect transformation from RemoveZsts
Partial removal of storage statements for a local is incorrect, so a
decision to optimize cannot be make independently for each statement.

Avoid the issue by performing the transformation completely or not at
all.
2023-11-11 01:51:09 +01:00
Kirby Linvill
ae1726bfce
Ignore FieldIdx and VariantIdx examples in docs 2023-11-10 17:18:59 -07:00
bors
6f308b8713 Auto merge of #117799 - erickt:fuchsia, r=tmandry
Switch `fuchsia-test-runner.py` to `ffx product`

The subcommand `ffx product-bundle` has been removed, and replaced with the subcommand `ffx product`. This changes `fuchsia-test-runner.py` to use it to download the SDK and product bundle for the latest release of Fuchsia.
2023-11-11 00:03:52 +00:00
Erick Tryzelaar
d7fd2dec7c Switch fuchsia-test-runner.py to ffx product
The subcommand `ffx product-bundle` has been removed, and replaced with
the subcommand `ffx product`. This changes `fuchsia-test-runner.py` to
use it to download the SDK and product bundle for the latest release of
Fuchsia.
2023-11-10 23:57:07 +00:00
Weihang Lo
8a2bee415c
Update cargo 2023-11-10 18:18:37 -05:00
bors
edf0b1db0a Auto merge of #115229 - iSwapna:issue-115222-fix, r=estebank
On method chain expression failure, look for missing method in earlier segments of the chain

This PR tries to fix the issue: https://github.com/rust-lang/rust/issues/115222

As suggested by `@estebank` , I did the following:
1. Add new test `tests/ui/structs/method-chain-expression-failure.rs`
2. In `compiler/rusct_hir_tycheck/src/method/suggest.rs`
   walking up the method chain and calling `probe_for_name` with the method name. But the call fails to return `Ok`.
2023-11-10 21:10:30 +00:00
Swapna Iyer
56a109d15b Recurse over the method chain and maintain a stack to peek at previous receiver to align spans 2023-11-10 13:00:27 -08:00
sjwang05
a49368f00b
Correctly handle while-let-chains 2023-11-10 12:13:53 -08:00
Kirby Linvill
d517a1cbda
Add SMIR visitor for Places and projections 2023-11-10 11:25:58 -07:00
Laurențiu Nicola
01422d1704 Allow rustc_private for RustAnalyzer 2023-11-10 16:35:56 +02:00
Oğuz Ağcayazı
6812f64c35 add CoroutineWitness to covered types 2023-11-10 17:02:08 +03:00
Laurențiu Nicola
89a3fd4992 Drop anymap license exception 2023-11-10 15:09:52 +02:00
bors
d4c86cfc49 Auto merge of #117779 - bjorn3:sync_cg_clif-2023-11-10, r=bjorn3
Subtree update for rustc_codegen_cranelift

Significantly improved support for simd intrinsics.

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler
2023-11-10 12:21:39 +00:00
bjorn3
d186b49460 Merge commit 'c84d1871dc4456539b7b578830268ab3539915d0' into sync_cg_clif-2023-11-10 2023-11-10 11:30:51 +00:00
bjorn3
c84d1871dc Rustup to rustc 1.75.0-nightly (0f44eb32f 2023-11-09) 2023-11-10 11:27:03 +00:00
bjorn3
6e7961ac5d Sync from rust 0f44eb32f1 2023-11-10 11:10:26 +00:00
bors
3d0e99d632 Auto merge of #117765 - onur-ozkan:fix-117762, r=clubby789
enable unstable feature on `x clean [PATH]`

Since https://github.com/rust-lang/rust/pull/111076 enables unstable cargo feature (`public-dependency`), we need to ensure that unstable features are enabled before reading libstd Cargo.toml.

Fixes #117762

cc `@Nilstrieb`
2023-11-10 10:05:28 +00:00
bors
17d0a45f5d Auto merge of #117572 - RalfJung:addr_of, r=cuviper
update and clarify addr_of docs

This updates the docs to match https://github.com/rust-lang/reference/pull/1387. Cc `@rust-lang/opsem`

`@chorman0773` not sure if you had anything else you wanted to say here, I'd be happy to get your feedback. :)

Fixes https://github.com/rust-lang/rust/issues/114902, so Cc `@joshlf`
2023-11-10 08:04:47 +00:00
bors
fe0b970992 Auto merge of #3155 - RalfJung:data-race-docs, r=RalfJung
data_race: link to docs for 'unusual' race conditions
2023-11-10 07:32:43 +00:00
Ralf Jung
be09a1065a data_race: link to docs for 'unusual' race conditions 2023-11-10 08:30:19 +01:00
Ralf Jung
e30f8ae867
mention null explicitly
Co-authored-by: Josh Stone <cuviper@gmail.com>
2023-11-10 07:34:28 +01:00
bors
0a1e5598b0 Auto merge of #117750 - klensy:icu-followup, r=Nilstrieb
bump few ICU4X leftover deps

implements https://github.com/rust-lang/rust/pull/117632#issuecomment-1795027801 suggestion

There no strict version dependencies between some crates, so yoke was 0.7.2, but yoke-derive left with 0.7.1, same with zerofrom, zerofrom-derive, zerovec, zerovec-derive; drops synstructure 0.12* dependency, less syn 1.* users left.
2023-11-10 06:06:08 +00:00
sjwang05
9455259450
Catch an edge case 2023-11-09 20:07:17 -08:00
Kirby Linvill
998aa383ba
Defer Place ty implementation in Stable Mir to later PR 2023-11-09 20:56:40 -07:00
Kirby Linvill
2e70d95cdb
Remove rich UserTypeProjection projections in SMIR
It's not clear to me (klinvill) that UserTypeProjections are produced
anymore with the removal of type ascriptions as per
https://github.com/rust-lang/rfcs/pull/3307. Furthermore, it's not clear
to me which variants of ProjectionElem could appear in such projections.
For these reasons, I'm reverting projections in UserTypeProjections to
simple strings until I can get more clarity on UserTypeProjections.
2023-11-09 20:56:40 -07:00
Kirby Linvill
30d6733eb3
Replace match assertions against empty slices with is_empty assertions
Asserting is_empty is slightly more concise.
2023-11-09 20:56:39 -07:00
Kirby Linvill
98228e67bc
Move SMIR projections tests to new file 2023-11-09 20:56:39 -07:00
Kirby Linvill
b1585983cc
Add stable MIR Projections support based on MIR structure
This commit includes richer projections for both Places and
UserTypeProjections. However, the tests only touch on Places. There are
also outstanding TODOs regarding how projections should be resolved to
produce Place types, and regarding if UserTypeProjections should just
contain ProjectionElem<(),()> objects as in MIR.
2023-11-09 20:56:35 -07:00
Nicholas Nethercote
2e40d11f8c Remove -Zkeep-hygiene-data.
It was added way back in #28585 under the name `-Zkeep-mtwt-tables`. The
justification was:

> This is so that the resolution results can be used after analysis,
> potentially for tool support.

There are no uses of significance in the code base, and various Google
searches for both option names (and variants) found nothing of interest.

@petrochenkov says removing this part (and it's only part) of the
hygiene data is dubious. It doesn't seem that big, so let's just keep it
around.
2023-11-10 14:00:08 +11:00
sjwang05
0094238157
Catch stray { in let-chains 2023-11-09 18:47:49 -08:00
bors
d42d73b144 Auto merge of #117769 - matthiaskrgr:rollup-4efjlg3, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #114191 (Update exploit mitigations documentation)
 - #117039 (Clarify UB in `get_unchecked(_mut)`)
 - #117730 (Closure-consuming helper functions for `fmt::Debug` helpers)
 - #117741 (Fix typo in internal.rs)
 - #117743 (Suggest removing `;` for `;` within let-chains)
 - #117751 (rustdoc-json: Fix test so it actually checks things)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-11-10 02:18:27 +00:00
Matthias Krüger
186a3c8c61
Rollup merge of #117751 - aDotInTheVoid:unkind, r=GuillaumeGomez
rustdoc-json: Fix test so it actually checks things

After #111427, no item has a `kind` field, so these assertions could never fail. Instead, assert that those two items arn't present.

r? `@GuillaumeGomez`
2023-11-10 01:50:26 +01:00
Matthias Krüger
7607597d3a
Rollup merge of #117743 - sjwang05:issue-117720, r=estebank
Suggest removing `;` for `;` within let-chains

Fixes #117720
2023-11-10 01:50:25 +01:00
Matthias Krüger
7fd7719ca1
Rollup merge of #117741 - eltociear:patch-23, r=compiler-errors
Fix typo in internal.rs

covert -> convert
2023-11-10 01:50:25 +01:00
Matthias Krüger
0f1da7e682
Rollup merge of #117730 - jmillikin:fmt-debug-helper-fns, r=cuviper
Closure-consuming helper functions for `fmt::Debug` helpers

ACP: https://github.com/rust-lang/libs-team/issues/288

Tracking issue: https://github.com/rust-lang/rust/issues/117729
2023-11-10 01:50:24 +01:00
Matthias Krüger
7096ec3e00
Rollup merge of #117039 - scottmcm:clarify-get-unchecked, r=cuviper
Clarify UB in `get_unchecked(_mut)`

Inspired by #116915, it was unclear to me what exactly "out-of-bounds index" means in `get_unchecked`.

One could [potentially](https://rust.godbolt.org/z/hxM764orW) interpret it that `get_unchecked` is just another way to write `offset`, but I think `get_unchecked(len)` is supposed to be UB even though `.offet(len)` is well-defined (as is `.get_unchecked(..len)`), so write that more directly in the docs.

**libs-api folks**: Can you confirm whether this is what you expect this to mean?  And is the situation any different for `<*const [T]>::get_unchecked`?
2023-11-10 01:50:24 +01:00
Matthias Krüger
9dc022dd80
Rollup merge of #114191 - rcvalle:rust-exploit-mitigations, r=cuviper
Update exploit mitigations documentation

Updates the rustc book with most up to date information about exploit mitigations supported by the Rust compiler.
2023-11-10 01:50:23 +01:00
Nicholas Nethercote
dd6bab9eff Factor out some duplicated code. 2023-11-10 10:54:26 +11:00
Nicholas Nethercote
316ffba3c8 Update instructions in a comment.
And avoid duplication.
2023-11-10 10:54:26 +11:00
Nicholas Nethercote
b35e576657 Minor cleanups.
- Reduce some function exposure.
- Fix some comment formatting.
2023-11-10 10:54:26 +11:00
Nicholas Nethercote
49908b4d90 Simplify the current_rustc_version macro.
It currently has the syntax
`current_rustc_version!(env!("CFG_RELEASE"))` where the
`env!("CFG_RELEASE")` part looks like a normal expression but it is
actually parsed and processed by the `current_rustc_version` macro.

The documented rationale for this is that you'll find it if you grep for
`env!("CFG_RELEASE")`. But I think that's of very little use -- I would
personally grep for just "CFG_RELEASE" -- and it complicates the macro,
requiring the use of `syn`.

This commit simplifies the macro.
2023-11-10 10:54:21 +11:00
John Millikin
82a9f94de5 Closure-consuming helper functions for fmt::Debug helpers 2023-11-10 07:50:11 +09:00
bors
0f44eb32f1 Auto merge of #117727 - saethlin:inline-derived-fmt, r=nnethercote
Emit #[inline] on derive(Debug)

While working on https://github.com/rust-lang/rust/pull/116583 I noticed that the `cross_crate_inlinable` query identifies a lot of derived `Debug` impls as a MIR body that's little more than a call, which suggests they may be a good candidate for `#[inline]`. So here I've implemented that change specifically.

It seems to provide a nice improvement to build times.
2023-11-09 21:34:14 +00:00
onur-ozkan
fdb72795d1 enable unstable feature on x clean [PATH]
Since https://github.com/rust-lang/rust/pull/111076 enables
unstable cargo feature (`public-dependency`), we need to ensure
that unstable features are enabled before reading libstd Cargo.toml.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-09 23:04:51 +03:00
bors
eae4135939 Auto merge of #117708 - onur-ozkan:x-setup, r=clubby789
check config file before prompts on `x setup`

First 2 commit moves the check of configuration existence to the first step of `x setup`. And then followed by a prompt that allows devs to decide whether to continue with the configuration override or exit bootstrap.

Closes #110471

I can revert the last commit if needed. Maybe it's just me, but I feel it's better to have those tags capitalized. If you think otherwise, please let me know so that I can revert.
2023-11-09 19:16:59 +00:00
bors
4c8862b263 Auto merge of #117122 - ferrocene:pa-configure-git-diff, r=albertlarsan68
Allow configuring the parent GitHub repository

The git integration in build_helper hardcoded `rust-lang/rust` as the parent GitHub repository, and `master` as the branch name. This works great for `rust-lang/rust`, but causes problems in downstream forks like Ferrocene whenever those functions are invoked (like `./x fmt`).

In `src/stage0.json` there was already a configuration key for the name of the nightly branch, but it wasn't used by build_helper. This PR adds the `github_repository` key to the file, and requires both values to be passed to build_helper whenever a git function is called. This will allow downstream forks to tweak the values.
2023-11-09 16:49:28 +00:00