Commit Graph

250888 Commits

Author SHA1 Message Date
Ralf Jung
b08b06e3a8 fix not finding the right libraries on Windows 2024-03-31 23:09:33 +02:00
Ralf Jung
4797fba3b7 add FIXME for making the cargo cmd properly typed 2024-03-31 19:44:54 +02:00
Ralf Jung
288daeb14f move parallel_compiler handling into prepare_tool_cargo so that it is done everywhere 2024-03-31 19:44:54 +02:00
Ralf Jung
7ac5f604c1 remove a pointless env var
CARGO_EXTRA_FLAGS is respected by the ./miri script which we are not invoking here
2024-03-31 19:44:54 +02:00
Ralf Jung
fb8abe5fcf shift Miri's stage so that it matches other rustc-based tools 2024-03-31 19:44:54 +02:00
Ralf Jung
b5fe655ae8 bootstrap/rustc: remove a miri hack 2024-03-31 19:44:54 +02:00
Ralf Jung
4056df5cf7 cargo-miri: better debug output; reorder a comment to make it less confusing 2024-03-31 19:44:21 +02:00
Ralf Jung
2a939422ca prepare_tool_cargo: add support for a miri-test mode, and use it in the cargo-miri smoke test and Miri sysroot build 2024-03-30 17:09:09 +01:00
Ralf Jung
fd7909aa59 x.py test miri: respect --no-doc / --doc 2024-03-28 22:46:25 +01:00
bors
929bceeaf8 Auto merge of #123167 - DianQK:test-simd-wide-sum, r=scottmcm
Restore the test checks for `wider_reduce_into_iter`

The current minimum support is for LLVM 17. Context: https://github.com/rust-lang/rust/pull/116018#discussion_r1348353459.

r? scottmcm
2024-03-28 16:23:04 +00:00
bors
c5e7f45b62 Auto merge of #115220 - Zoxc:revive-gcx-ptr, r=oli-obk
Add a `CurrentGcx` type to let the deadlock handler access `TyCtxt`

