Commit Graph

229340 Commits

Author SHA1 Message Date
Erik Desjardins
5f4472e451 extern-fn-explicit-align test: add MSVC compatible alignment attribute 2023-07-10 19:19:37 -04:00
Erik Desjardins
84ff2e3d1c extern-fn-explicit-align test: use ffi::c_char instead of i8 2023-07-10 19:19:36 -04:00
Erik Desjardins
fdaaf86cc0 add align attr to addr-of-mutate test 2023-07-10 19:19:36 -04:00
Erik Desjardins
0f7d3337d6 add ignore-cross-compile to run-make/extern-fn-explicit-align
From the test logs, other extern-fn-* tests have this:

[run-make] tests/run-make/extern-fn-with-packed-struct ... ignored, ignored when cross-compiling
[run-make] tests/run-make/extern-fn-with-union ... ignored, ignored when cross-compiling
[run-make] tests/run-make/extern-multiple-copies ... ignored, ignored when cross-compiling
[run-make] tests/run-make/extern-multiple-copies2 ... ignored, ignored when cross-compiling
[run-make] tests/run-make/extern-overrides-distribution ... ignored, ignored when cross-compiling
[run-make] tests/run-make/extra-filename-with-temp-outputs ... ignored, ignored when cross-compiling
[run-make] tests/run-make/extern-fn-explicit-align ... FAILED
2023-07-10 19:19:36 -04:00
Erik Desjardins
a07eb0abbd implement vector-containing aggregate alignment for x86 darwin 2023-07-10 19:19:36 -04:00
Erik Desjardins
be1d4e3e0b update array-map test for removed alloca 2023-07-10 19:19:35 -04:00
Erik Desjardins
102292655b align-byval test: use revisions to test different targets 2023-07-10 19:19:35 -04:00
Patrick Walton
0becc89d4a rustc_target: Add alignment to indirectly-passed by-value types, correcting the
alignment of `byval` on x86 in the process.

Commit 88e4d2c291 from five years ago removed
support for alignment on indirectly-passed arguments because of problems with
the `i686-pc-windows-msvc` target. Unfortunately, the `memcpy` optimizations I
recently added to LLVM 16 depend on this to forward `memcpy`s. This commit
attempts to fix the problems with `byval` parameters on that target and now
correctly adds the `align` attribute.

The problem is summarized in [this comment] by @eddyb. Briefly, 32-bit x86 has
special alignment rules for `byval` parameters: for the most part, their
alignment is forced to 4. This is not well-documented anywhere but in the Clang
source. I looked at the logic in Clang `TargetInfo.cpp` and tried to replicate
it here. The relevant methods in that file are
`X86_32ABIInfo::getIndirectResult()` and
`X86_32ABIInfo::getTypeStackAlignInBytes()`. The `align` parameter attribute
for `byval` parameters in LLVM must match the platform ABI, or miscompilations
will occur. Note that this doesn't use the approach suggested by eddyb, because
I felt it was overkill to store the alignment in `on_stack` when special
handling is really only needed for 32-bit x86.

As a side effect, this should fix #80127, because it will make the `align`
parameter attribute for `byval` parameters match the platform ABI on LLVM
x86-64.

[this comment]: https://github.com/rust-lang/rust/pull/80822#issuecomment-829985417
2023-07-10 19:19:30 -04:00
León Orell Valerian Liehr
b809207dec
Lint against misplaced where-clauses on assoc tys in traits 2023-07-11 01:19:11 +02:00
Matthias Krüger
ad4f303a5d
Rollup merge of #113556 - cuviper:trim-rls, r=Mark-Simulacrum
Don't use serde-derive in the rls shim

The already-small RLS shim can get a little smaller, and faster to
build, if we drop the serde-derive dependency and decode the one
"method" field it needs manually from `serde_json::Value`.
2023-07-11 00:58:18 +02:00
Matthias Krüger
40b1c5b716
Rollup merge of #113551 - jyn514:dry-run-exclude, r=ozkanonur
bootstrap: Don't print "Skipping" twice

Bootstrap executes itself twice: once with DryRun::SelfCheck and DryRun::Disabled. Change it not to print the "Skipping" message if SelfCheck is enabled.

See https://github.com/rust-lang/rust/actions/runs/5503931599/jobs/10029625567?pr=113514#step:24:772.
2023-07-11 00:58:18 +02:00
Matthias Krüger
3413ace988
Rollup merge of #113548 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/book

