Commit Graph

220917 Commits

Author SHA1 Message Date
clubby789
901f10899c Add #[inline] to CStr trait implementations 2023-03-28 01:09:31 +01:00
bors
5bf139e360 Auto merge of #109440 - WaffleLapkin:make_tidy_slower, r=jyn514
Don't skip all directories when tidy-checking

This fixes a regression from https://github.com/rust-lang/rust/pull/108772 which basically made it that tidy style checks only `README.md` and `COMPILER_TESTS.md`.
2023-03-27 22:19:56 +00:00
Michael Goulet
f738b44c6d no shadow plz 2023-03-27 20:47:15 +00:00
bors
2036fdd24f Auto merge of #109668 - GuillaumeGomez:rollup-j01if4b, r=GuillaumeGomez
Rollup of 6 pull requests

Successful merges:

 - #109330 (rustdoc: Fix ICE for intra-doc link on intermediate re-export)
 - #109354 (Remove the `NodeId` of `ast::ExprKind::Async`)
 - #109445 (Allow passing the --nocapture flag to compiletest)
 - #109512 (bump `askama_derive` to 0.12.1)
 - #109637 (Add missing needs-asm-support annotation to ui/simple_global_asm.rs)
 - #109666 (Correct ASCII case comment)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-03-27 19:44:36 +00:00
Maybe Waffle
904dd2c398 Bless tidy 2023-03-27 18:58:07 +00:00
Maybe Waffle
8af42f695d Remove useless Clone bounds 2023-03-27 18:52:47 +00:00
Maybe Waffle
436afdf1fe Don't skip all directories when tidy-checking 2023-03-27 18:52:47 +00:00
Maybe Waffle
3c4fabc341 Improve documentation for E0223 2023-03-27 18:00:22 +00:00
Rémy Rakic
9f16a81bc8 update codegen test expectations
Changing the layout of the InitMask changed the const
allocations' hashes.
2023-03-27 17:44:33 +00:00
rustbot
7cba12c5a9 Update books 2023-03-27 13:00:59 -04:00
Guillaume Gomez
c0dec2bbe3
Rollup merge of #109666 - clubby789:ascii-case-comment, r=fee1-dead
Correct ASCII case comment

Fixes #109508
2023-03-27 18:56:22 +02:00
Guillaume Gomez
17f2c2bbd3
Rollup merge of #109637 - bjorn3:add_test_annotation, r=tmiasko
Add missing needs-asm-support annotation to ui/simple_global_asm.rs
2023-03-27 18:56:21 +02:00
Guillaume Gomez
bb96606f8b
Rollup merge of #109512 - fee1-dead-contrib:bump-askama_derive, r=Mark-Simulacrum
bump `askama_derive` to 0.12.1

Which uses syn 2.0.

cc #109302
2023-03-27 18:56:21 +02:00
Guillaume Gomez
df453d9528
Rollup merge of #109445 - Teapot4195:issue-109407-fix, r=ozkanonur
Allow passing the --nocapture flag to compiletest

closes #109407
2023-03-27 18:56:20 +02:00
Guillaume Gomez
b1e8be783f
Rollup merge of #109354 - Swatinem:rm-closureid, r=compiler-errors
Remove the `NodeId` of `ast::ExprKind::Async`

This is a followup to https://github.com/rust-lang/rust/pull/104833#pullrequestreview-1314537416.

In my original attempt, I was using `LoweringContext::expr`, which was not correct as it creates a fresh `DefId`.
It now uses the correct `DefId` for the wrapping `Expr`, and also makes forwarding `#[track_caller]` attributes more explicit.
2023-03-27 18:56:19 +02:00
Guillaume Gomez
52c8084f91
Rollup merge of #109330 - GuillaumeGomez:intermediate-reexport-intra-doc-ice, r=petrochenkov
rustdoc: Fix ICE for intra-doc link on intermediate re-export

Fixes https://github.com/rust-lang/rust/issues/109282.

This PR is based on #109266 as it includes its commit to make this work.

`@petrochenkov:` It was exactly as you predicted, adding the `DefId` to the attributes fixed the error for intermediate re-exports as well. Thanks a lot!

