Commit Graph

254086 Commits

Author SHA1 Message Date
Matthias Krüger
f483971b87 add test for ICE failed to resolve instance for <[f32; 2] as CrossProduct
Fixes https://github.com/rust-lang/rust/issues/111667
2024-04-28 10:23:10 +02:00
Matthias Krüger
012f9e26ac add test for Inconsistent rustc_transmute::is_transmutable(...) result, got Yes
Fixes https://github.com/rust-lang/rust/issues/110969
2024-04-28 10:23:10 +02:00
Matthias Krüger
c32e2fe179 add test for https://github.com/rust-lang/rust/issues/109812 2024-04-28 10:23:10 +02:00
Matthias Krüger
c968b8b777 add test for ICE: tcx.resolutions(()) is not supported for local crate -Zunpretty=mir on invalid module path with staged_ap
Fixes https://github.com/rust-lang/rust/issues/108697
2024-04-28 10:23:10 +02:00
Gurinder Singh
4aafec1bc1 Rename inihibit_union_abi_opt() to inihibits_union_abi_opt()
The present tense makes it read more naturally at use site i.e.
"this repr _inhibits_ optimizations"
2024-04-28 13:09:36 +05:30
onur-ozkan
57a5f34ccb handle the targets that are missing in stage0
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-04-28 10:08:08 +03:00
bors
cb49406457 Auto merge of #124210 - the8472:consign-ebadf-to-the-fire, r=Mark-Simulacrum
Abort a process when FD ownership is violated

When an owned FD has already been closed before it's dropped that means something else touched an FD in ways it is not allowed to. At that point things can already be arbitrarily bad, e.g. clobbered mmaps. Recovery is not possible.
All we can do is hasten the fire.

Unlike the previous attempt in #124130 this shouldn't suffer from the possibility that FUSE filesystems can return arbitrary errors.
2024-04-28 06:20:28 +00:00
bors
6c90ac8d8f Auto merge of #123546 - Rajveer100:branch-for-issue-122128, r=onur-ozkan
Bootstrap: Check validity of `--target` and `--host` triples before starting a build

Resolves #122128

As described in the issue, validating the `target` and `host` triples would save a lot of time before actually starting a build. This would also check for custom targets by looking for a valid JSON spec if the specified target does not exist in the [supported](42825768b1/compiler/rustc_target/src/spec/mod.rs (L1401-L1689)) list of targets.
2024-04-28 04:16:05 +00:00
yukang
6faedd381b Fix the assertion crash from rustdoc document indent widths 2024-04-28 11:17:09 +08:00
bors
2207179a59 Auto merge of #124454 - Mark-Simulacrum:bump-version, r=Mark-Simulacrum
Bump version to 1.80

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

r? `@Mark-Simulacrum`
2024-04-28 02:12:04 +00:00
bors
0986358d2c Auto merge of #124456 - matthiaskrgr:rollup-8bm3m6v, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #123248 (1.78 release notes)
 - #123942 (`x vendor`)
 - #124165 (add test for incremental ICE: slice-pattern-const.rs #83085)
 - #124242 (bootstrap: Describe build_steps modules)
 - #124406 (Remove unused `[patch]` for clippy_lints)
 - #124429 (bootstrap: Document `struct Builder` and its fields)
 - #124447 (Unconditionally call `really_init` on GNU/Linux)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-28 00:05:11 +00:00
The 8472
1ba00d9cb2 put FD validity behind late debug_asserts checking
uses the same machinery as assert_unsafe_precondition
2024-04-28 01:44:25 +02:00
Matthias Krüger
be8976022e
Rollup merge of #124447 - workingjubilee:set-argv-twice-on-gnu, r=ChrisDenton
Unconditionally call `really_init` on GNU/Linux

This makes miri not diverge in behavior, it fixes running Rust linux-gnu binaries on musl with gcompat, it fixes dlopen edge-cases that cranelift somehow hits, etc.

Fixes #124126

