242567 Commits

Author SHA1 Message Date
bors
fb5ed726f7 Auto merge of #119174 - compiler-errors:movability, r=cjgillot
Remove movability from `TyKind::Coroutine`

There's no reason to store movability in the generator struct directly. It is computed from the HIR, and can be pulled into a query to access when necessary.
2023-12-28 20:41:44 +00:00
Arpad Borsos
2480a0f3f6
Merge Coroutine lowering functions
Instead of having separate `make_async/etc_expr` functions, this merges them them into one, reducing code duplication a bit.
2023-12-28 21:24:24 +01:00
DaniPopes
7e3f5f858d
Use Result::flatten in catch_with_exit_code 2023-12-28 21:22:34 +01:00
DaniPopes
c7a67747d3
Use filter instead of filter_map in Parser::expected_one_of_not_found 2023-12-28 21:19:41 +01:00
Michael Goulet
2b69399fea make ClosureArgsParts not generic 2023-12-28 20:17:09 +00:00
Jakub Beránek
fdeb8c5027
Remove is_optional_tool from ToolBuild 2023-12-28 20:23:16 +01:00
Jakub Beránek
0e7f9ec2ca
Add change tracker entry 2023-12-28 20:23:12 +01:00
Martin Nordholts
7ca4e9fcb2 rustc_lint: Prevent triplication of 'unknown lint' lint 2023-12-28 19:46:51 +01:00
Martin Nordholts
741884dab2 rustc_lint: Prevent multiple 'incompatible with previous forbid' lints 2023-12-28 19:46:40 +01:00
Martin Nordholts
e0c626fbbc rustc_lint: Prevent multiple 'lint ignored' lints
Prevent multiple 'ignored unless specified at crate level' lints. The
multiplication happens because we run the same lint three times:
* In BuiltinCombinedEarlyLintPass
* In BuiltinCombinedPreExpansionLintPass
* In shallow_lint_levels_on

Only run the lint one time by checking the `lint_added_lints` bool.
2023-12-28 19:46:40 +01:00
Martin Nordholts
eef02c453f rustc_lint: Rename warn_about_weird_lints to lint_added_lints
So we can apply more kinds of lints to added lints without having to add
another parameter.
2023-12-28 19:46:40 +01:00
Martin Nordholts
a4bcd479cc rustc_error_codes: Update expected error in E0453.md 2023-12-28 19:46:40 +01:00
Philipp Krones
0217ac9da6
Update Cargo.lock 2023-12-28 19:33:21 +01:00
Philipp Krones
379b00ab77
Merge commit 'ac4c2094a6030530661bee3876e0228ddfeb6b8b' into clippy-subtree-sync 2023-12-28 19:33:07 +01:00
bors
ac4c2094a6 Auto merge of #12038 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: none
2023-12-28 18:25:36 +00:00
Philipp Krones
2a4c7d2b0f
Bump Clippy version -> 0.1.77 2023-12-28 19:21:01 +01:00
Philipp Krones
887278c40a
Bump nightly version -> 2023-12-28 2023-12-28 19:20:40 +01:00
Philipp Krones
9ff84af787
Merge remote-tracking branch 'upstream/master' into rustup 2023-12-28 19:20:18 +01:00
Emil Gardström
12dd5d1d0d
fix typo 2023-12-28 19:05:13 +01:00
bors
3ee6710954 Auto merge of #119384 - matthiaskrgr:rollup-hhz9ws0, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #119331 (rustdoc-search: count path edits with separate edit limit)
 - #119359 (Simplify Parser::ident_or_error)
 - #119376 (Add regression test for #106630)
 - #119379 (Update `parse_seq` doc)
 - #119380 (Don't suggest writing a bodyless arm if the pattern can never be a never pattern)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-12-28 17:54:35 +00:00
Matthias Krüger
e8831b6df8
Rollup merge of #119380 - ShE3py:match-never-pat, r=petrochenkov
Don't suggest writing a bodyless arm if the pattern can never be a never pattern

#118527 enabled arms to be bodyless for never patterns ; this PR removes the `,` and `}` suggestions for patterns that could never be never patterns.
2023-12-28 18:48:02 +01:00
Matthias Krüger
0b6e8f5324
Rollup merge of #119379 - ShE3py:parse-seq-doc, r=compiler-errors
Update `parse_seq` doc

Some doc changes I made while working on an issue.
2023-12-28 18:48:01 +01:00
Matthias Krüger
77c23b3e94
Rollup merge of #119376 - msrd0:regression-test-106630, r=petrochenkov
Add regression test for #106630

This PR adds a regression test for #106630. I was unsure where exactly to place the test or how to test it locally so please let me know if I should change something.
2023-12-28 18:48:01 +01:00
Matthias Krüger
54bcb07ab1
Rollup merge of #119359 - DaniPopes:ident-or-err, r=compiler-errors
Simplify Parser::ident_or_error

Avoid a nested `Result<T, PResult<T>>`.
2023-12-28 18:48:01 +01:00
Matthias Krüger
2f51bad66b
Rollup merge of #119331 - notriddle:notriddle/maxpatheditdistance, r=GuillaumeGomez
rustdoc-search: count path edits with separate edit limit

Avoids strange-looking results like this one, where the path component seems to be ignored:

![image](https://github.com/rust-lang/rust/assets/1593513/f0ef077a-6e09-4d67-a29d-8cabc1495f66)

Since the two are counted separately elsewhere, they should get their own limits, too. The biggest problem with combining them is that paths are loosely checked by not requiring every component to match, which means that if they are short and matched loosely, they can easily find "drunk typist" matches that make no sense, like this old result:

    std::collections::btree_map::itermut matching slice::itermut
    maxEditDistance = ("slice::itermut".length) / 3 = 14 / 3 = 4
    editDistance("std", "slice") = 4
    editDistance("itermut", "itermut") = 0
        4 + 0 <= 4 PASS

Of course, `slice::itermut` should not match stuff from btreemap. `slice` should not match `std`.

The new result counts them separately:

    maxPathEditDistance = "slice".length / 3 = 5 / 3 = 1
    maxEditDistance = "itermut".length / 3 = 7 / 3 = 2
    editDistance("std", "slice") = 4
        4 <= 1 FAIL

Effectively, this makes path queries less "typo-resistant". It's not zero, but it means `vec` won't match the `v1` prelude.

This commit also adds substring matching to paths. It's stricter than the substring matching in the main part, but loose enough that what I expect to match does.

Queries without parent paths are unchanged.
2023-12-28 18:48:00 +01:00
bohan
437f07b3cf add test for #117626 2023-12-29 01:13:54 +08:00
Michael Goulet
6b1a3ad4a6 Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
Michael Goulet
e24da8ea19 Movability doesn't need to be a query anymore 2023-12-28 16:35:01 +00:00
Michael Goulet
15ccf2e7bd Restore movability to SMIR 2023-12-28 16:35:01 +00:00
Michael Goulet
fcb42b42d6 Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
bjorn3
1dbb249844 Rustup to rustc 1.77.0-nightly (89e2160c4 2023-12-27) 2023-12-28 16:26:57 +00:00
bjorn3
4c0ad606d0 Sync from rust 89e2160c4ca5808657ed55392620ed1dbbce78d1 2023-12-28 15:55:42 +00:00
Jakub Beránek
8763f7ae7d
Remove --enable-missing-tools from configure.py 2023-12-28 16:08:39 +01:00
Jakub Beránek
23994e1d76
Remove --enable-missing-tools usage in CI 2023-12-28 16:08:39 +01:00
Tomasz Miąsko
8d77c2eab8 Don't validate / lint MIR before each pass
To avoid redundant work and verbose output in case of failures.
2023-12-28 15:32:54 +01:00
onur-ozkan
12190e5dd2 utilize the unused llvm-tools option
This field was not functioning as described in its comment in `config.example.toml`.
Also, updated the default value to `true` to keep the bootstrapping behavior as it was before.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-12-28 17:27:59 +03:00
Lieselotte
7d6cd6bf1f
Don't expect bodyless arms if the pattern can never be a never pattern 2023-12-28 15:02:17 +01:00
Dominic
a88c9a644c
Add regression test for #106630 2023-12-28 14:53:23 +01:00
Lieselotte
44bf2a32a5
Update parse_seq doc 2023-12-28 14:06:51 +01:00
bors
a63fd5ea6b Auto merge of #3244 - RalfJung:nan-nondet, r=RalfJung
NaN non-determinism for intrinsics and libm functions
2023-12-28 11:57:27 +00:00
Ralf Jung
771e47929f don't test unspecified case 2023-12-28 12:56:07 +01:00
Ralf Jung
ee42d1eb9f NaN non-determinism for SIMD intrinsics 2023-12-28 12:14:06 +01:00
Ralf Jung
0f98c0e610 add NaN-nondet to libm functions 2023-12-28 11:07:56 +01:00
Bernd Schmidt
6cf6139411 Change rustc_codegen_ssa's atomic_cmpxchg interface to return a pair of values 2023-12-28 09:40:47 +00:00
bors
f4d794ea0b Auto merge of #119368 - coder-s-cat:master, r=WaffleLapkin
Fix some comments
2023-12-28 09:33:44 +00:00
Ralf Jung
86198a15d7 make float intrinsics return non-deterministic NaN 2023-12-28 09:29:24 +01:00
cuishuang
1adf0c16ff Fix some comments
Signed-off-by: cuishuang <imcusg@gmail.com>
2023-12-28 12:23:14 +08:00
bors
928b3dac57 Auto merge of #119349 - zetanumbers:liveness-pass-refactor, r=WaffleLapkin
refactor(liveness): move walk_expr outside of every match branch
2023-12-28 02:00:02 +00:00
bors
8e34642262 Auto merge of #119336 - Zalathar:find-ancestor, r=petrochenkov
coverage: Unexpand spans with `find_ancestor_inside_same_ctxt`

Back in https://github.com/rust-lang/rust/pull/118525#discussion_r1412877621 it was observed that our `unexpand_into_body_span` now looks very similar to `Span::find_ancestor_inside`.

At the time I tried switching over, but doing so resulted in incorrect coverage mappings (or assertion failures), so I left a `FIXME` comment instead.

After some investigation, I identified the two problems with my original approach:
- I should have been using `find_ancestor_inside_same_ctxt` instead, since we want a span that's inside the body and has the same context as the body.
- For async functions, we were actually using the post-expansion body span, which is why we needed to forcibly set the unexpanded span's context to match the body span. For body spans produced by macro-expansion, we already have special-case code to detect this and use the pre-expansion call site as the body span. By making this code also detect async desugaring, I was able to end up with a body span that works properly with `find_ancestor_inside_same_ctxt`, avoiding the need to forcibly change the span context.
2023-12-28 00:04:05 +00:00
bors
0c2c93e78a Auto merge of #3240 - Jefffrey:tempfile, r=RalfJung
Support for tempfile crate on UNIX hosts

Reviving old PR: https://github.com/rust-lang/miri/pull/2720

Attempted to apply the changes as suggested by https://github.com/rust-lang/miri/pull/2720#issuecomment-1347867264

To fix tempfile to work for UNIX targets only and fall back to previous behaviour of only supporting default mode for Windows targets
2023-12-27 21:45:18 +00:00