Commit Graph

228073 Commits

Author SHA1 Message Date
Matthias Krüger
1dc29bbfd6
Rollup merge of #113089 - floriangru:mut_analyses_followup, r=oli-obk
Export AnalysisResults trait in rustc_mir_dataflow

Followup to https://github.com/rust-lang/rust/pull/108293
Re-exports the new trait defined in mentioned PR to make ResultsCursor::seek_before_primary_effect, ResultsCursor::seek_after_primary_effect... usable again outside the compiler itself.
2023-06-27 17:48:46 +02:00
Matthias Krüger
526326e10d
Rollup merge of #113079 - Zalathar:as-operand-id, r=oli-obk
Use `CoverageKind::as_operand_id` instead of manually reimplementing it

These two pieces of code are functionally equivalent to the `CoverageKind::as_operand_id` method that already exists, and is already used elsewhere in this file.

This slightly reduces the amount of code that manually pattern-matches on `CoverageKind`.
2023-06-27 17:48:46 +02:00
Matthias Krüger
1153aba3ec
Rollup merge of #113068 - clubby789:bootstrap-user-to-dist, r=jyn514
bootstrap: rename 'user' profile to 'dist'

Fixes #112074

Unfortunately a big chunk of the diff is adding `PartialEq/Eq/Debug` impls so we can `assert_eq` but I think better to have them in the long run.
For back compat, ensure `"maintainer"`, `"user"` and `"dist"` are all parsed as `Profile::Dist`.

r? `@jyn514`
cc `@AnakinSkywalkeer` who worked on the previous attempt at this
2023-06-27 17:48:45 +02:00
Matthias Krüger
e992895c1d
Rollup merge of #112978 - compiler-errors:bad-block-sugg, r=davidtwco
Add suggestion for bad block fragment error

Makes it a bit clearer how to fix this parser restriction
2023-06-27 17:48:45 +02:00
Matthias Krüger
9f2c21c11f
Rollup merge of #112518 - chenyukang:yukang-fix-112458, r=davidtwco
Detect actual span for getting unexpected token from parsing macros

Fixes #112458
2023-06-27 17:48:44 +02:00
许杰友 Jieyou Xu (Joe)
cef812bd95
Provide more context for rustc +nightly -Zunstable-options on stable 2023-06-27 23:23:33 +08:00
bors
3c554f5cb4 Auto merge of #112516 - erikdesjardins:loop, r=davidtwco
cg_llvm: use index-based loop in write_operand_repeatedly

This should be easier for LLVM to analyze.

Fixes #111603

This needs a perf run.

