Commit Graph

213571 Commits

Author SHA1 Message Date
Matthias Krüger
6c20a39bea
Rollup merge of #105910 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/nomicon

1 commits in ae406aa5287a9e025abb72343aaceec98458c117..dd37e21ccee43918ed18a71581bb2af537ffe4fc
2022-12-09 22:04:38 UTC to 2022-12-09 22:04:38 UTC

- Update lifetime-mismatch.md (rust-lang/nomicon#387)

## rust-lang/rust-by-example

3 commits in a9869b4a3c4cac3bc6099b41f088679e268400b8..995df09b65c582eb6290ab7ea5d9485983eb4c37
2022-12-08 23:29:31 UTC to 2022-12-08 23:28:31 UTC

- Add documentation for let-else. (rust-lang/rust-by-example#1640)
- Added missing space in comment (rust-lang/rust-by-example#1644)
- Clean up Chapter 1 (Hello World) (rust-lang/rust-by-example#1650)

## rust-lang/rustc-dev-guide

8 commits in e269950a57fa6fcda356426545fb5aa3691a7ced..8b42eb5f57d3d8ed2257a22d0e850d9db52afed3
2022-12-17 22:41:27 UTC to 2022-12-07 05:42:57 UTC

- Add -Ztrack-diagnostics information (rust-lang/rustc-dev-guide#1506)
- Add documentation for LLVM KCFI support (rust-lang/rustc-dev-guide#1529)
- Replace references to NoLandingPads in MIR pass documents (rust-lang/rustc-dev-guide#1531)
- share same link (rust-lang/rustc-dev-guide#1530)
- chore: Update `actions/github-script` to v6 (rust-lang/rustc-dev-guide#1521)
- fix: Fix broken links (rust-lang/rustc-dev-guide#1522)
- Remove TyS (rust-lang/rustc-dev-guide#1526)
- Fix small inaccuracy in monomorph page (rust-lang/rustc-dev-guide#1525)
2022-12-19 20:54:59 +01:00
Matthias Krüger
a81d0dc3cd
Rollup merge of #105902 - vincenzopalazzo:macros/pin_docs, r=eholk
docs: improve pin docs

Override https://github.com/rust-lang/rust/pull/104195 with a full cleanup of the git history, now it should be ready to be merged.

r? ``@eholk``

``@rustbot`` label +A-async-await
2022-12-19 20:54:59 +01:00
Matthias Krüger
f9bd7184e9
Rollup merge of #105895 - oli-obk:tait_coherence, r=lcnr
Test that we don't add a new kind of breaking change with TAITs

r? ``@lcnr``
2022-12-19 20:54:58 +01:00
Matthias Krüger
6e6ec81a91
Rollup merge of #105860 - Ezrashaw:add-long-errors-0460-0457, r=jruderman,GuillaumeGomez
Add long error docs for `E0460` and `E0457`

Final docs for errors in #61137 that have UI tests, my next PRs will also add these tests.

r? ``@GuillaumeGomez``
2022-12-19 20:54:57 +01:00
Matthias Krüger
3af45eeb98
Rollup merge of #105801 - zertosh:path_mut_os_str_doc_test, r=dtolnay
Realistic `Path::as_mut_os_str` doctest

With "Implement DerefMut for PathBuf" (#105018) now merged, it's
possible to exercise `Path::as_mut_os_str` (#105002) without going
through `into_boxed_path`.
2022-12-19 20:54:57 +01:00
Andrew Pollack
8441ca5d81
Revert "Replace usage of ResumeTy in async lowering with Context" 2022-12-19 11:24:59 -08:00
bors
935dc07218 Auto merge of #103600 - compiler-errors:early-binder-nits, r=spastorino
Address some `EarlyBinder` nits
2022-12-19 19:21:35 +00:00
Michael Goulet
8c86773fd3 Make fast-path for implied wf lint better 2022-12-19 19:04:55 +00:00
Guillaume Gomez
ecc8d007e4 Simplify CSS for code examples code blocks 2022-12-19 19:53:31 +01:00
Michael Howell
581cbe4135 rustdoc: remove width-limiter from source pages, stop overriding CSS 2022-12-19 11:40:22 -07:00
Rémy Rakic
5457db9410 add non-regression test for issue 105809 2022-12-19 18:27:13 +00:00
Michael Goulet
c40ededa10 Downgrade IMPLIED_BOUNDS_ENTAILMENT to warn by default, add it to builtin lint list 2022-12-19 18:16:22 +00:00
Michael Goulet
9c4cf8d9d0 Make Clippy test no longer unsound 2022-12-19 18:16:22 +00:00
Michael Goulet
96154d7fa7 Add IMPLIED_BOUNDS_ENTAILMENT lint 2022-12-19 18:16:22 +00:00
Michael Howell
f24c04c3f8 rustdoc: force pre tags to have the default line height
Fixes #105906
2022-12-19 10:23:46 -07:00
rustbot
9ab04a6b0c Update books 2022-12-19 12:01:02 -05:00
bors
7ab803891d Auto merge of #105698 - joboet:unsupported_threads_once, r=thomcc
Use a more efficient `Once` on platforms without threads

The current implementation uses an atomic queue and spins rather than panicking when calling `call_once` recursively. Since concurrency is not supported on platforms like WASM, `Once` can be implemented much more efficiently using just a single non-atomic state variable.
2022-12-19 16:46:57 +00:00
lcnr
a213bb36c9 implement the skeleton of the updated trait solver 2022-12-19 16:46:17 +00:00
Yiming Lei
bd12d151ee add function to tell if the current ambiguity error matches a previous one in ambiguity_errors
if 2 errors of the kind and ident and span of the ident, b1, b2 and misc1 misc2 are the same
then these 2 ambiguity errors matched
prevent identical ambiguity error from pushing into vector of ambiguity_errors
this will fix #105177
2022-12-19 08:38:05 -08:00
Marcus Calhoun-Lopez
ee1a905f00 Fix arch flag on i686-apple-darwin
i686-apple-darwin should use `-arch i386` instead of `-arch i686`
2022-12-19 08:34:06 -07:00
Rémy Rakic
8275d115fb Revert "Auto merge of #103880 - b-naber:field-ty-mir, r=lcnr"
This reverts commit 03770f0e2b, reversing
changes made to 01ef4b21dc.
2022-12-19 15:31:20 +00:00
Oli Scherer
e5c92bc2b6 Don't panic on stable since miri is not available there 2022-12-19 14:48:45 +00:00
ch-iv
7fc6b0c9f3
docs: improve pin docs
Co-authored-by: <@ch-iv>
2022-12-19 15:46:44 +01:00
Oli Scherer
e62b75ef5f Test that we don't add a new kind of breaking change with TAITs 2022-12-19 11:51:46 +00:00
Ezra Shaw
5ecac8ede6
more markdown list formatting
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2022-12-19 22:50:31 +13:00
bors
4653c93e44 Auto merge of #105892 - Dylan-DPC:rollup-eozolx4, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #105682 (Use `expose_addr()` in `fmt::Pointer`)
 - #105839 (Suggest a `T: Send` bound for `&mut T` upvars in `Send` generators)
 - #105864 (clippy::complexity fixes)
 - #105882 (Don't ICE in closure arg borrow suggestion)
 - #105889 (Fix `uninlined_format_args` in libtest)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-19 09:23:31 +00:00
Dylan DPC
2a57493fa1
Rollup merge of #105889 - Nilstrieb:fmt-libtest, r=thomcc
Fix `uninlined_format_args` in libtest

Done using clippy with a quick manual review.
2022-12-19 14:41:37 +05:30
Dylan DPC
3350ae9cef
Rollup merge of #105882 - compiler-errors:issue-105832, r=jackh726
Don't ICE in closure arg borrow suggestion

Fixes #105832
2022-12-19 14:41:36 +05:30
Dylan DPC
a9005b6cc0
Rollup merge of #105864 - matthiaskrgr:compl, r=Nilstrieb
clippy::complexity fixes

filter_next
needless_question_mark
bind_instead_of_map
manual_find
derivable_impls
map_identity
redundant_slicing
skip_while_next
unnecessary_unwrap
needless_bool

r? `@compiler-errors`
2022-12-19 14:41:35 +05:30
Dylan DPC
90035f130e
Rollup merge of #105839 - LegionMammal978:mut-upvar-not-send, r=lcnr
Suggest a `T: Send` bound for `&mut T` upvars in `Send` generators

Right now, we suggest a `T: Sync` bound for both `&T` and `&mut T` upvars. A user on URLO [found this confusing](https://users.rust-lang.org/t/error-complains-about-missing-sync-but-send-is-whats-missing/86021), so I wrote this quick fix to look at the mutability before making the suggestion.
2022-12-19 14:41:35 +05:30
Dylan DPC
f74bcfbdb1
Rollup merge of #105682 - thomcc:expose-ptr-fmt, r=RalfJung
Use `expose_addr()` in `fmt::Pointer`

Discussion in https://rust-lang.zulipchat.com/#narrow/stream/136281-t-lang.2Fwg-unsafe-code-guidelines/topic/Should.20.60fmt.3A.3APointer.60.20expose.20the.20argument.3F on whether or not we should do this (still undecided).

CC `@RalfJung`
2022-12-19 14:41:34 +05:30
nils
5fb2d63d07
Fix uninlined_format_args in libtest 2022-12-19 08:58:40 +01:00
bors
1072337890 Auto merge of #105845 - lqd:revert-thinlto-revert, r=Mark-Simulacrum
Re-enable ThinLTO for rustc on `x86_64-apple-darwin`

ThinLTO was disabled on x64 mac in https://github.com/rust-lang/rust/pull/105646 because of the https://github.com/rust-lang/rust/issues/105637 regression.

It was later discovered that the issue was present on other targets as well, as the mac revert was already landing. The linux/win reverts, however, did not land before the root cause was identified.

https://github.com/rust-lang/rust/pull/105800 fixed the underlying issue in `-Zdylib-lto` handling, and the x64 msvc and linux targets are now fixed, ICEs are using the correct `rustc_driver` panic hook.

This PR re-enables ThinLTO on mac for improved perf now that the issue should be fixed everywhere.
2022-12-19 06:25:22 +00:00
bors
224fa3907e Auto merge of #105884 - weihanglo:update-cargo, r=weihanglo
Update cargo

11 commits in cc0a320879c17207bbfb96b5d778e28a2c62030d..c994a4a638370bc7e0ffcbb0e2865afdfa7d4415 2022-12-14 14:46:57 +0000 to 2022-12-18 21:50:58 +0000
- Fix examples of proc-macro crates being scraped for examples (rust-lang/cargo#11497)
- Enable triagebot's relabel functionality (rust-lang/cargo#11498)
- Revert "temporarily disable test `lto::test_profile`" (rust-lang/cargo#11495)
- Bump to 0.69.0, update changelog (rust-lang/cargo#11493)
- Fix typo (rust-lang/cargo#11491)
- Display CPU info in CI (rust-lang/cargo#11488)
- Fix collision_doc_profile test error (rust-lang/cargo#11489)
- fix: Make auto-fix note work with `clippy` (rust-lang/cargo#11399)
- fix(add): use the possessive in error message (rust-lang/cargo#11483)
- Document home crate in contrib docs (rust-lang/cargo#11481)
- Split up registry documentation into multiple sections (rust-lang/cargo#11480)

r? `@ghost`
2022-12-19 03:36:34 +00:00
bors
a474ebbc4e Auto merge of #105883 - matthiaskrgr:rollup-v5n53t1, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #105419 (Add tests for #41731)
 - #105447 (Add a test for #103095)
 - #105842 (print argument name in arg mismatch if possible)
 - #105863 (Update browser-ui-test version to reduce GUI tests flakyness)
 - #105867 (remove redundant fn params that were only "used" in recursion)
 - #105869 (don't clone Copy types)
 - #105873 (use &str / String literals instead of format!())
 - #105879 (Revert "Introduce lowering_arena to avoid creating AST nodes on the fly")

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-19 01:13:58 +00:00
Weihang Lo
4ab78da50e
Update cargo
11 commits in cc0a320879c17207bbfb96b5d778e28a2c62030d..c994a4a638370bc7e0ffcbb0e2865afdfa7d4415
2022-12-14 14:46:57 +0000 to 2022-12-18 21:50:58 +0000
- Fix examples of proc-macro crates being scraped for examples (rust-lang/cargo#11497)
- Enable triagebot's relabel functionality (rust-lang/cargo#11498)
- Revert "temporarily disable test `lto::test_profile`" (rust-lang/cargo#11495)
- Bump to 0.69.0, update changelog (rust-lang/cargo#11493)
- Fix typo (rust-lang/cargo#11491)
- Display CPU info in CI (rust-lang/cargo#11488)
- Fix collision_doc_profile test error (rust-lang/cargo#11489)
- fix: Make auto-fix note work with `clippy` (rust-lang/cargo#11399)
- fix(add): use the possessive in error message (rust-lang/cargo#11483)
- Document home crate in contrib docs (rust-lang/cargo#11481)
- Split up registry documentation into multiple sections (rust-lang/cargo#11480)
2022-12-18 23:41:09 +00:00
Matthias Krüger
1da4a49912 clippy::complexity fixes
filter_next
needless_question_mark
bind_instead_of_map
manual_find
derivable_impls
map_identity
redundant_slicing
skip_while_next
unnecessary_unwrap
needless_bool
2022-12-19 00:04:28 +01:00
Matthias Krüger
87a4694825
Rollup merge of #105879 - Nilstrieb:revert-hir-arena, r=oli-obk
Revert "Introduce lowering_arena to avoid creating AST nodes on the fly"

This reverts commit d9a1faaa9c (#101499).

This was originally part of #101345 which has now been closed as a different approach is taken now.

r? `@oli-obk`

cc `@spastorino`
2022-12-18 23:03:08 +01:00
Matthias Krüger
ebe3563764
Rollup merge of #105873 - matthiaskrgr:clippy_fmt, r=Nilstrieb
use &str / String literals instead of format!()
2022-12-18 23:03:07 +01:00
Matthias Krüger
221e71e7a1
Rollup merge of #105869 - matthiaskrgr:clone_on_copy, r=compiler-errors
don't clone Copy types
2022-12-18 23:03:07 +01:00
Matthias Krüger
e96166eb42
Rollup merge of #105867 - matthiaskrgr:rec_param, r=compiler-errors
remove redundant fn params that were only "used" in recursion
2022-12-18 23:03:06 +01:00
Matthias Krüger
be48d21938
Rollup merge of #105863 - GuillaumeGomez:update-browser-ui-test, r=notriddle
Update browser-ui-test version to reduce GUI tests flakyness

Part of https://github.com/rust-lang/rust/issues/93784.

r? `@notriddle`
2022-12-18 23:03:06 +01:00
Matthias Krüger
f5656ad3c7
Rollup merge of #105842 - compiler-errors:arg-name-sugg, r=petrochenkov
print argument name in arg mismatch if possible

A bit more contextual than just `/* value */`, at least when the argument is named something related to its context.

The UI test cases are... not super convincing, but also they're minimized tests.
2022-12-18 23:03:05 +01:00
Matthias Krüger
e8fdd6912f
Rollup merge of #105447 - TaKO8Ki:add-test-for-103095, r=petrochenkov
Add a test for #103095

closes #103095
2022-12-18 23:03:05 +01:00
Matthias Krüger
1ca43d4b3d
Rollup merge of #105419 - YC:issue-41731, r=petrochenkov
Add tests for #41731

Closes #41731
2022-12-18 23:03:04 +01:00
bors
2b094b1ede Auto merge of #105446 - erikdesjardins:vt-size, r=nikic
Add 0..=isize::MAX range metadata to size loads from vtables

This is the (much belated) size counterpart to #91569.

Inspired by https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/Range.20metadata.20for.20.60size_of_val.60.20and.20other.20isize.3A.3AMAX.20limits. This could help optimize layout computations based on the size of a dyn trait. Though, admittedly, adding this to vtables wouldn't be as beneficial as adding it to slice len, which is used much more often.

Miri detects this UB already: b7cc99142a/compiler/rustc_const_eval/src/interpret/traits.rs (L119-L121)
(In fact Miri goes further, [assuming a 48-bit address space on 64-bit platforms](9db224fc90/compiler/rustc_abi/src/lib.rs (L312-L331)), but I don't think we can assume that in an optimization.)
2022-12-18 22:01:39 +00:00
Michael Goulet
dd8897eb63 Don't ICE in closure arg borrow suggestion 2022-12-18 21:41:29 +00:00
Nilstrieb
8bfd6450c7 A few small cleanups for newtype_index
Remove the `..` from the body, only a few invocations used it and it's
inconsistent with rust syntax.

Use `;` instead of `,` between consts. As the Rust syntax gods inteded.
2022-12-18 21:47:28 +01:00
Nilstrieb
d679764fb6 Make #[debug_format] an attribute in newtype_index
This removes the `custom` format functionality as its only user was
trivially migrated to using a normal format.

If a new use case for a custom formatting impl pops up, you can add it
back.
2022-12-18 21:37:38 +01:00
Nilstrieb
91c3c2040c Make #[max] an attribute in newtype_index 2022-12-18 21:22:14 +01:00