This brings back `GCX_PTR` (previously removed in https://github.com/rust-lang/rust/pull/74969) allowing the deadlock handler access to `GlobalCtxt`. This fixes https://github.com/rust-lang/rust/issues/111522.

r? `@cjgillot`
2024-03-28 14:00:08 +00:00
DianQK
ec359f7d9f
Restore the test checks for wider_reduce_into_iter
The current minimum support is for LLVM 17.
2024-03-28 21:28:45 +08:00
bors
4ea92e3c7a Auto merge of #123166 - bjorn3:sync_cg_clif-2024-03-28, r=bjorn3
Subtree sync for rustc_codegen_cranelift

The main highlight this time is debuginfo for statics. Not all types are supported yet. Those that aren't supported are represented as `[u8; mem::size_of::<T>()]` instead.

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler
2024-03-28 11:57:39 +00:00
bjorn3
987ed345af Merge commit '09fae60a86b848a2fc0ad219ecc4e438dc1eef86' into sync_cg_clif-2024-03-28 2024-03-28 11:43:35 +00:00
bjorn3
09fae60a86 Fix rustc test suite 2024-03-28 11:38:15 +00:00
bjorn3
ef0b3d1def Rustup to rustc 1.79.0-nightly (c9f8f3438 2024-03-27) 2024-03-28 11:17:20 +00:00
bors
551abd65be Auto merge of #116891 - aliemjay:opaque-region-infer-rework-2, r=compiler-errors,oli-obk
rework opaque type region inference

User-facing changes are documented in [this comment](https://github.com/rust-lang/rust/pull/116891#issuecomment-1973774412).

The design document is in [this comment](https://github.com/rust-lang/rust/pull/116891#issuecomment-1836900102).

---

\- Fix Ice in check_unique; ICE -> Error; fixes #122782.
\- Ignore uncaptured lifetime args; ICE -> Pass; fixes #111906, fixes #110623, fixes #109059, fixes #122307
\- Except equal parameters from the uniqueness check; Pass -> Error; fixes #113916.
\- Check RPITs for invalid args; Pass -> Error; fixes #111935; ICE -> Error; fixes #110726.
\- Rework opaque types region inference; Pass -> Error; fixes #113971, fixes #112841.
\- Reject external lifetimes as invalid args; Pass -> Error; fixes #105498.

r? `@ghost`
2024-03-28 09:51:39 +00:00
bors
d0e8cbbd99 Auto merge of #122898 - jieyouxu:tidy-no-new-makefiles, r=albertlarsan68
Add tidy check to error on new `Makefile`s in `tests/run-make`

We would like to strongly encourage new `run-make` tests to be written in Rust and not add any new `Makefile`-based `run-make` tests.
2024-03-28 07:38:55 +00:00
Ali MJ Al-Nasrawy
59c217fed2 remove test FIXME re once-module-region 2024-03-28 06:41:22 +00:00
Ali MJ Al-Nasrawy
fb35156bb5 fixup except equal params from 2024-03-28 06:08:43 +00:00
Ali MJ Al-Nasrawy
7c6876f9a9 simplify check_unique 2024-03-28 06:00:26 +00:00
Ali MJ Al-Nasrawy
6b6ed2ea28 reject external lifetimes as invalid arguments 2024-03-28 06:00:26 +00:00
Ali MJ Al-Nasrawy
f4940e4d22 rework opaque types region inference 2024-03-28 06:00:26 +00:00
Ali MJ Al-Nasrawy
08c8caa524 convert all named regions in opaque types to nll vars
Do it in typeck before entering region inference routines
particularly because we will no longer be able to convert placeholders.
2024-03-28 06:00:26 +00:00
Ali MJ Al-Nasrawy
15c7e59c05 favor placeholders over existentials when choosing SCC representatives
... even when the existential has the least RegionVid.

universal regions (of root universe) > placeholders > existentials

The previous behavior, that chooses the minimal RegionVid index, naturally prefers universal regions over others
because they always have the least RegionVids, but there was no guranteed ordering between placeholders and existentials.
2024-03-28 06:00:26 +00:00
Ali MJ Al-Nasrawy
ce91e46a1e check RPITs for invalid args 2024-03-28 06:00:26 +00:00
Ali MJ Al-Nasrawy
c337825d6d ignore error params 2024-03-28 06:00:25 +00:00
Ali MJ Al-Nasrawy
4ecdf5ff00 except equal parameters from the uniqueness check 2024-03-28 06:00:25 +00:00
bors
2781687fe5 Auto merge of #122832 - oli-obk:no_ord_def_id3, r=michaelwoerister
Remove `DefId`'s `Partial/Ord` impls

work towards https://github.com/rust-lang/rust/issues/90317

based on https://github.com/rust-lang/rust/pull/122824 and https://github.com/rust-lang/rust/pull/122820

r? `@michaelwoerister`
2024-03-28 05:25:28 +00:00
bors
463a11bef4 Auto merge of #121833 - kornelski:parent_include, r=estebank
Suggest correct path in include_bytes!

`include_bytes!` paths are relative, and I'm often not sure how nested is the `.rs` file that I'm editing, so I have to guess the number of `"../.."`. This change searches `..` and `../..` for the given file and offers corrected path as a suggestion.

I wasn't sure how to get the right span, and how to properly escape it.

```text
error: couldn't read src/file.txt: No such file or directory (os error 2)
 --> src/main.rs:2:13
  |
2 |     let x = include_bytes!("file.txt");
  |             ^^^^^^^^^^^^^^^----------^
  |                            |
  |                            help: it's in a parent directory: `"../../file.txt"`
```
2024-03-28 02:47:46 +00:00
bors
d779a7a25f Auto merge of #123147 - matthiaskrgr:rollup-2t5ot36, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #121943 (Clarify atomic bit validity)
 - #123075 (CFI: Fix drop and drop_in_place)
 - #123101 (Delegation: fix ICE on wrong `Self` instantiation)
 - #123130 (Load missing type of impl associated constant from trait definition)
 - #123133 (chore: fix some comments)
 - #123136 (Some wording improvement)
 - #123139 (`num::NonZero::get` can be 1 transmute instead of 2)
 - #123142 (Let nils know about changes to target docs)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-03-28 00:30:46 +00:00
Matthias Krüger
145211eeb8
Rollup merge of #123142 - Nilstrieb:nils-knows-whats-happening, r=compiler-errors
Let nils know about changes to target docs

i'll probably expand the paths and add a message after #121051 but i honestly don't expect that to land very soon lol, so it would be nice to get notified about changes already and watch what's happening there

approve this pr if you're cool
2024-03-27 23:27:25 +01:00
Matthias Krüger
9c91e2cd84
Rollup merge of #123139 - scottmcm:simpler-nonzero-get, r=jhpratt
`num::NonZero::get` can be 1 transmute instead of 2

Just something I noticed in passing.  No need for a `match` in here to call `unreachable_unchecked`, as `transmute_unchecked` will add the appropriate `llvm.assume` <https://rust.godbolt.org/z/W5hjeETnc>.
2024-03-27 23:27:25 +01:00
Matthias Krüger
ea7789c56e
Rollup merge of #123136 - Vagelis-Prokopiou:fix/docs, r=ChrisDenton
Some wording improvement

"Data" is usually considered as plural uncountable, therefore "some" seems to make more sense imo.
2024-03-27 23:27:24 +01:00
Matthias Krüger
45cec32ac3
Rollup merge of #123133 - xiaoxiangxianzi:master, r=fmease
chore: fix some comments
2024-03-27 23:27:24 +01:00
Matthias Krüger
15fb2f214c
Rollup merge of #123130 - oli-obk:missing_type_taint, r=compiler-errors
Load missing type of impl associated constant from trait definition

fixes #123092

Also does some cleanups I discovered while analyzing this issue
2024-03-27 23:27:23 +01:00
Matthias Krüger
ae33b9045b
Rollup merge of #123101 - Bryanskiy:delegation-fixes-2, r=petrochenkov
Delegation: fix ICE on wrong `Self` instantiation

fixes https://github.com/rust-lang/rust/issues/119921
fixes https://github.com/rust-lang/rust/issues/119919

There is no way to instantiate `Self` param for caller in delegation item if

1. callee is a trait method && callee contains `Self` param
2. delegation item isn't an associative item

In general, we can consider `Self` param as independent type param in these cases:

```rust

trait Trait {
    fn foo(_: Option<&Self>) {...}
}

reuse Trait::foo;
// will be desugared to:
fn foo<T: Trait>(x: Option<&T>) { Trait::foo(x) }
```

But this requires early bound parameters support. For now, I suggest banning such cases to avoid ICE's.

r? ``@petrochenkov``
2024-03-27 23:27:23 +01:00
Matthias Krüger
6464e5b78c
Rollup merge of #123075 - rcvalle:rust-cfi-fix-drop-drop-in-place, r=compiler-errors
CFI: Fix drop and drop_in_place

Fix drop and drop_in_place by transforming self of drop and drop_in_place methods into a Drop trait objects.

This was split off from https://github.com/rust-lang/rust/pull/116404.

cc `@compiler-errors` `@workingjubilee`
2024-03-27 23:27:22 +01:00
Matthias Krüger
a9ed9fb943
Rollup merge of #121943 - joshlf:patch-11, r=scottmcm
Clarify atomic bit validity

The previous definition used the phrase "representation", which is ambiguous given the current state of memory model nomenclature in Rust. For integer types and for `AtomicPtr<T>`, the new wording clarifies that size and bit validity are guaranteed to match the corresponding native integer type/`*mut T`. For `AtomicBool`, the new wording clarifies that size, alignment, and bit validity are guaranteed to match `bool`.

Note that we use the phrase "size and alignment" rather than "layout" since the latter term also implies that the field types are the same. This isn't true - `AtomicXxx` doesn't store an `xxx`, but rather an `UnsafeCell<xxx>`. This distinction is important for some `unsafe` code, which needs to reason about the presence or absence of interior mutability in order to ensure that their code is sound (see e.g. https://github.com/google/zerocopy/issues/251).
2024-03-27 23:27:22 +01:00
bors
9d70954948 Auto merge of #122205 - onur-ozkan:incorrect-sysroot-for-target, r=albertlarsan68
ensure std is prepared for cross-targets

Previously, doing `x test compiler/*` would result in build failures due to missing std. This PR fixes that.
2024-03-27 22:22:42 +00:00
许杰友 Jieyou Xu (Joe)
7a99be35f2
Add FIXME to remind removing the check once all tests are ported over 2024-03-27 21:31:56 +00:00
许杰友 Jieyou Xu (Joe)
0f1bbe3141
Point out you can use --bless to update allow list for removed entries 2024-03-27 21:30:02 +00:00
bjorn3
4f0cde1e51 Define return type for functions in debuginfo 2024-03-27 20:36:49 +00:00
许杰友 Jieyou Xu (Joe)
50897170d5
Use a line-separated plain-text allowlist instead 2024-03-27 20:31:30 +00:00
bjorn3
0634aedbb7 Implement debug_type for tuples 2024-03-27 20:29:50 +00:00
bjorn3
55a2446a53 Don't panic when layout can't be computed and fix generation of array type debuginfo 2024-03-27 20:07:36 +00:00
许杰友 Jieyou Xu (Joe)
f10cf7bd85
Add run-make/link-framework/Makefile to allowlist 2024-03-27 20:02:43 +00:00
许杰友 Jieyou Xu (Joe)
81e3af7f4d
Rename expected_run_make_makefiles -> allowed_run_make_makefiles 2024-03-27 20:00:34 +00:00
许杰友 Jieyou Xu (Joe)
7cf69a8230
Pass tests_path and src_path separately 2024-03-27 20:00:34 +00:00
许杰友 Jieyou Xu (Joe)
ec25a425aa
Add comment for include!() usage 2024-03-27 20:00:34 +00:00