r? `@petrochenkov`
2023-03-27 18:56:19 +02:00
clubby789
9fc7eca935 Always set RUSTC_BOOTSTRAP with x doc 2023-03-27 17:12:18 +01:00
Rémy Rakic
a2be7a1bb4 readability tweaks 2023-03-27 16:04:05 +00:00
Rémy Rakic
a69642015a add more InitMask test coverage 2023-03-27 16:04:05 +00:00
Rémy Rakic
3f80529c64 make InitMask lazy for fully init/uninit cases
Avoid materializing bits in the InitMask bitset when a single value
would be enough: when the mask represents a fully initialized or fully
uninitialized const allocation.
2023-03-27 15:52:17 +00:00
David CARLIER
ed5c0f66ac socket ancillary data implementation for FreeBSD (from 13 and above).
introducing new build config as well.
2023-03-27 16:48:41 +01:00
Jamen Marz
73c34cbaf7 Add notes to non-structural const in pattern error message 2023-03-27 11:08:11 -04:00
clubby789
3e16c56ffc
Fix ASCII case comment 2023-03-27 16:06:54 +01:00
The 8472
41807938d2 fix advance_by impl for vec_deque and add tests 2023-03-27 16:03:30 +02:00
The 8472
9cd9da2cd1 update documentation 2023-03-27 16:03:30 +02:00
The 8472
e29b27b4a4 replace advance_by returning usize with Result<(), NonZeroUsize> 2023-03-27 16:03:14 +02:00
bors
dd19135b04 Auto merge of #109662 - matthiaskrgr:rollup-tk2g3jf, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #108625 (More config.toml.example cleanups)
 - #109418 (Rename 'src/bootstrap/native.rs' to llvm.rs)
 - #109580 (Remove some stale FIXMEs in new solver)
 - #109582 (Refactor: Separate `LocalRef` variant for not-evaluated-yet operands)
 - #109650 (Remove Nilstrieb from review rotation)
 - #109656 (Update cargo)
 - #109658 (Backport 1.68.1 and 1.68.2 release notes to `master`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-03-27 13:35:35 +00:00
Matthias Krüger
c3a428fb1a
Rollup merge of #109658 - rust-lang:pa-1.68.2-relnotes, r=pietroalbini
Backport 1.68.1 and 1.68.2 release notes to `master`
2023-03-27 15:32:43 +02:00
Matthias Krüger
297e3a1dae
Rollup merge of #109656 - weihanglo:update-cargo, r=weihanglo
Update cargo

