Commit Graph

236875 Commits

Author SHA1 Message Date
bors
3932c87718 Auto merge of #116950 - cuviper:ci-llvm-17, r=Mark-Simulacrum
ci: add a runner for vanilla LLVM 17

For CI cost, this can be seen as replacing the llvm-14 runner we dropped in #114148.

Also, I've set `IS_NOT_LATEST_LLVM` in the llvm-16 runner, since that's not the latest anymore.
2023-10-22 06:15:18 +00:00
The Miri Conjob Bot
1f09dd21b7 Merge from rustc 2023-10-22 05:36:24 +00:00
The Miri Conjob Bot
193fec640d Preparing for merge from rustc 2023-10-22 05:29:24 +00:00
bors
cc3dce5bd0 Auto merge of #116956 - Amanieu:hashbrown-0.14.2, r=Mark-Simulacrum
Update hashbrown to 0.14.2

Fixes #116880
2023-10-22 03:55:24 +00:00
bors
9e3f784eb2 Auto merge of #116932 - Kobzol:fix-stage1-tests, r=Mark-Simulacrum
Fix x86_64-gnu-llvm-15 CI tests

The CI script was broken - if there was a test failure in the first command chain (inside the `if`), CI would not report the failure.

It happened because there were two command chains separated by `&&` in the script, and since `set -e` doesn't exit for chained commands, if the first chain has failed, the script would happily continue forward, ignoring any test failures.

This could be fixed e.g. by adding some `|| exit 1` to the first chain, but I suppose that the `&&` chaining is unnecessary here anyway.

