Commit Graph

249963 Commits

Author SHA1 Message Date
León Orell Valerian Liehr
79c1e58801
Rollup merge of #121545 - gvozdvmozgu:fix-attribute-validation-associated-items, r=fmease
fix attribute validation on associated items in traits

#121537, fixed attribute validation on associated items in traits
2024-03-16 23:28:47 +01:00
León Orell Valerian Liehr
c00c5fec2a
Rollup merge of #117918 - daxpedda:wasm-c-abi-warning, r=workingjubilee
Add `wasm_c_abi` `future-incompat` lint

This is a warning that will tell users to update to `wasm-bindgen` v0.2.88, which supports spec-compliant C ABI.

The idea is to prepare for a future where Rust will switch to the spec-compliant C ABI by default; so not to break everyone's world, this warning is introduced.

Addresses #71871.
2024-03-16 23:28:46 +01:00
bors
4c1b9c3e2f Auto merge of #122594 - Mark-Simulacrum:bump-version, r=Mark-Simulacrum
Bump to 1.79.0

r? `@Mark-Simulacrum`
2024-03-16 22:18:06 +00:00
Piotr Osiewicz
ad84934e6f rustc-metadata: Store crate name in self-profile of metadata_register_crate
When profiling a build of Zed, I found myself in need of names of crates that take the longest to register in downstream crates.
2024-03-16 21:35:10 +01:00
Yotam Ofek
d0c0887498 Add as_(mut_)ptr and as_(mut_)slice to raw array pointers 2024-03-16 20:15:30 +00:00
bors
766bdce744 Auto merge of #122602 - ChrisDenton:rollup-f0vumtg, r=ChrisDenton
Rollup of 7 pull requests

Successful merges:

 - #122323 (configure.py: add flag for loongarch64 musl-root)
 - #122372 (prevent notifying the same changes more than once)
 - #122390 (Bump windows-bindgen to 0.55.0)
 - #122401 (Check library crates for all tier 1 targets in PR CI)
 - #122489 (Bump `cargo update` PR more often)
 - #122583 (Use `UnsafeCell` for fast constant thread locals)
 - #122590 (bootstrap: Don't name things copy that are not copies)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-03-16 20:14:20 +00:00
许杰友 Jieyou Xu (Joe)
fc42f3bfe3
Mention @jieyouxu for changes to compiletest, run-make tests and the run-make-support library 2024-03-16 19:15:45 +00:00
Chris Denton
d3ad841781
Rollup merge of #122590 - Nilstrieb:bootstrap-do-you-know-what-the-word-copy-means, r=Mark-Simulacrum
bootstrap: Don't name things copy that are not copies

The bootstrap copy methods don't actually copy, they just hard link. Simply lying about it being "copying" can be very confusing! (ask me how I know!).

I'm not sure whether the name I chose is the ideal name, but it's definitely better than before.
2024-03-16 18:27:35 +00:00
Chris Denton
a9f8f8b070
Rollup merge of #122583 - Zoxc:tls-non-mut, r=joboet
Use `UnsafeCell` for fast constant thread locals

This uses `UnsafeCell` instead of `static mut` for fast constant thread locals. This changes the type of the TLS shims to return `&UnsafeCell<T>` instead of `*mut T` which means they are always non-null so LLVM can optimize away the check for `Some` in `LocalKey::with` if `T` has no destructor.

LLVM is currently unable to do this optimization as we lose the fact that `__getit` always returns `Some` as it gets optimized to just returning the value of the TLS shim.
2024-03-16 18:27:34 +00:00
Chris Denton
42e03fc158
Rollup merge of #122489 - clubby789:more-cargo-update, r=Mark-Simulacrum
Bump `cargo update` PR more often

r? `@Mark-Simulacrum`

