Commit Graph

254398 Commits

Author SHA1 Message Date
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
Eduardo Sánchez Muñoz
b26153555f Do not implement x86 SIMD abs with host integers 2024-04-27 17:43:39 +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
Eduardo Sánchez Muñoz
b3b1b498b9 Clarify behavior of AVX2 gather when dest and offsets have different numbers of elements 2024-04-27 16:41:27 +02:00
Eduardo Sánchez Muñoz
ee47a8e6b6 Add doc comment to pack_generic 2024-04-27 16:23:44 +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
bors
45d93945ad Auto merge of #3520 - RalfJung:josh-check, r=RalfJung
josh rustc-pull: check that no new root commits get created

A second root was a bad sign in Miri (judging from the description in https://github.com/rust-lang/miri/pull/2583) and seems to be a [bad sign in RA](https://github.com/rust-lang/rust-analyzer/pull/17025#issuecomment-2080390014). So let's add this to the sanity checks.
2024-04-27 08:20:22 +00: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
klensy
411607bec4 tests: remove some trailing ws 2024-04-27 10:54:31 +03:00
bors
f5ceb4ed60 Auto merge of #3519 - hamirmahal:fix/usage-of-deprecated-version-of-nodejs, r=RalfJung
bump actions/cache to v4

fixes #3518.
2024-04-27 07:49:27 +00:00
Ralf Jung
6b6bc9805d io safety: update Unix explanation 2024-04-27 09:40:55 +02:00
bors
35194e76b7 Auto merge of #124428 - matthiaskrgr:rollup-sk5z4z8, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #124382 (ast: Generalize item kind visiting)
 - #124387 (thread_local: be excruciatingly explicit in dtor code)
 - #124427 (Add missing tests for an ICE)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-27 07:28:53 +00:00
Hamir Mahal
39f7a46d63
fix: usage of deprecated version of Node.js 2024-04-27 00:15:39 -07:00
Ralf Jung
2681edf934 josh rustc-pull: check that no new root commits get created 2024-04-27 08:57:55 +02:00
Matthias Krüger
9a6bfc7bfc
Rollup merge of #124427 - gurry:122191-unhandled-type, r=matthiaskrgr
Add missing tests for an ICE

Fixes #122191
2024-04-27 07:55:38 +02:00
Matthias Krüger
7c5213cf0a
Rollup merge of #124387 - workingjubilee:use-raw-pointers-in-thread-locals, r=joboet
thread_local: be excruciatingly explicit in dtor code

Use raw pointers to accomplish internal mutability, and clearly split references where applicable. This reduces the likelihood that any of these parts are misunderstood, either by humans or the compiler's optimizations.

Fixes #124317

r? ``@joboet``
2024-04-27 07:55:38 +02:00
Matthias Krüger
cf07246ae9
Rollup merge of #124382 - petrochenkov:itemvisit, r=lcnr
ast: Generalize item kind visiting

And avoid duplicating logic for visiting `Item`s with different kinds (regular, associated, foreign).

The diff is better viewed with whitespace ignored.
2024-04-27 07:55:37 +02:00
Gurinder Singh
fc73b4c344 Add missing tests for an ICE 2024-04-27 11:02:15 +05:30
Gurinder Singh
c62bc31b16 Fix ICE on invalid const param types 2024-04-27 09:36:38 +05:30
Ben Kimock
82cc02a60b Do not ICE on invalid consts when walking mono-reachable blocks 2024-04-26 23:06:21 -04:00
bors
9ac33d9c33 Auto merge of #124416 - weihanglo:update-cargo, r=weihanglo
Update cargo

9 commits in c9392675917adc2edab269eea27c222b5359c637..b60a1555155111e962018007a6d0ef85207db463
2024-04-23 19:35:19 +0000 to 2024-04-26 16:37:29 +0000
- fix(toml): Remove underscore field support in 2024 (rust-lang/cargo#13804)
- fix: emit 1.77 syntax error only when msrv is incompatible (rust-lang/cargo#13808)
- docs(ref): Index differences between virtual / real manifests (rust-lang/cargo#13794)
- refactor(toml): extract dependency-to-source-id to function (rust-lang/cargo#13802)
- Add where lint was set (rust-lang/cargo#13801)
- fix(toml): Don't double-warn when underscore is used in workspace dep (rust-lang/cargo#13800)
- fix(toml): Be more forceful with underscore/dash redundancy (rust-lang/cargo#13798)
- Fix warning suppression for config.toml vs config compat symlinks (rust-lang/cargo#13793)
- Cleanup linting system (rust-lang/cargo#13797)

r? ghost
2024-04-27 02:30:40 +00:00
Jubilee
c63b0ceb94
thread_local: refine LazyKeyInner::take safety doc
Co-authored-by: joboet <jonasboettiger@icloud.com>
2024-04-26 18:28:46 -07:00
bors
80d1c8349a Auto merge of #124424 - jhpratt:rollup-o3ngkjy, r=jhpratt
Rollup of 5 pull requests

Successful merges:

 - #124341 (resolve: Remove two cases of misleading macro call visiting)
 - #124383 (Port run-make `--print=native-static-libs` to rmake.rs)
 - #124391 (`rustc_builtin_macros` cleanups)
 - #124408 (crashes: add more tests)
 - #124410 (PathBuf: replace transmuting by accessor functions)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-27 00:26:48 +00:00