Reported [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/test.20failure.20didn't.20stop.20CI).

Fixes: https://github.com/rust-lang/rust/issues/116867
2023-10-22 02:00:29 +00:00
Cameron Ditchfield
65962708f8 fix what-to-include doc example
Fixes the second example in the Examples section of what-to-include.md  by marking main as a function.
2023-10-21 19:40:08 -05:00
bors
97a2894062 Auto merge of #117031 - bjorn3:sync_cg_clif-2023-10-21, r=bjorn3
Sync rustc_codegen_cranelift

The main highlights this time is new support for riscv64 linux enabled by a cranelift update. I have also updated some of the crates built as part of cg_clif's test suite which enabled removing several patches for them. And finally I have fixed a couple of tests in rustc's test suite with cg_clif.

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler +subtree-sync
2023-10-22 00:05:49 +00:00
Nadrieril
a134f1624c Fix #117033 2023-10-21 23:04:17 +02:00
bors
1c05d50c84 Auto merge of #117030 - matthiaskrgr:rollup-vdjfx4q, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #116312 (Initiate the inner usage of `cfg_match` (Compiler))
 - #116928 (fix bootstrap paths in triagebot.toml)
 - #116955 (Updated README with expandable table of content.)
 - #116981 (update the registers of csky target)
 - #116992 (Mention the syntax for `use` on `mod foo;` if `foo` doesn't exist)
 - #117026 (Fix broken link to Ayu theme in the rustdoc book)
 - #117028 (Remove unnecessary `all` in Box)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-10-21 20:35:02 +00:00
bjorn3
e07f47b6c5 Merge commit 'c07d1e2f88cb3b1a0604ae8f18b478c1aeb7a7fa' into sync_cg_clif-2023-10-21 2023-10-21 19:54:51 +00:00
Matthias Krüger
ddb59dc936
Rollup merge of #117028 - gimbles:patch-1, r=Dylan-DPC
Remove unnecessary `all` in Box
2023-10-21 21:23:02 +02:00
Matthias Krüger
4ebc81a521
Rollup merge of #117026 - rmehri01:fix_ayu_theme_link, r=notriddle
Fix broken link to Ayu theme in the rustdoc book

Fixes #116977
2023-10-21 21:23:02 +02:00
Matthias Krüger
31865b7bfb
Rollup merge of #116992 - estebank:issue-69492, r=oli-obk
Mention the syntax for `use` on `mod foo;` if `foo` doesn't exist

Newcomers might get confused that `mod` is the only way of defining scopes, and that it can be used as if it were `use`.

Fix #69492.
2023-10-21 21:23:01 +02:00
Matthias Krüger
a3b22e1cdb
Rollup merge of #116981 - Dirreke:csky-unknown-linux-gunabiv2, r=bjorn3
update the registers of csky target
2023-10-21 21:23:01 +02:00
Matthias Krüger
762f0dde26
Rollup merge of #116955 - claesgill:upd_readme_toc, r=Mark-Simulacrum
Updated README with expandable table of content.

Make it easier to navigate in the rather large README file.
2023-10-21 21:23:00 +02:00
Matthias Krüger
0d489f3314
Rollup merge of #116928 - onur-ozkan:update-triagebot, r=Mark-Simulacrum
fix bootstrap paths in triagebot.toml

ref #https://github.com/rust-lang/rust/pull/116881#issuecomment-1769730250
2023-10-21 21:23:00 +02:00
Matthias Krüger
d6ac149b4f
Rollup merge of #116312 - c410-f3r:try, r=Mark-Simulacrum
Initiate the inner usage of `cfg_match` (Compiler)

cc #115585

Dogfood to test the implementation and remove dependencies.
2023-10-21 21:22:59 +02:00
bjorn3
c07d1e2f88 Use same --remap-path-prefix as bootstrap for testing the rustc test suite
This allows removing the CFG_VIRTUAL_RUST_SOURCE_BASE_DIR hack and
re-enabling a fair amount of tests.
2023-10-21 19:01:08 +00:00
bors
85812004e2 Auto merge of #116368 - shepmaster:github-actions-m1, r=Mark-Simulacrum
Use GitHub Actions M1 builder for aarch64-apple-darwin

r? `@ghost`
2023-10-21 18:41:33 +00:00
bjorn3
62f6e84ac1
Merge pull request #1398 from bjorn3/riscv_support
Add riscv64 linux support
2023-10-21 20:16:33 +02:00
Gimbles
695beca219
Update boxed.rs 2023-10-21 23:41:32 +05:30
Ryan Mehri
af87180845 fix broken link to ayu theme in the rustdoc book 2023-10-21 10:53:35 -07:00
bjorn3
1848d25a83 Add shim for core::hint::spin_loop() on riscv64 2023-10-21 17:37:45 +00:00
bors
0d1664674a Auto merge of #116922 - Zalathar:unused, r=cjgillot
coverage: Emit mappings for unused functions without generating stubs

For a while I've been annoyed by the fact that generating coverage maps for unused functions involves generating a stub function at the LLVM level.

As I suspected, generating that stub function isn't actually necessary, as long as we specifically tell LLVM about the symbol names of all the functions that have coverage mappings but weren't codegenned (due to being unused).

---

There is some helper code that gets moved around in the follow-up patches, so look at the first patch to see the most important functional changes.

---

`@rustbot` label +A-code-coverage
2023-10-21 16:47:30 +00:00
bjorn3
78cd77f1f1 Give better error for unsupported asm!() 2023-10-21 16:47:14 +00:00
bjorn3
eb30083b69 Fix epilogue_noreturn for AArch64 2023-10-21 16:47:14 +00:00
bjorn3
55cc776731 Introduce asm_supported() helper 2023-10-21 16:47:14 +00:00
bjorn3
46388c1702 Re-enable all inline asm usage for the rustc tests 2023-10-21 16:46:45 +00:00
bjorn3
453ce49a6f Support inline asm on riscv64 2023-10-21 16:46:24 +00:00
bjorn3
04a3850317 Run tests for riscv64 2023-10-21 16:46:24 +00:00
Esteban Küber
2cca435717 Mention the syntax for use on mod foo; if foo doesn't exist
Newcomers might get confused that `mod` is the only way of defining
scopes, and that it can be used as if it were `use`.

Fix #69492.
2023-10-21 15:56:01 +00:00
dirreke
31daed1b64 update the registers of csky 2023-10-21 23:42:09 +08:00
bors
ad7b8a0820 Auto merge of #117021 - flip1995:clippyup, r=matthiaskrgr
Clippy subtree update

r? `@Manishearth`
2023-10-21 14:53:45 +00:00
Michael Howell
4851cc9380 rustdoc: avoid allocating strings primitive link printing
This is aimed at hitting the allocator less in a function that
gets called a lot.
2023-10-21 07:48:23 -07:00
bors
26f340a0d5 Auto merge of #117020 - matthiaskrgr:rollup-cg62m4h, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #106601 (Suggest `;` after bare `match` expression E0308)
 - #116975 (Move `invalid-llvm-passes` test to `invalid-compile-flags` folder)
 - #117019 (fix spans for removing `.await` on `for` expressions)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-10-21 12:58:16 +00:00
Philipp Krones
b8b55fe316
Update Cargo.lock (ui_test update) 2023-10-21 14:16:27 +02:00
Philipp Krones
24b3554e73
Merge commit '2b030eb03d9e5837440b1ee0b98c50b97c0c5889' into clippyup 2023-10-21 14:16:11 +02:00
Matthias Krüger
bd1046d26a
Rollup merge of #117019 - lukas-code:for-await, r=compiler-errors
fix spans for removing `.await` on `for` expressions

We need to use a span with the outer syntax context of a desugared `for` expression to join it with the `.await` span.

fixes https://github.com/rust-lang/rust/issues/117014
2023-10-21 13:58:34 +02:00
Matthias Krüger
3051dde87f
Rollup merge of #116975 - ojeda:move-invalid-test, r=Nilstrieb
Move `invalid-llvm-passes` test to `invalid-compile-flags` folder

Nowadays there is an `invalid-compile-flags` folder, thus move this one there.
2023-10-21 13:58:34 +02:00
Matthias Krüger
05e154fdb7
Rollup merge of #106601 - estebank:match-semi, r=cjgillot
Suggest `;` after bare `match` expression E0308

Fix #72634.
2023-10-21 13:58:33 +02:00
bors
2b030eb03d Auto merge of #11694 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: none
2023-10-21 11:48:55 +00:00
Philipp Krones
a585cda701
Bump nightly version -> 2023-10-21 2023-10-21 13:41:57 +02:00
Philipp Krones
5f031561ef
Merge remote-tracking branch 'upstream/master' into rustup 2023-10-21 13:41:46 +02:00
bjorn3
2f74b68617 Rustup to rustc 1.75.0-nightly (249624b50 2023-10-20) 2023-10-21 11:30:57 +00:00
bjorn3
f414e265a7 Sync from rust 249624b504 2023-10-21 11:26:32 +00:00
Lukas Markeffsky
ccc4638d73 fix spans for removing .await on for expressions 2023-10-21 13:18:00 +02:00
bors
786c94a4eb Auto merge of #116734 - Nadrieril:lint-per-column, r=cjgillot
Lint `non_exhaustive_omitted_patterns` by columns

This is a rework of the `non_exhaustive_omitted_patterns` lint to make it more consistent. The intent of the lint is to help consumers of `non_exhaustive` enums ensure they stay up-to-date with all upstream variants. This rewrite fixes two cases we didn't handle well before:

First, because of details of exhaustiveness checking, the following wouldn't lint `Enum::C` as missing:
```rust
match Some(x) {
    Some(Enum::A) => {}
    Some(Enum::B) => {}
    _ => {}
}
```

Second, because of the fundamental workings of exhaustiveness checking, the following would treat the `true` and `false` cases separately and thus lint about missing variants:
```rust
match (true, x) {
    (true, Enum::A) => {}
    (true, Enum::B) => {}
    (false, Enum::C) => {}
    _ => {}
}
```
Moreover, it would correctly not lint in the case where the pair is flipped, because of asymmetry in how exhaustiveness checking proceeds.

A drawback is that it no longer makes sense to set the lint level per-arm. This will silently break the lint for current users of it (but it's behind a feature gate so that's ok).

The new approach is now independent of the exhaustiveness algorithm; it's a separate pass that looks at patterns column by column. This is another of the motivations for this: I'm glad to move it out of the algorithm, it was akward there.

This PR is almost identical to https://github.com/rust-lang/rust/pull/111651. cc `@eholk` who reviewed it at the time. Compared to then, I'm more confident this is the right approach.
2023-10-21 11:04:19 +00:00
bors
23af253fac Auto merge of #11539 - taiki-e:enforced-import-renames, r=Centri3
Warn missing_enforced_import_renames by default

Similar to https://github.com/rust-lang/rust-clippy/pull/8261 that did the same thing to disallowed_methods & disallowed_types.
This lint is also only triggered if import renames are defined in the `clippy.toml` file.

changelog: Moved [`missing_enforced_import_renames`] to `style` (Now warn-by-default)
[#11539](https://github.com/rust-lang/rust-clippy/pull/11539)
2023-10-21 10:40:29 +00:00
bors
6f97d838c6 Auto merge of #117013 - matthiaskrgr:rollup-mvgp54x, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #114521 (std: freebsd build update.)
 - #116911 (Suggest relaxing implicit `type Assoc: Sized;` bound)
 - #116917 (coverage: Simplify the injection of coverage statements)
 - #116961 (Typo suggestion to change bindings with leading underscore)
 - #116964 (Add stable Instance::body() and RustcInternal trait)
 - #116974 (coverage: Fix inconsistent handling of function signature spans)
 - #116990 (Mention `into_iter` on borrow errors suggestions when appropriate)
 - #116995 (Point at assoc fn definition on type param divergence)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-10-21 09:09:05 +00:00
Matthias Krüger
e9d18f5f78
Rollup merge of #116995 - estebank:issue-69944, r=compiler-errors
Point at assoc fn definition on type param divergence

When the number of type parameters in the associated function of an impl and its trait differ, we now *always* point at the trait one, even if it comes from a foreign crate. When it is local, we point at the specific params, when it is foreign, we point at the whole associated item.

Fix #69944.
2023-10-21 10:08:18 +02:00