(https://github.com/rust-lang/rust/pull/121923#issuecomment-1986879572)
2024-03-16 18:27:34 +00:00
Chris Denton
1fbe1390ca
Rollup merge of #122401 - ChrisDenton:check-tier1, r=Mark-Simulacrum
Check library crates for all tier 1 targets in PR CI

Let's try checking all tier 1 targets. Shouldn't take much time.

Not sure if this is the right place to put it or not but let's see if it works first.
2024-03-16 18:27:33 +00:00
Chris Denton
ceef59fa2b
Rollup merge of #122390 - ChrisDenton:bindgen, r=Mark-Simulacrum
Bump windows-bindgen to 0.55.0

windows-bindgen is the crate used to generate std's Windows API bindings.

Not many changes for us, it's mostly just simplifying the generate code (e.g. no more `-> ()`). The one substantial change is some structs now use `i8` byte arrays instead of `u8`. However, this only impacts one test.
2024-03-16 18:27:33 +00:00
Chris Denton
491acfa08d
Rollup merge of #122372 - onur-ozkan:change-id-improvement, r=Mark-Simulacrum
prevent notifying the same changes more than once

Prevents re-reporting of previously notified changes by using the .last-warned-change-id value for change detection.

Resolves #122344
2024-03-16 18:27:32 +00:00
Chris Denton
9870116309
Rollup merge of #122323 - heiher:loongarch64-musl-root, r=Mark-Simulacrum
configure.py: add flag for loongarch64 musl-root
2024-03-16 18:27:32 +00:00
bors
2ffa3c89fc Auto merge of #122599 - bjorn3:sync_cg_clif-2024-03-16, r=bjorn3
Subtree sync for rustc_codegen_cranelift

The main highlight this time is a fix for a recently introduced ICE.

Fixes https://github.com/rust-lang/rust/issues/122399

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler
2024-03-16 18:08:42 +00:00
Bryanskiy
b2ed9d0911 Delegation: fix ICE on duplicated associative items 2024-03-16 21:03:36 +03:00
bors
5ecace48f6 Auto merge of #16846 - roife:fix-issue16826, r=Veykril
fix: incorrect handling of `use` and panic issue in `extract_module`.

fix #16826

This PR includes the following changes:

1. Simplify the implementation partially, removing many unnecessary loops and `clone()`.

2. When it is found that the top level of the selection contains a `use` statement, a copy of the `use` will be reinserted before extraction. (#16826)

3. Fixed an issue during `extract_module`, where if the top level of the selected part contains `A` and `use A::B`, it caused a duplication of `use A`.
2024-03-16 17:35:49 +00:00
bjorn3
6697186f59 Merge commit '4cf4ffc6ba514f171b3f52d1c731063e4fc45be3' into sync_cg_clif-2024-03-16 2024-03-16 17:23:11 +00:00
bors
b94c2852fa Auto merge of #16856 - Veykril:macarons, r=Veykril
fix: Fix wrong where clause rendering on hover

We were not accounting for proper newline indentation in some places making the hover look weird (or just straight up wrong for type aliases)
2024-03-16 17:23:02 +00:00
joboet
f2721338f6
core: optimize ptr::replace 2024-03-16 17:51:00 +01:00
Lukas Wirth
d69a81fddb fix: Fix wrong where clause rendering on hover 2024-03-16 17:49:59 +01:00
bjorn3
4cf4ffc6ba Fix rustc test suite 2024-03-16 16:30:08 +00:00
bjorn3
e775fdc9e9 Don't try to get a ty for a nested allocation
Fixes rust-lang/rustc_codegen_cranelift#1464
2024-03-16 16:17:58 +00:00
bjorn3
9f162c49cb Rustup to rustc 1.78.0-nightly (c67326b06 2024-03-15) 2024-03-16 16:17:16 +00:00
Erik Desjardins
a7d4258e00 revert changes and just delete the fixme
Avoiding the naming didn't have any meaningful perf impact.
2024-03-16 11:11:53 -04:00
will
7c4b07d5e8 added pretty_print_const_expr 2024-03-17 01:38:45 +11:00
Mark Rousskov
1572896652 Bump to 1.79.0 2024-03-16 09:56:09 -04:00
bors
22e241e32e Auto merge of #122593 - ChrisDenton:windows-support-1, r=Nilstrieb
Remove Windows support note

The note is redundant now that Windows 10 is the minimum supported in tier 1.
2024-03-16 13:53:54 +00:00
bjorn3
0000db58c6 Sync from rust c67326b063 2024-03-16 13:25:40 +00:00
Chris Denton
d5f92fc585
Remove Windows support note 2024-03-16 12:54:32 +00:00
Nilstrieb
52f84fa7c2 Remove double remove_file 2024-03-16 12:57:36 +01:00
Nilstrieb
0ec5d374fe bootstrap: Don't name things copy that are not copies
The bootstrap copy methods don't actually copy, they just hard link.
Simply lying about it being "copying" can be very confusing! (ask me how
I know!).
2024-03-16 12:54:10 +01:00
John Kåre Alsaker
b0b249399a Use UnsafeCell for fast constant thread locals 2024-03-16 12:34:52 +01:00
bors
9023f908cf Auto merge of #119418 - aaupov:master, r=Kobzol
[BOLT] Use CDSort and CDSplit

CDSort and CDSplit are the most recent versions of function ordering and function splitting algorithms with some improvements over the previous baseline (ext-tsp and two-way splitting).
2024-03-16 11:18:39 +00:00
klensy
4bfc48585d less useless array builds in imported_source_file 2024-03-16 12:31:57 +03:00
bors
774ae599ab Auto merge of #122309 - g-yziquel:issue-122262, r=saethlin
Use `MAP_PRIVATE` (not unsound-prone `MAP_SHARED`)

Solves https://github.com/rust-lang/rust/issues/122262
2024-03-16 09:19:08 +00:00
daxpedda
873a0f264e
Add wasm_c_abi future-incompat lint 2024-03-16 09:57:15 +01:00
bors
c8badeb82b Auto merge of #16854 - rust-lang:dependabot/npm_and_yarn/editors/code/follow-redirects-1.15.6, r=lnicola
Bump follow-redirects from 1.15.4 to 1.15.6 in /editors/code

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
<details>
<summary>Commits</summary>
<ul>
<li><a href="35a517c586"><code>35a517c</code></a> Release version 1.15.6 of the npm package.</li>
<li><a href="c4f847f851"><code>c4f847f</code></a> Drop Proxy-Authorization across hosts.</li>
<li><a href="8526b4a1b2"><code>8526b4a</code></a> Use GitHub for disclosure.</li>
<li><a href="b1677ce001"><code>b1677ce</code></a> Release version 1.15.5 of the npm package.</li>
<li><a href="d8914f7982"><code>d8914f7</code></a> Preserve fragment in responseUrl.</li>
<li>See full diff in <a href="https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=follow-redirects&package-manager=npm_and_yarn&previous-version=1.15.4&new-version=1.15.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/rust-lang/rust-analyzer/network/alerts).

</details>
2024-03-16 07:05:14 +00:00
dependabot[bot]
64c12e665b
Bump follow-redirects from 1.15.4 to 1.15.6 in /editors/code
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-16 06:57:29 +00:00
bors
ee03bd0581 Auto merge of #16851 - lnicola:ubuntu-20.04, r=lnicola
internal: Build releases on Ubuntu 20.04

Closes #16793
2024-03-16 06:45:16 +00:00
bors
7aa1de7ed8 Auto merge of #122559 - ForsakenHarmony:hrmny/update-llvm, r=nikic
Update LLVM submodule

LLVM version `18.1.1` + additional fixes.

Fixes https://github.com/Amanieu/corosensei/issues/23.
Fixes https://github.com/rust-lang/rust/issues/122252.
Fixes https://github.com/rust-lang/rust/issues/121996.
Fixes https://github.com/rust-lang/rust/issues/121960.
2024-03-16 06:35:05 +00:00
bors
c563f2ee79 Auto merge of #122371 - oli-obk:visit_nested_body, r=tmiasko
Stop walking the bodies of statics for reachability, and evaluate them instead

cc `@saethlin` `@RalfJung`

cc #119214

This reuses the `DefIdVisitor` from `rustc_privacy`, because they basically try to do the same thing.

This PR's changes can probably be extended to constants, too, but let's tackle that separately, it's likely more involved.
2024-03-16 04:35:02 +00:00
bors
c03ea3dfd9 Auto merge of #121926 - tgross35:f16-f128-step3-feature-gate, r=compiler-errors,petrochenkov
`f16` and `f128` step 3: compiler support & feature gate

Continuation of https://github.com/rust-lang/rust/pull/121841, another portion of https://github.com/rust-lang/rust/pull/114607

This PR exposes the new types to the world and adds a feature gate. Marking this as a draft because I need some feedback on where I did the feature gate check. It also does not yet catch type via suffixed literals (so the feature gate test will fail, probably some others too because I haven't belssed).

If there is a better place to check all types after resolution, I can do that. If not, I figure maybe I can add a second gate location in AST when it checks numeric suffixes.

Unfortunately I still don't think there is much testing to be done for correctness (codegen tests or parsed value checks) until we have basic library support. I think that will be the next step.

Tracking issue: https://github.com/rust-lang/rust/issues/116909

r? `@compiler-errors`
cc `@Nilstrieb`
`@rustbot` label +F-f16_and_f128
2024-03-16 02:02:00 +00:00
León Orell Valerian Liehr
a37fe00ea1
Remove obsolete parameter speculative from instantiate_poly_trait_ref 2024-03-16 02:33:21 +01:00
bors
05a2be3def Auto merge of #122575 - weihanglo:update-cargo, r=weihanglo
Update cargo

6 commits in 7065f0ef4aa267a7455e1c478b5ccacb7baea59c..2fe739fcf16c5bf8c2064ab9d357f4a0e6c8539b
2024-03-12 13:25:15 +0000 to 2024-03-15 21:39:18 +0000
- feat: Add 'open-namespaces' feature (rust-lang/cargo#13591)
- refactor: Expose source/spans to Manifest for emitting lints (rust-lang/cargo#13593)
- feat(tree): Control `--charset` via auto-detecting config value (rust-lang/cargo#13337)
- refactor(toml): Flatten manifest parsing (rust-lang/cargo#13589)
- fix: strip feature dep when dep is dev dep (rust-lang/cargo#13518)
- fix(ci): bump check error when PR is behind master (rust-lang/cargo#13581)

r? ghost
2024-03-16 00:03:52 +00:00
Josh Stone
8d374b1f2a Install the bad-alloc handler before fatal errors
The bad-alloc installer was incorrectly asserting that the other handler
isn't set yet, instead of checking its own, but we can avoid that by
changing the order we install them.

Ref: https://github.com/llvm/llvm-project/issues/83040
2024-03-15 16:49:08 -07:00
Josh Stone
adf57a75d5 Aggressively ignore write errors during bad-alloc 2024-03-15 16:48:16 -07:00
Weihang Lo
20b4b19369
Update cargo 2024-03-15 19:26:58 -04:00
Josh Stone
0ade5a11f5 Register LLVM handlers for bad-alloc / OOM
LLVM's default bad-alloc handler may throw if exceptions are enabled,
and `operator new` isn't hooked at all by default. Now we register our
own handler that prints a message similar to fatal errors, then aborts.
We also call the function that registers the C++ `std::new_handler`.
2024-03-15 15:49:06 -07:00
Guillaume Yziquel
3fc5ed8067 Issue 122262: MAP_PRIVATE for more reliability on virtualised filesystems.
Adding support of quirky filesystems occuring in virtualised settings not
having full POSIX support for memory mapped files. Example: current virtiofs
with cache disabled, occuring in Incus/LXD or Kata Containers. Has been
hitting various virtualised filesystems since 2016, depending on their levels
of maturity at the time. The situation will perhaps improve when virtiofs DAX
support patches will have made it into the qemu mainline.

On a reliability level, using the MAP_PRIVATE sycall flag instead of the
MAP_SHARED syscall flag for the mmap() system call does have some undefined
behaviour when the caller update the memory mapping of the mmap()ed file, but
MAP_SHARED does allow not only the calling process but other processes to
modify the memory mapping. Thus, in the current context, using MAP_PRIVATE
copy-on-write is marginally more reliable than MAP_SHARED.

This discussion of reliability is orthogonal to the type system enforced safety
policy of rust, which does not claim to handle memory modification of memory
mapped files triggered through the operating system and not the running rust
process.
2024-03-15 18:31:07 -04:00