1 commits in 21cf840842bdf768a798869f06373c96c1cc5122..668c64760b5c7ea654facb4ba5fe9faddfda27cc
2023-06-29 13:50:36 UTC to 2023-06-29 13:50:36 UTC

- Remove adjective about what kind of number this is

## rust-lang/edition-guide

2 commits in f63e578b92ff43e8cc38fcaa257b660f45c8a8c2..2751bdcef125468ea2ee006c11992cd1405aebe5
2023-07-10 14:29:51 UTC to 2023-07-08 18:05:44 UTC

- Update a link to a section in the cargo workspaces. (rust-lang/edition-guide#283)
- b'...' byte strings -> byte chars (rust-lang/edition-guide#282)

## rust-embedded/book

2 commits in f2aed2fe8e9f55508c86ba3aa4b6789b18a08a22..1e5556dd1b864109985d5871616ae6b9164bcead
2023-06-29 07:34:47 UTC to 2023-06-27 23:43:06 UTC

- add constgebra to list of math crates (rust-embedded/book#358)
- Switch to GHMQ (rust-embedded/book#357)

## rust-lang/nomicon

1 commits in c369e4b489332f8721fbae630354fa83385d457d..302b995bcb24b70fd883980fd174738c3a10b705
2023-07-05 16:08:32 UTC to 2023-07-05 16:08:32 UTC

- Minor improvements (rust-lang/nomicon#414)

## rust-lang/reference

5 commits in 5ca365eac678cb0d41a20b3204546d6ed70c7171..1ea0178266b3f3f613b0fabdaf16a83961c99cdb
2023-07-08 22:11:07 UTC to 2023-06-26 16:51:55 UTC

- Remove doc of unstable feature of never type (rust-lang/reference#1376)
- Typo: 'assingee' to 'assignee' in expressions.md (rust-lang/reference#1377)
- str type: make sentence more readable (rust-lang/reference#1374)
- Remove obsolete note about soundness hole in type-layout.md (rust-lang/reference#1367)
- Typo: 'a' to 'an' in destructors.md (rust-lang/reference#1371)

## rust-lang/rust-by-example

1 commits in 57636d6926762861f34e030d52ca25a71e95e5bf..8a87926a985ce32ca1fad1be4008ee161a0b91eb
2023-07-07 22:44:06 UTC to 2023-07-07 22:44:06 UTC

- Hint for RGB color calculation (rust-lang/rust-by-example#1726)

## rust-lang/rustc-dev-guide

18 commits in 17fe3e948498c50e208047a750f17d6a8d89669b..b5a12d95e32ae53791cc6ab44417774667ed2ac6
2023-07-09 14:50:50 UTC to 2023-06-28 04:55:24 UTC

- fix: update link to function coverage (rust-lang/rustc-dev-guide#1727)
- Fix a bug in getting-started.md (rust-lang/rustc-dev-guide#1726)
- improve explanation of placing tests in separate file (rust-lang/rustc-dev-guide#1721)
- various fixes/improvements to Contributing chapter (rust-lang/rustc-dev-guide#1723)
- ty::ConstKind has moved (rust-lang/rustc-dev-guide#1724)
- document `./x test --rustc-args` option (rust-lang/rustc-dev-guide#1719)
- tests/run-make files have moved (rust-lang/rustc-dev-guide#1716)
- replace dead link (rust-lang/rustc-dev-guide#1717)
- fix link (rust-lang/rustc-dev-guide#1718)
- update link (rust-lang/rustc-dev-guide#1709)
- typo (rust-lang/rustc-dev-guide#1706)
- OwningRef exists no more (rust-lang/rustc-dev-guide#1715)
- Try to avoid confusion (rust-lang/rustc-dev-guide#1713)
- Issue1707 doc simply use x (rust-lang/rustc-dev-guide#1710)
- include rustc-dev-guide's own issues in suggested search (rust-lang/rustc-dev-guide#1708)
- Improve feature gate and x.py docs (rust-lang/rustc-dev-guide#1701)
- Fix some links (rust-lang/rustc-dev-guide#1705)
- Define more lint terms. (rust-lang/rustc-dev-guide#1681)
2023-07-11 00:58:17 +02:00
Matthias Krüger
c2d4af6a63
Rollup merge of #113543 - cuviper:triagebot-llvm, r=jyn514
Remove `rustc_llvm` from llvm-stamp nags

LLVM is not *built* by `compiler/rustc_llvm` at all, only bindings on
top of it, so there's no need to bump `download-ci-llvm-stamp` for that.
2023-07-11 00:58:17 +02:00
Matthias Krüger
d2a3afebdd
Rollup merge of #113528 - workingjubilee:use-at-minsigstksz-in-rustc-signal-handler, r=WaffleLapkin
Dynamically size sigaltstk in rustc

rustc installs a signal stack that assumes that MINSIGSTKSZ is a constant, unchanging value. Newer hardware undermines that assumption greatly, with register files larger than glibc's traditional static MINSIGSTKZ. Properly handle this so that it is correct on all supported Linux versions with all CPUs.
2023-07-11 00:58:16 +02:00
Matthias Krüger
92a101866d
Rollup merge of #113523 - workingjubilee:reuse-const-inbounds-gep2, r=cuviper
Reuse LLVMConstInBoundsGEP2

We have had LLVM 14 as our minimum for a bit now.
2023-07-11 00:58:15 +02:00
Matthias Krüger
87f978d83c
Rollup merge of #113386 - joshtriplett:style-guide-combinable-expressions, r=compiler-errors
style-guide: Expand example of combinable expressions to include arrays

Arrays are allowed as combinable expressions, but none of the examples
show that.
2023-07-11 00:58:15 +02:00
bors
1d4f5affbd Auto merge of #113544 - Kobzol:ci-macos-13, r=jyn514
CI: use `macos-13` runner for Apple jobs

Trying if performance of Apple CI improves with macOS 13 and SIP disabled. Speed-up:
```
x86_64-apple-1: ~2h 20m > ~1h 20m
x86_64-apple-2: ~1h 45m > ~1h 15m
```

r? `@pietroalbini`
2023-07-10 22:35:11 +00:00
Josh Stone
a219505f7c Only use max_line_length = 100 for *.rs
This setting was added to match rustfmt, but it's been taking effect on
all file editing, which I notice most on git `COMMIT_EDITMSG`. I want to
keep my default 72-width commit messages, please. :)
2023-07-10 15:18:36 -07:00
Chris Wailes
dfcd3226ba Correct the Android stat struct definitions
See https://cs.android.com/android/platform/superproject/+/master:bionic/libc/include/sys/stat.h
for reference.
2023-07-10 15:13:25 -07:00
Josh Stone
dd5fa7d9b3 Don't use serde-derive in the rls shim
The already-small RLS shim can get a little smaller, and faster to
build, if we drop the serde-derive dependency and decode the one
"method" field it needs manually from `serde_json::Value`.
2023-07-10 14:53:57 -07:00
jyn
8c91c8fe84 Don't print "Skipping" twice
Bootstrap executes itself twice: once with DryRun::SelfCheck and DryRun::Disabled.
Change it not to print the "Skipping" message if SelfCheck is enabled.

See https://github.com/rust-lang/rust/actions/runs/5503931599/jobs/10029625567?pr=113514#step:24:772.
2023-07-10 15:19:54 -05:00
Michael Goulet
a74db1abb3 Fix another strange suggestion span 2023-07-10 20:09:28 +00:00
Michael Goulet
3a3f4a2144 Don't use method span on clone suggestion 2023-07-10 20:09:28 +00:00
Michael Goulet
fe870424a7 Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
rustbot
b706cf80b0 Update books 2023-07-10 12:23:19 -07:00
Jubilee Young
094cb1a9fb Dynamically size sigaltstk in rustc
rustc installs a signal stack that assumes that
MINSIGSTKSZ is a constant, unchanging value.
Newer hardware undermines that assumption greatly,
with register files larger than MINSIGSTKZ.
Properly handle this so that it is correct on
all supported Linux versions with all CPUs.
2023-07-10 12:05:16 -07:00
bors
8ca44ef9ca Auto merge of #112988 - spastorino:new-rpitit-24, r=compiler-errors
Replace RPITIT current impl with new strategy that lowers as a GAT

This PR replaces the current implementation of RPITITs with the new implementation that we had under -Zlower-impl-trait-in-trait-to-assoc-ty flag that lowers the RPIT as a GAT on the trait and on the impls that implement that trait.

Opening this PR as a draft because this goes after #112682, ~#112981~ and ~#112983~.
As soon as those are merged, I can rebase and we should run perf, crater and test a lot.

r? `@compiler-errors`
2023-07-10 19:01:30 +00:00
Celina G. Val
b9f378b19b Implement a few more rvalue translation to smir
- Introduce an Opaque type for adding information that is still
   internal to the compiler.
2023-07-10 11:47:48 -07:00
Jakub Beránek
8e0a87bdf4
CI: use macos-13 runner for Apple jobs 2023-07-10 20:22:15 +02:00
Celina G. Val
697563289d Implement Stable for AssertMessage 2023-07-10 10:06:18 -07:00
Celina G. Val
44d0fce150 Fix standalone build
Add extern declarations and optional dependencies to fix build done
directly via `cargo build`.
2023-07-10 10:06:18 -07:00
Urgau
c0fbeeab16 Drop uplifted clippy::fn_null_check 2023-07-10 18:12:41 +02:00
Urgau
f6d2bf63d3 Uplift clippy::fn_null_check to rustc 2023-07-10 18:12:41 +02:00
Josh Stone
68a381f38e Remove rustc_llvm from llvm-stamp nags
LLVM is not *built* by `compiler/rustc_llvm` at all, only bindings on
top of it, so there's no need to bump `download-ci-llvm-stamp` for that.
2023-07-10 09:02:47 -07:00
Camille GILLOT
a5031d569e Call super for debuginfo. 2023-07-10 16:01:19 +00:00
Camille GILLOT
b4c342edea Simplify visit_place. 2023-07-10 16:01:19 +00:00
Camille GILLOT
6d7304167c Bless incremental test. 2023-07-10 16:01:18 +00:00
Camille GILLOT
4de2d8fb66 Perform reference propagation earlier. 2023-07-10 16:01:18 +00:00
Camille GILLOT
b74a144a5f Enable by default. 2023-07-10 16:01:18 +00:00
Camille GILLOT
341e0f78d1 Fortify codegen test. 2023-07-10 16:01:18 +00:00
bors
05b82e551e Auto merge of #94748 - tbu-:pr_file_arc, r=Amanieu
Add `Read`, `Write` and `Seek` impls for `Arc<File>` where appropriate

If `&T` implements these traits, `Arc<T>` has no reason not to do so
either. This is useful for operating system handles like `File` or
`TcpStream` which don't need a mutable reference to implement these
traits.

CC #53835.
CC #94744.
2023-07-10 13:26:42 +00:00
lcnr
4965caf9be avoid building proof trees in select 2023-07-10 15:17:01 +02:00
bors
55e8df2b0e Auto merge of #113532 - matthiaskrgr:rollup-mty7u37, r=matthiaskrgr
Rollup of 2 pull requests

Successful merges:

 - #113331 (Add filter with following segment while lookup typo for path)
 - #113524 (Remove the library/term exception in tidy's pal checker code)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-07-10 10:30:24 +00:00
Matthias Krüger
34aebbdabd
Rollup merge of #113524 - bjorn3:remove_tidy_pal_exception, r=the8472
Remove the library/term exception in tidy's pal checker code

This crate doesn't exist anymore.
2023-07-10 12:01:33 +02:00
Matthias Krüger
70c637808f
Rollup merge of #113331 - chenyukang:yukang-fix-112590-false-positive, r=estebank
Add filter with following segment while lookup typo for path

From the discussion: https://github.com/rust-lang/rust/pull/112917#discussion_r1239150173

Seems we can not get the assoc items for `Struct`, `Enum` in the resolving phase.
A obvious filter is avoid suggesting the same name with the following segment path.

Use `following_seg` can extend the function `smart_resolve_partial_mod_path_errors` for more scenarios, such as `std::sync_error::atomic::AtomicBool` in test case.

r? `@estebank`
2023-07-10 12:01:32 +02:00
bors
3ea096a28d Auto merge of #2974 - RalfJung:rustup, r=RalfJung
Rustup
2023-07-10 08:29:33 +00:00
bjorn3
470c244c8a Remove the library/term exception in tidy's pal checker code
This crate doesn't exist anymore.
2023-07-10 08:25:50 +00:00
Ralf Jung
a3fdf75d12 Merge from rustc 2023-07-10 10:16:05 +02:00
Ralf Jung
d4034a2035 Preparing for merge from rustc 2023-07-10 10:15:54 +02:00
bors
a482149598 Auto merge of #113520 - Nilstrieb:rollup-zn78vvp, r=Nilstrieb
Rollup of 1 pull requests

Successful merges:

 - #113515 (Don't label tracking issues with `needs-triage`)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-07-10 07:51:36 +00:00