[cc](https://github.com/rust-lang/rust/issues/111603#issuecomment-1567531178) `@caojoshua`
2023-06-27 15:01:56 +00:00
Oli Scherer
b0142f603d
Avoid calling queries during query stack printing 2023-06-27 16:12:07 +02:00
Philipp Krones
5d3377dd67
Add regression test for OOM issue on EarlyLintPass ICE 2023-06-27 16:11:49 +02:00
Takayuki Maeda
8352c02fc2 avoid using format!("{}", ..) 2023-06-27 22:12:29 +09:00
bors
662388e17f Auto merge of #2943 - cbeuw:patch-1, r=oli-obk
Add missed trophy

https://github.com/vorner/arc-swap/issues/76 appears to have been missed
2023-06-27 13:11:58 +00:00
Takayuki Maeda
1b7efb5ade remove an unused struct ForbiddenNonLifetimeParam 2023-06-27 22:11:54 +09:00
Andy Wang
c91fb780a4
Add trophy
Appears to have been missed
2023-06-27 14:41:30 +02:00
Guillaume Gomez
b8e4c54ffb Fix invalid HTML DIV tag used in HEAD 2023-06-27 14:33:04 +02:00
Petr Sumbera
35cfac1e2b [PATCH] Fix build on Solaris where fd-lock cannot be used. 2023-06-27 14:28:44 +02:00
Rageking8
48544c1b12 Make rustc_on_unimplemented std-agnostic 2023-06-27 18:13:24 +08:00
bors
f42f19b6d3 Auto merge of #113078 - saethlin:mention-the-function, r=RalfJung
Mention the panic function in CheckAlignment

Per https://github.com/rust-lang/rust/pull/112599#discussion_r1242333935
r? `@RalfJung`
2023-06-27 09:43:37 +00:00
bors
b56777352c Auto merge of #2942 - oli-obk:ui_test_bump, r=RalfJung
Make `--quiet` actually do something

address review from https://github.com/rust-lang/miri/pull/2941#discussion_r1242038723
2023-06-27 09:42:24 +00:00
Florian Groult
3224ea4424 Export AnalysisResults trait in rustc_mir_dataflow 2023-06-27 11:35:32 +02:00
Maybe Waffle
c60fb12a35 thir: Add Become expression kind 2023-06-27 09:03:05 +00:00
Anthony Kalaitzis
09f05489e3 Add passing & failing test for bultin dyn trait generation 2023-06-27 17:52:26 +09:30
Oli Scherer
0ba4cdb712 Make --quiet actually do something 2023-06-27 08:08:34 +00:00
Maybe Waffle
ef05533c39 Simplify some conditions 2023-06-27 07:40:47 +00:00
bors
95978b302c Auto merge of #113083 - matthiaskrgr:rollup-anbqpij, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #113039 (make custom mir ICE a bit nicer)
 - #113058 (Add/improve code comments)
 - #113063 (Update books)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-27 06:04:37 +00:00
Matthias Krüger
c396abe1bf
Rollup merge of #113063 - ehuss:update-books, r=ehuss
Update books

## nomicon

2 commits in b5f018fb5930cb733b0a8aaf2eed975d4771e74d..c369e4b489332f8721fbae630354fa83385d457d
2023-05-19 11:10:25 -0700 to 2023-06-04 23:21:07 +0900
- phantom-data: Add `Send` and `Sync` columns (rust-lang/nomicon#411)
- Rewrite the chapter on subtyping and variance (rust-lang/nomicon#340)

## reference

5 commits in 553d99b02a53b4133a40d5bd2e19958c67487c00..5ca365eac678cb0d41a20b3204546d6ed70c7171
2023-05-22 10:50:07 -0700 to 2023-06-22 10:13:08 -0700
- Document the ordering behavior of crate cfgs (rust-lang/reference#1369)
- fix incorrect syntax for type-paths (rust-lang/reference#1370)
- Fix inconsistent formatting of Disambiguating Function Calls example (rust-lang/reference#1366)
- Add LoongArch to inline-assembly documentation (rust-lang/reference#1357)
- comments: Fix typo: inner -> outer (rust-lang/reference#1364)

## book

1 commits in 8fa6b854d515506d825390fe0d817f5ef0c89350..21cf840842bdf768a798869f06373c96c1cc5122
2023-04-12 20:05:30 -0400 to 2023-06-12 12:24:06 -0400
- Correct `i32` formatting in ch19-05

## rust-by-example

10 commits in 8ee9528b72b927cff8fd32346db8bbd1198816f0..57636d6926762861f34e030d52ca25a71e95e5bf
2023-05-01 18:18:34 -0300 to 2023-06-20 21:49:11 -0300
- Fixed line number (rust-lang/rust-by-example#1723)
- Fix example in from_into.md (rust-lang/rust-by-example#1720)
- cast.md improvements for signed boundary case casting (rust-lang/rust-by-example#1719)
- Correct commentary about arrays in iter_find.md (rust-lang/rust-by-example#1714)
- Improved wording in asm.md (rust-lang/rust-by-example#1717)
- fix link to inline assembly reference (rust-lang/rust-by-example#1715)
- Fix grammar in string.md (rust-lang/rust-by-example#1713)
- Update let-else example with main function (rust-lang/rust-by-example#1711)
- Expand `Option::and_then` example to contrast with `map` (rust-lang/rust-by-example#1710)
- Add example for destructuring structs without match (rust-lang/rust-by-example#1709)

## rustc-dev-guide

9 commits in f1e637883fafeb83bdd5906ee7f467e4d35b7337..17fe3e948498c50e208047a750f17d6a8d89669b
2023-05-17 21:44:05 -0500 to 2023-06-26 18:34:26 +0200
- fix_typo
- run-make tests: fix and improve (rust-lang/rustc-dev-guide#1702)
- add stub for proof trees (rust-lang/rustc-dev-guide#1700)
- Update track_caller reference link (rust-lang/rustc-dev-guide#1688)
- Include information about setup defaults in how-to-build guide (rust-lang/rustc-dev-guide#1694)
- Fix typo (rust-lang/rustc-dev-guide#1697)
- Fix typo in thir.md
- Update triagebot links.
- name-resolution: Fix some typos in "Scopes and ribs"
2023-06-27 07:01:33 +02:00
Matthias Krüger
3238a97d39
Rollup merge of #113058 - GuillaumeGomez:improve-code-comments, r=notriddle
Add/improve code comments

Working on something else and did some small comments updates/adds.

r? `@notriddle`
2023-06-27 07:01:32 +02:00
Matthias Krüger
a144272eee
Rollup merge of #113039 - matthiaskrgr:custom_mir, r=compiler-errors
make custom mir ICE a bit nicer
2023-06-27 07:01:32 +02:00
bors
b5e51db16d Auto merge of #112938 - compiler-errors:clause-3, r=oli-obk
Migrate `TyCtxt::predicates_of` and `ParamEnv::caller_bounds` to `Clause`

The last big change in the series.

I will follow-up with additional filed issues once this PR lands:
- [ ] Investigate making `TypeFoldable<TyCtxt<'tcx>> for ty::Clause<'tcx>` implementation less weird: 2efe091705/compiler/rustc_middle/src/ty/structural_impls.rs (L672)
- [ ] Clean up the elaborator since it should only be emitting child clauses, not predicates
- [ ] Rename identifiers like `pred` and `predicates` to `clause` if they're actually clauses around the codebase
- [ ] Validate that all of the `ToPredicate` impls are acutally still needed, or prune them if they're not

r? `@ghost` until the other branch lands
2023-06-27 03:14:45 +00:00
Zalathar
fbb2079a24 Use CoverageKind::as_operand_id instead of manually reimplementing it 2023-06-27 12:51:42 +10:00
Ben Kimock
cdaac8799b Mention the panic function in CheckAlignment 2023-06-26 22:20:41 -04:00
bors
b9ad9b78a2 Auto merge of #112693 - ericmarkmartin:use-more-placeref, r=spastorino
Use PlaceRef abstractions more often

Associated issue: https://github.com/rust-lang/rust/issues/80647

r? `@spastorino`
2023-06-27 00:34:49 +00:00
Michael Goulet
374173cd99 TypeWellFormedInEnv 2023-06-26 23:12:04 +00:00
Michael Goulet
fbdef58414 Migrate predicates_of and caller_bounds to Clause 2023-06-26 23:12:03 +00:00
clubby789
85c4ea0138 bootstrap: rename 'user' profile to 'dist' 2023-06-26 22:54:47 +00:00
bors
2a15bdaaa1 Auto merge of #112969 - CryZe:patch-7, r=Mark-Simulacrum
Update wasi-libc

This updates wasi-libc to the latest master.

Resolves #112749
2023-06-26 21:51:03 +00:00
Tshepang Mbambo
6bab85a456
str docs: remove "Basic usage" text where not useful
Not "useful" in that there is only one example given
2023-06-26 22:11:13 +02:00
Michael Goulet
724f3ff50d migrate lifetime too 2023-06-26 19:14:49 +00:00
Michael Goulet
26cd5486f8 Account for late-bound vars from parent arg-position impl trait 2023-06-26 19:14:27 +00:00
bors
36fb58e433 Auto merge of #113057 - TaKO8Ki:rollup-071lc9g, r=TaKO8Ki
Rollup of 2 pull requests

Successful merges:

 - #112677 (remove unused field)
 - #112920 (rustdoc: render generic params & where-clauses of cross-crate assoc tys in impls)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-26 18:42:01 +00:00
Matthias Krüger
c6e6ceb078 make custom mir ICE a bit nicer 2023-06-26 19:23:22 +02:00
Camille GILLOT
3d9ba07a0e Use constness query to encode constness. 2023-06-26 16:45:41 +00:00
Camille GILLOT
cbe1578690 Encode info for Fn/AssocFn in a single place. 2023-06-26 16:45:01 +00:00
Eric Huss
20c46f0ef1 Update books 2023-06-26 09:44:26 -07:00
Jakub Beránek
7fb559353e
CI: do not cancel concurrent builds on the same branch
Instead, only cancel them if the builds have the same commit SHA.
2023-06-26 16:40:12 +02:00
Guillaume Gomez
32f056ce6b Add/improve code comments 2023-06-26 16:38:14 +02:00
Takayuki Maeda
40e3fcfd59
Rollup merge of #112920 - fmease:rustdoc-fix-112904, r=GuillaumeGomez
rustdoc: render generic params & where-clauses of cross-crate assoc tys in impls

We used to only ever render generic parameters & where-clauses of cross-crate associated types when the item was located inside of a trait and we used to just drop them when it was inside of an impl block (trait or inherent).

Fixes #112904.

`@rustbot` label A-cross-crate-reexports
2023-06-26 23:16:16 +09:00
Takayuki Maeda
c6a4d44977
Rollup merge of #112677 - the8472:remove-unusued-field, r=JohnTitor
remove unused field

Followup to #104455. The field is no longer needed since ExtractIf (previously DrainFilter) doesn't keep draining in its drop impl.
2023-06-26 23:16:16 +09:00
bors
6f8c27ae89 Auto merge of #112887 - WaffleLapkin:become_unuwuable_in_hir, r=compiler-errors,Nilstrieb
`hir`: Add `Become` expression kind (explicit tail calls experiment)

This adds `hir::ExprKind::Become` alongside ast lowering. During hir-thir lowering we currently lower `become` as `return`, so that we can partially test `become` without ICEing.

cc `@scottmcm`
r? `@Nilstrieb`
2023-06-26 13:51:04 +00:00
bors
27e10c5292 Auto merge of #113049 - matthiaskrgr:rollup-41wo5w8, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #111326 (Add support for NetBSD/aarch64-be (big-endian arm64).)
 - #112559 (Add esp-idf missing targets)
 - #112840 (doc: loongarch: Update maintainers)
 - #112955 (CI: cancel in-progress workflow runs after a push)
 - #112979 (Rewrite most diagnostics as translatable within resolve/imports)
 - #113034 (Switch some more Steps to `builder.msg`)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-26 10:15:16 +00:00
Matthias Krüger
5122e88b35
Rollup merge of #113034 - jyn514:ci-progress, r=oli-obk
Switch some more Steps to `builder.msg`

In particular, this hides compiletest suites under a dropdown - some builders are configured with `verbose-tests`, which makes the suites take up many thousands of lines.

before:
```
Documenting stage1 cargo (x86_64-unknown-linux-gnu)
Check compiletest suite=rustdoc-js mode=js-doc-test (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
```

after:
```
::group::Documenting stage1 cargo (x86_64-unknown-linux-gnu)
::group::Testing stage1 compiletest suite=rustdoc-js mode=js-doc-test (x86_64-unknown-linux-gnu)
```

found this from https://github.com/rust-lang-ci/rust/actions/runs/5366993848/jobs/9736792611

r? `@oli-obk`
2023-06-26 11:58:46 +02:00