9 commits in 15d090969743630bff549a1b068bcaa8174e5ee3..145219a9f089f8b57c09f40525374fbade1e34ae 2023-03-21 17:54:28 +0000 to 2023-03-27 01:56:36 +0000
- doc(contrib): missing quotation mark (rust-lang/cargo#11894)
- Update changelog for 1.68.2 (rust-lang/cargo#11893)
- Add the old github keys as revoked (rust-lang/cargo#11889)
- Update proptest (rust-lang/cargo#11886)
- Added new GitHub RSA Host Key (rust-lang/cargo#11883)
- doc: Fix registries.name.index for sparse (rust-lang/cargo#11880)
- docs(contrib): Replace architecture with redirects (rust-lang/cargo#11876)
- docs: fix typos in `cargo_compile/mod.rs` (rust-lang/cargo#11874)
- docs(contrub): Remove unused file (rust-lang/cargo#11873)

r? `@ghost`
2023-03-27 15:32:43 +02:00
Matthias Krüger
b885e5fdfc
Rollup merge of #109650 - Nilstrieb:i-will-not-review-your-code, r=albertlarsan68
Remove Nilstrieb from review rotation

I currently don't have enough time to be on rotation. You can still request a review from me and I may still steal PRs sometimes though.
2023-03-27 15:32:42 +02:00
Matthias Krüger
7f6b406fa1
Rollup merge of #109582 - scottmcm:local-ref-pending, r=oli-obk
Refactor: Separate `LocalRef` variant for not-evaluated-yet operands

As I was reading through this, I noticed that almost every place that was using this needed to distinguish between Some vs None in the match arm anyway, so thought that separating the cases at the variant level might be clearer instead.

I like how it ended up; let me know what you think!
2023-03-27 15:32:42 +02:00
Matthias Krüger
9c73bf9038
Rollup merge of #109580 - compiler-errors:new-solver-fixmes, r=lcnr
Remove some stale FIXMEs in new solver

Some FIXMEs are no longer needed
2023-03-27 15:32:41 +02:00
Matthias Krüger
3917644b0e
Rollup merge of #109418 - rohaquinlop:108240-rename-native.rs-to-llvm.rs, r=Mark-Simulacrum
Rename 'src/bootstrap/native.rs' to llvm.rs

Fixed #108240

Renamed 'native.rs' to 'llvm.rs', also moved `TestHelpers` to `test.rs`. Replaced all the `native.rs` occurrences at `src/bootstrap` files to `llvm.rs`
2023-03-27 15:32:41 +02:00
Matthias Krüger
84a7540a83
Rollup merge of #108625 - jyn514:config-toml-cleanups, r=albertlarsan68
More config.toml.example cleanups

- Link to more documentation
- Move `changelog-seen` into the "Global Settings" section
- Update incorrect comments on `llvm.link-shared` and `rust.debug-assertions`
- Use the correct default in the commented-out example more often
- Clarify that `docs` and `compiler-docs` only control the default, they're not a hard-off switch.
- Document `-vvv` and `local-rebuild`
- Minor improvements to doc-comments in config.toml.example

This also sets `download-rustc = false`; that was already the default, but it will be helpful in case the default changes (https://jyn.dev/2023/01/12/Bootstrapping-Rust-in-2023.html).
2023-03-27 15:32:40 +02:00
Mara Bos
6c72a002a6 Add test for span of implicit format args captures. 2023-03-27 14:57:02 +02:00
Mara Bos
769886cc35 Bless mir-opt tests.
(Only the lifetime spans changed.)
2023-03-27 14:57:02 +02:00
Mara Bos
7f395f1eff Bless UI tests. 2023-03-27 14:56:59 +02:00
Mara Bos
1b3fda4978 Use span of placeholders in format_args!() expansion. 2023-03-27 14:53:48 +02:00
Oli Scherer
5ae6caa0f0 Use the FnPtr trait to avoid implementing common traits via macros 2023-03-27 12:19:52 +00:00
Oli Scherer
9e27c6c133 Some tracing/instrument cleanups 2023-03-27 12:19:15 +00:00
lcnr
0c13565ca6 Add a builtin FnPtr trait 2023-03-27 12:16:54 +00:00
The 8472
69db91b8b2 Change advance(_back)_by to return usize instead of Result<(), usize>
A successful advance is now signalled by returning `0` and other values now represent the remaining number
of steps that couldn't be advanced as opposed to the amount of steps that have been advanced during a partial advance_by.

This simplifies adapters a bit, replacing some `match`/`if` with arithmetic. Whether this is beneficial overall depends
on whether `advance_by` is mostly used as a building-block for other iterator methods and adapters or whether
we also see uses by users where `Result` might be more useful.
2023-03-27 14:11:49 +02:00
Joshua Nelson
20ca24e3c5 More config.toml.example cleanups
- Link to more documentation
- Move `changelog-seen` into the "Global Settings" section
- Update incorrect comments on `llvm.link-shared` and
  `rust.debug-assertions`
- Use the correct default in the commented-out example more often
- Clarify that `docs` and `compiler-docs` only control the default,
  they're not a hard-off switch.
- Document `-vvv` and `local-rebuild`
- Minor improvements to doc-comments in config.toml.example

This also sets `download-rustc = false`; that was already the default,
but it will be helpful in case the default changes
(https://jyn.dev/2023/01/12/Bootstrapping-Rust-in-2023.html).
2023-03-27 07:07:49 -05:00
Raoul Strackx
64927b973b Fix LVI test post LLVM 16 update 2023-03-27 13:48:38 +02:00
Krasimir Georgiev
684e7a5461 llvm-wrapper: adapt for LLVM API change
Adapts the wrapper for the LLVM commit 377e1311d5.
2023-03-27 11:12:47 +00:00
Pietro Albini
32189d3d1a
backport 1.68.1 and 1.68.2 release notes to master 2023-03-27 13:03:04 +02:00
bors
553ecbe8ba Auto merge of #109652 - matthiaskrgr:rollup-pbw3hi3, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #97506 (Stabilize `nonnull_slice_from_raw_parts`)
 - #98651 (Follow C-RW-VALUE in std::io::Cursor example)
 - #102742 (Remove unnecessary raw pointer in __rust_start_panic arg)
 - #109587 (Use an IndexVec to debug fingerprints.)
 - #109613 (fix type suggestions in match arms)
 - #109633 (Fix "Directly go to item in search if there is only one result" setting)
 - #109635 (debuginfo: Get pointer size/align from tcx.data_layout instead of layout_of)
 - #109641 (Don't elaborate non-obligations into obligations)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-03-27 10:44:27 +00:00
Weihang Lo
24369232cc
Update cargo
9 commits in 15d090969743630bff549a1b068bcaa8174e5ee3..145219a9f089f8b57c09f40525374fbade1e34ae
2023-03-21 17:54:28 +0000 to 2023-03-27 01:56:36 +0000
- doc(contrib): missing quotation mark (rust-lang/cargo#11894)
- Update changelog for 1.68.2 (rust-lang/cargo#11893)
- Add the old github keys as revoked (rust-lang/cargo#11889)
- Update proptest (rust-lang/cargo#11886)
- Added new GitHub RSA Host Key (rust-lang/cargo#11883)
- doc: Fix registries.name.index for sparse (rust-lang/cargo#11880)
- docs(contrib): Replace architecture with redirects (rust-lang/cargo#11876)
- docs: fix typos in `cargo_compile/mod.rs` (rust-lang/cargo#11874)
- docs(contrub): Remove unused file (rust-lang/cargo#11873)
2023-03-27 16:06:25 +08:00
Matthias Krüger
6535e66fa5
Rollup merge of #109641 - compiler-errors:dont-elaborate-non-obl, r=oli-obk
Don't elaborate non-obligations into obligations

It's suspicious to elaborate a `PolyTraitRef` or `Predicate` into an `Obligation`, since the former does not have a param-env associated with it, but the latter does. This is a footgun that, while not being misused *currently* in the compiler, easily could be misused by someone less familiar with the elaborator's inner workings.

This PR just changes the API -- ideally, the elaborator wouldn't even have to deal with obligations if we're not elaborating obligations, but that would require a bit more abstraction than I could be bothered with today.
2023-03-27 08:46:55 +02:00
Matthias Krüger
2b7dc94535
Rollup merge of #109635 - Nilstrieb:debrrruginfo, r=compiler=errors
debuginfo: Get pointer size/align from tcx.data_layout instead of layout_of

This avoids some type interning and a query execution. It also just makes the code simpler.
2023-03-27 08:46:54 +02:00