thou hast gazed into this abyss with me:
r? ``@ChrisDenton``
2024-04-28 01:25:02 +02:00
Matthias Krüger
088753cb9a
Rollup merge of #124429 - Enselic:document-builder, r=Mark-Simulacrum
bootstrap: Document `struct Builder` and its fields

I'm exploring the code of bootstrap and had a bit of a hard time understanding exactly what `Builder` is for at first. I decided to help document it and its field to help future explorers.
2024-04-28 01:25:01 +02:00
Matthias Krüger
62a88c375c
Rollup merge of #124406 - Alexendoo:cargo-patch-clippy, r=Mark-Simulacrum
Remove unused `[patch]` for clippy_lints

Looks like it was once used by RLS
2024-04-28 01:25:01 +02:00
Matthias Krüger
f17ce8bf7a
Rollup merge of #124242 - workingjubilee:describe-bootstrap-files-better, r=Mark-Simulacrum
bootstrap: Describe build_steps modules

One of my preferred ways to understand source code is to start with its API. This implies the code is documented reasonably accurately, even if it is a private API. The description of one of these modules had not been updated since 2015 and so was both terse and confusing, so I rewrote it. Then I noticed many others went unremarked, so I offered some remarks.
2024-04-28 01:25:00 +02:00
Matthias Krüger
289bf549ad
Rollup merge of #124165 - matthiaskrgr:slice-pattern-const-ice-incr, r=Mark-Simulacrum
add test for incremental ICE: slice-pattern-const.rs #83085

Fixes #83085
2024-04-28 01:25:00 +02:00
Matthias Krüger
8ef4a8df4b
Rollup merge of #123942 - onur-ozkan:x-vendor, r=Mark-Simulacrum
`x vendor`

This PR implements `x vendor` on bootstrap; enabling dependency vendoring without the need for developers to have `cargo` installed on their system (previously, we suggested running `cargo vendor ...` but now we can accomplish the same task with `x vendor`).

In addition, fixes #112391 problem.
2024-04-28 01:24:59 +02:00
Matthias Krüger
856dfdca8e
Rollup merge of #123248 - Mark-Simulacrum:relnotes, r=Mark-Simulacrum
1.78 release notes

cc `@rust-lang/release`

r? `@cuviper`
2024-04-28 01:24:59 +02:00
Kornel
b700d9c928
clippy::single_match(_else) may be machine applicable 2024-04-28 00:15:56 +01:00
Mark Rousskov
a7696ed4ab Bump version to 1.80 2024-04-27 19:03:50 -04:00
Mark Rousskov
7a69a4a5cf 1.78 release notes 2024-04-27 19:00:19 -04:00
Veera
26ed429bab Mention Both HRTB and Generic Lifetime in E0637 documentation
Also, small grammar fix.
2024-04-27 18:15:14 -04:00
Michael Goulet
17728a9bb2 Record certainty of evaluate_added_goals_and_make_canonical_response call in candidate 2024-04-27 17:46:29 -04:00
bors
aed2187d53 Auto merge of #124448 - matthiaskrgr:rollup-iloy9vz, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #124370 (Fix substitution parts having a shifted underline in some cases)
 - #124394 (Fix ICE on invalid const param types)
 - #124425 (Do not ICE on invalid consts when walking mono-reachable blocks)
 - #124434 (Remove lazycell and once_cell from compiletest dependencies)
 - #124437 (doc: Make the `mod.rs` in the comment point to the correct location)
 - #124443 (Elaborate in comment about `statx` probe)
 - #124445 (bootstrap: Change `global(true)` to `global = true` for flags for consistency)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-27 20:49:06 +00:00
Matthias Krüger
6f8811d113
Rollup merge of #124445 - Enselic:global-true, r=onur-ozkan
bootstrap: Change `global(true)` to `global = true` for flags for consistency

All other arg properties use the `prop = value` style, which makes it slightly annoying to use the `prop(value)` only style for `global`. Change to `prop = value` also for `global` for consistency.
2024-04-27 20:46:10 +02:00
Matthias Krüger
45019310b8
Rollup merge of #124443 - tbu-:pr_statx_enosys_comment, r=workingjubilee
Elaborate in comment about `statx` probe

