Commit Graph

238666 Commits

Author SHA1 Message Date
bors
a04d56b36d Auto merge of #117817 - fmease:deny-more-tilde-const, r=fee1-dead
Deny more `~const` trait bounds

thereby fixing a family of ICEs (delayed bugs) for `feature(const_trait_impl, effects)` code.

As discussed
r? `@fee1-dead`
2023-11-12 04:40:44 +00:00
Paul Menage
2e6b57541d Add -Z llvm_module_flag
Allow adding values to the `!llvm.module.flags` metadata for a generated
module.  The syntax is

`-Z llvm_module_flag=<name>:<type>:<value>:<behavior>`

Currently only u32 values are supported but the type is required to be
specified for forward compatibility.  The `behavior` element must match
one of the named LLVM metadata behaviors.viors.

This flag is expected to be perma-unstable.
2023-11-11 19:48:47 -08:00
León Orell Valerian Liehr
8ce5d784a6
Deny more ~const trait bounds 2023-11-12 00:00:12 +01:00
James Dietz
3f0908f47c round to even 2023-11-11 17:22:07 -05:00
James Dietz
e81964e6f9 fix rounding issue with exponents in fmt 2023-11-11 16:40:22 -05:00
sjwang05
f88cf0206f
Move unclosed delim errors to separate function 2023-11-11 13:39:08 -08:00
bors
2c1b65ee14 Auto merge of #115694 - clarfonthey:std-hash-private, r=dtolnay
Add `std:#️⃣:{DefaultHasher, RandomState}` exports (needs FCP)

This implements rust-lang/libs-team#267 to move the libstd hasher types to `std::hash` where they belong, instead of `std::collections::hash_map`.

<details><summary>The below no longer applies, but is kept for clarity.</summary>
This is a small refactor for #27242, which moves the definitions of `RandomState` and `DefaultHasher` into `std::hash`, but in a way that won't be noticed in the public API.

I've opened rust-lang/libs-team#267 as a formal ACP to move these directly into the root of `std::hash`, but for now, they're at least separated out from the collections code in a way that will make moving that around easier.

I decided to simply copy the rustdoc for `std::hash` from `core::hash` since I think it would be ideal for the two to diverge longer-term, especially if the ACP is accepted. However, I would be willing to factor them out into a common markdown document if that's preferred.
</details>
2023-11-11 21:12:20 +00:00
bors
ed086d86b8 Auto merge of #117820 - Mark-Simulacrum:bump-version, r=Mark-Simulacrum
Bump nightly version

https://forge.rust-lang.org/release/process.html#bump-the-stable-version-number-t-6-days-friday-the-week-before

r? `@Mark-Simulacrum`
2023-11-11 18:37:45 +00:00
Mark Rousskov
be67b7bdc7 Bump nightly version 2023-11-11 11:29:33 -05:00
León Orell Valerian Liehr
732b4bb664
Make rustc_parse_format compile on stable again 2023-11-11 15:48:13 +01: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