As requested by `@workingjubilee` in https://github.com/rust-lang/rust/pull/123928#discussion_r1564916743.
2024-04-27 20:46:09 +02:00
Matthias Krüger
9c634f95bf
Rollup merge of #124437 - linyihai:doc-link-typeck, r=compiler-errors
doc: Make the `mod.rs` in the comment point to the correct location

The origin `mod.rs` had moved to `rustc_hir_analysis::check`, but the annotation doesn't point to it.

See [the origin PR](https://github.com/rust-lang/rust/pull/61857/files#diff-b65997b61ccd8d8e08238c925d631207671aca506e93ce7c5cfa0bec134c0a8e).
2024-04-27 20:46:09 +02:00
Matthias Krüger
8f962a6256
Rollup merge of #124434 - GKFX:remove-lazy-dependencies, r=jieyouxu
Remove lazycell and once_cell from compiletest dependencies

Use the standard library `OnceLock` instead of third-party equivalents. A macro is used for the regexes to make their initialization less unwieldy.
2024-04-27 20:46:09 +02:00
Matthias Krüger
0430e743e4
Rollup merge of #124425 - saethlin:ceci-nest-pas-une-ice, r=compiler-errors
Do not ICE on invalid consts when walking mono-reachable blocks

The `bug!` here was written under the logic of "this condition is impossible, right?" except that of course, if the compiler is given code that results in an compile error, then the situation is possible.

So now we just direct errors into the already-existing path for when we can't do a mono-time optimization.
2024-04-27 20:46:08 +02:00
Matthias Krüger
aeb4c0413c
Rollup merge of #124394 - gurry:123863-ice-unexpected-region, r=lcnr
Fix ICE on invalid const param types

Fixes ICE #123863 which occurs because the const param has a type which is not a `bool`, `char` or an integral type.

The ICEing code path begins here in `typeck_with_fallback`: cb3752d20e/compiler/rustc_hir_typeck/src/lib.rs (L167)

The `fallback` invokes the `type_of` query and that eventually ends up calling `ct_infer` from the lowering code over here:
cb3752d20e/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs (L561) and `ct_infer` ICEs at this location: cb3752d20e/compiler/rustc_hir_analysis/src/collect.rs (L392)

To fix the ICE it I'm triggering a `span_delayed_bug` before we hit `ct_infer` if the type of the const param is not one of the supported types

### Edit
On `@lcnr's` suggestion I've changed the approach to not let `ReStatic` region hit the `bug!` in `ct_infer` instead of triggering a `span_delayed_bug`.
2024-04-27 20:46:08 +02:00
Matthias Krüger
52ce43e9ac
Rollup merge of #124370 - ShE3py:substitution-part-offset, r=fee1-dead
Fix substitution parts having a shifted underline in some cases

If two suggestions parts are side by side, the underline's offset:
(WIP PR as an example, not yet pushed)
```
error: expected a pattern, found an expression
 --> ./main.rs:4:9
  |
4 |         1 + 2 => 3
  |         ^^^^^ arbitrary expressions are not allowed in patterns
  |
help: check the value in an arm guard
  |
4 |         n if n == 1 + 2 => 3
  |         ~     +++++++++++++
```
The emitter didn't take into account that the string had shrunk/grown if two substitution parts were side-by-side (surprisingly, there was only one case in the ui testsuite.)

```
help: check the value in an arm guard
  |
4 |         n if n == 1 + 2 => 3
  |         ~ +++++++++++++
```

``@rustbot`` label +A-suggestion-diagnostics
2024-04-27 20:46:07 +02:00
bors
825e831dc3 Auto merge of #124405 - RalfJung:miri-core-alloc-tests, r=clubby789
miri core/alloc tests: do not test a 2nd target

check-aux seems to be one of the slowest runners since we started running standard library tests in Miri on it. So maybe it'd be better to reduce test coverage a bit by not doing cross-target testing of core and alloc? I don't recall finding target-specific issues in these libraries ever (and we still have the extra test coverage via our [out-of-tree nightly tests](https://github.com/rust-lang/miri-test-libstd)). This gives us more buffer to deal with the fact that the number of tests we run will only grow over time.

Cc `@rust-lang/miri` `@rust-lang/infra`
2024-04-27 18:45:51 +00:00
Jubilee Young
fa73ebb303 Unconditionally call really_init
This makes miri not diverge in behavior, it fixes running Rust linux-gnu
binaries on musl with gcompat, it fixes dlopen edge-cases that cranelift
somehow hits, etc.
2024-04-27 11:33:15 -07:00
Rajveer
09c076810c Bootstrap: Check validity of --target and --host triples before starting a build
Resolves #122128
2024-04-27 23:50:48 +05:30
Martin Nordholts
4c2a7d17cf bootstrap: Change global(true) to global = true for flags for consistency
All other arg properties use the `prop = value` style, which makes it
slightly annoying to use the `prop(value)` style for `global`. Change to
`prop = value` also for `global` for consistency.
2024-04-27 19:30:57 +02:00
Martin Nordholts
4e83776731 bootstrap: Document struct Builder and its fields 2024-04-27 19:27:59 +02:00
Tobias Bucher
adebad1dce Elaborate in comment about statx probe
As requested by @workingjubilee in
https://github.com/rust-lang/rust/pull/123928#discussion_r1564916743.
2024-04-27 18:36:29 +02:00
JirCep
f840da757f WS fix. 2024-04-27 17:18:25 +02:00
JirCep
825a3b1f09 String.truncate calls Vec.truncate, in turn, and that states
"is greater or equal to". Beside common sense.
2024-04-27 16:57:20 +02:00
Jakub Beránek
a700897d5a
Add missing checkout step 2024-04-27 15:48:35 +02:00
bors
61a1dbd751 Auto merge of #124432 - zetanumbers:non_copy_into_raw_with_alloc, r=Nilstrieb
Relax `A: Clone` bound for `rc::Weak::into_raw_and_alloc`

Makes this method to behave the same way as [`Box::into_raw_with_allocator`](https://doc.rust-lang.org/1.77.2/alloc/boxed/struct.Box.html#method.into_raw_with_allocator) and [`Vec::into_raw_parts_with_alloc`](https://doc.rust-lang.org/1.77.2/alloc/vec/struct.Vec.html#method.into_raw_parts_with_alloc).

I have also noticed the inconsistent presence and naming, should probably be addressed in the future.
2024-04-27 13:41:45 +00:00
Lin Yihai
4faaa53392 doc: Replace mod.rs with the appropriate link 2024-04-27 21:22:04 +08:00
George Bateman
31af4f81ca
Remove lazycell and once_cell from compiletest dependencies 2024-04-27 12:38:51 +01:00
Jakub Beránek
163ea3328b
Move TOOLSTATE_REPO to top-level env 2024-04-27 11:36:42 +02:00
bors
261823eee7 Auto merge of #124430 - RalfJung:miri, r=RalfJung
Miri subtree update

r? `@ghost`
2024-04-27 09:32:46 +00:00
bors
c6bf9548d5 Auto merge of #12624 - J-ZhengLi:issue12586, r=xFrednet
fix [`large_stack_arrays`] linting in `vec` macro

fixes: #12586

this PR also adds a wrapper function `matching_root_macro_call` to `clippy_utils::macros`, considering how often that same pattern appears in the codebase.

(I'm always very indecisive towards naming, so, if anyone have better idea of how that function should be named, feel free to suggest it)

---

changelog: fix [`large_stack_arrays`] linting in `vec` macro; add `matching_root_macro_call` to clippy_utils
2024-04-27 09:30:20 +00:00
Daria Sukhonina
255a1e9554 Relax A: Clone bound for rc::Weak::into_raw_and_alloc 2024-04-27 12:21:23 +03:00
klensy
a8e0bcb336 clippy: bless tests 2024-04-27 10:54:35 +03:00
klensy
ce48c60c99 clippy: bless tests 2024-04-27 10:54:35 +03:00