]> git.lizzy.rs Git - rust.git/log
rust.git
20 months agorustdoc-json-types: Improve ItemSummary::path docs
Nixon Enraght-Moony [Fri, 28 Oct 2022 00:43:37 +0000 (01:43 +0100)]
rustdoc-json-types: Improve ItemSummary::path docs

20 months agoAuto merge of #103623 - matthiaskrgr:rollup-318yc1t, r=matthiaskrgr
bors [Thu, 27 Oct 2022 10:05:16 +0000 (10:05 +0000)]
Auto merge of #103623 - matthiaskrgr:rollup-318yc1t, r=matthiaskrgr

Rollup of 9 pull requests

Successful merges:

 - #103035 (Even nicer errors from assert_unsafe_precondition)
 - #103106 (Try to say that memory outside the AM is always exposed)
 - #103475 (Make param index generation a bit more robust)
 - #103525 (Move a wf-check into the site where the value is instantiated)
 - #103564 (library: allow some unused things in Miri)
 - #103586 (Process registered region obligation in `resolve_regions_with_wf_tys`)
 - #103592 (rustdoc: remove redundant CSS selector `.notable-traits .notable`)
 - #103593 (Remove an unused parser function (`Expr::returns`))
 - #103611 (Add test for issue 103574)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

20 months agoRollup merge of #103611 - Rageking8:fix-103574, r=lcnr
Matthias Krüger [Thu, 27 Oct 2022 07:25:12 +0000 (09:25 +0200)]
Rollup merge of #103611 - Rageking8:fix-103574, r=lcnr

Add test for issue 103574

Fixes #103574

Together with some slight formatting.

r? `@lcnr`

20 months agoRollup merge of #103593 - compiler-errors:nit-remove-returns, r=fee1-dead
Matthias Krüger [Thu, 27 Oct 2022 07:25:12 +0000 (09:25 +0200)]
Rollup merge of #103593 - compiler-errors:nit-remove-returns, r=fee1-dead

Remove an unused parser function (`Expr::returns`)

I removed the only usage in #97474

20 months agoRollup merge of #103592 - notriddle:notriddle/notable-traits-notable, r=GuillaumeGomez
Matthias Krüger [Thu, 27 Oct 2022 07:25:11 +0000 (09:25 +0200)]
Rollup merge of #103592 - notriddle:notriddle/notable-traits-notable, r=GuillaumeGomez

rustdoc: remove redundant CSS selector `.notable-traits .notable`

The margin was already being set to 0 only a few lines lower.

20 months agoRollup merge of #103586 - compiler-errors:issue-103573, r=jackh726
Matthias Krüger [Thu, 27 Oct 2022 07:25:11 +0000 (09:25 +0200)]
Rollup merge of #103586 - compiler-errors:issue-103573, r=jackh726

Process registered region obligation in `resolve_regions_with_wf_tys`

Fixes #103573

20 months agoRollup merge of #103564 - RalfJung:miri-unused, r=thomcc
Matthias Krüger [Thu, 27 Oct 2022 07:25:10 +0000 (09:25 +0200)]
Rollup merge of #103564 - RalfJung:miri-unused, r=thomcc

library: allow some unused things in Miri

Should help for https://github.com/rust-lang/rust/pull/102950.

20 months agoRollup merge of #103525 - oli-obk:const_impl_on_non_const_trait, r=lcnr
Matthias Krüger [Thu, 27 Oct 2022 07:25:10 +0000 (09:25 +0200)]
Rollup merge of #103525 - oli-obk:const_impl_on_non_const_trait, r=lcnr

Move a wf-check into the site where the value is instantiated

r? ``@lcnr``

20 months agoRollup merge of #103475 - oli-obk:generic_param_indices, r=lcnr
Matthias Krüger [Thu, 27 Oct 2022 07:25:09 +0000 (09:25 +0200)]
Rollup merge of #103475 - oli-obk:generic_param_indices, r=lcnr

Make param index generation a bit more robust

r? ````@lcnr````

While not really necessary for closure and anon const ids, it's strictly more correct

20 months agoRollup merge of #103106 - saethlin:from_exposed_docs, r=thomcc
Matthias Krüger [Thu, 27 Oct 2022 07:25:09 +0000 (09:25 +0200)]
Rollup merge of #103106 - saethlin:from_exposed_docs, r=thomcc

Try to say that memory outside the AM is always exposed

cc ``@Gankra`` ``@thomcc``

I want to confidently tell people that they can use `from_exposed_addr` to get a pointer for doing MMIO and/or other hardware interactions done with volatile reads/writes at particular addresses outside the Rust AM. Currently, the docs indicate that would be UB.

With this change, now the docs indicate that this is intended to be a valid use of `from_exposed_addr`.

r? ``@RalfJung``

20 months agoRollup merge of #103035 - saethlin:assert_unsafe_precondition3, r=thomcc
Matthias Krüger [Thu, 27 Oct 2022 07:25:08 +0000 (09:25 +0200)]
Rollup merge of #103035 - saethlin:assert_unsafe_precondition3, r=thomcc

Even nicer errors from assert_unsafe_precondition

For example, now running `cargo test` with this patch I get things like:
```
$ cargo +stage1 test
    Finished test [unoptimized + debuginfo] target(s) in 0.01s
     Running unittests src/lib.rs (target/debug/deps/malloc_buf-9d105ddf86862995)

running 5 tests
thread 'tests::test_null_buf' panicked at 'unsafe precondition violated: is_aligned_and_not_null(data) &&
    crate::mem::size_of::<T>().saturating_mul(len) <= isize::MAX as usize', /home/ben/rust/library/core/src/slice/raw.rs:93:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread panicked while panicking. aborting.
error: test failed, to rerun pass `--lib`

Caused by:
  process didn't exit successfully: `/tmp/malloc_buf-1.0.0/target/debug/deps/malloc_buf-9d105ddf86862995` (signal: 6, SIGABRT: process abort signal)
```

This is still not perfect, but these are better for another PR:
* `stringify!` is trying to do clever pretty-printing on the `expr` inside `assert_unsafe_precondition` and can even add a newline.
* It would be nice to print a bit more information about where the problem is. Perhaps this is `cfg_attr(debug_assertions, track_caller)`, or perhaps it the function name added to `Location`.

cc ``@RalfJung`` this is what I was thinking of for https://github.com/rust-lang/rust/pull/102732#discussion_r989068907

20 months agoAuto merge of #103601 - compiler-errors:no-opaque-probe-in-nll-relate, r=oli-obk
bors [Thu, 27 Oct 2022 07:24:39 +0000 (07:24 +0000)]
Auto merge of #103601 - compiler-errors:no-opaque-probe-in-nll-relate, r=oli-obk

Remove `commit_if_ok` probe from NLL type relation

It was not really necessary to add the `commit_if_ok` in #100092 -- I added it to protect us against weird inference error messages due to recursive RPIT calls, but we are always on the error path when this happens anyways, and I can't come up with an example that makes this manifest.

Fixes #103599

r? `@oli-obk` since you reviewed #100092, feel free to re-roll.

:b: :loudspeaker:  beta-nominating this since it's on beta (which forks in ~a week~ two days :fearful:) -- worst case we could revert the original PR on beta and land this on nightly, to give it some extra soak time...

20 months agoAuto merge of #103605 - ehuss:mentions-spec, r=Mark-Simulacrum
bors [Thu, 27 Oct 2022 03:15:31 +0000 (03:15 +0000)]
Auto merge of #103605 - ehuss:mentions-spec, r=Mark-Simulacrum

Add Target Tier Policy notification.

This adds a notification posted to PRs when they add/modify a target spec.

This was hard-coded in highfive. I forgot to include this in https://github.com/rust-lang/rust/pull/103492.

20 months agoadd tests and slight formatting
Rageking8 [Thu, 27 Oct 2022 02:11:49 +0000 (10:11 +0800)]
add tests and slight formatting

20 months agoPrint the precondition we violated, and visible through output capture
Ben Kimock [Fri, 14 Oct 2022 03:01:58 +0000 (23:01 -0400)]
Print the precondition we violated, and visible through output capture

Co-authored-by: Ralf Jung <post@ralfj.de>
20 months agoAuto merge of #103604 - JohnTitor:rollup-q4ns2gh, r=JohnTitor
bors [Wed, 26 Oct 2022 23:58:24 +0000 (23:58 +0000)]
Auto merge of #103604 - JohnTitor:rollup-q4ns2gh, r=JohnTitor

Rollup of 10 pull requests

Successful merges:

 - #103432 (rustdoc: don't mark Box<T> as Iterator, Read, etc)
 - #103526 (More dupe typos again)
 - #103537 (rustdoc: combine shared CSS between `.*-line-numbers`)
 - #103549 (llvm-16: Don't initialize removed legacy passes)
 - #103558 (Update cargo)
 - #103567 (ptr::eq: clarify that comparing dyn Trait is fragile)
 - #103579 (:arrow_up: rust-analyzer)
 - #103580 (Fix typo in docs for `guaranteed_ne`)
 - #103596 (thread::set_name: debug-assert that things went well)
 - #103598 (rustc_lexer::TokenKind improve docs)

Failed merges:

 - #103585 (Migrate source line numbers CSS to CSS variables)

r? `@ghost`
`@rustbot` modify labels: rollup

20 months agoAdd Target Tier Policy notification.
Eric Huss [Wed, 26 Oct 2022 23:45:24 +0000 (16:45 -0700)]
Add Target Tier Policy notification.

20 months agoRollup merge of #103598 - tshepang:token-kind-docs, r=jackh726
Yuki Okushi [Wed, 26 Oct 2022 23:30:59 +0000 (08:30 +0900)]
Rollup merge of #103598 - tshepang:token-kind-docs, r=jackh726

rustc_lexer::TokenKind improve docs

20 months agoRollup merge of #103596 - RalfJung:thread-setname, r=cuviper
Yuki Okushi [Wed, 26 Oct 2022 23:30:59 +0000 (08:30 +0900)]
Rollup merge of #103596 - RalfJung:thread-setname, r=cuviper

thread::set_name: debug-assert that things went well

r? `@cuviper`

20 months agoRollup merge of #103580 - lukas-code:guaranteed_ne, r=GuillaumeGomez
Yuki Okushi [Wed, 26 Oct 2022 23:30:58 +0000 (08:30 +0900)]
Rollup merge of #103580 - lukas-code:guaranteed_ne, r=GuillaumeGomez

Fix typo in docs for `guaranteed_ne`

`==` -> `!=`

20 months agoRollup merge of #103579 - lnicola:rust-analyzer-2022-10-26, r=lnicola
Yuki Okushi [Wed, 26 Oct 2022 23:30:57 +0000 (08:30 +0900)]
Rollup merge of #103579 - lnicola:rust-analyzer-2022-10-26, r=lnicola

:arrow_up: rust-analyzer

r? ``@ghost``

20 months agoRollup merge of #103567 - RalfJung:ptr-eq-dyn-trait, r=dtolnay
Yuki Okushi [Wed, 26 Oct 2022 23:30:57 +0000 (08:30 +0900)]
Rollup merge of #103567 - RalfJung:ptr-eq-dyn-trait, r=dtolnay

ptr::eq: clarify that comparing dyn Trait is fragile

Also remove the dyn trait example from `ptr::eq` since those tests are not actually guaranteed to pass due to how unstable vtable comparison is.

Cc ``@rust-lang/libs-api``
Cc discussion following https://github.com/rust-lang/rust/pull/80505

20 months agoRollup merge of #103558 - weihanglo:update-cargo, r=weihanglo
Yuki Okushi [Wed, 26 Oct 2022 23:30:56 +0000 (08:30 +0900)]
Rollup merge of #103558 - weihanglo:update-cargo, r=weihanglo

Update cargo

5 commits in 071eeaf210708219a5a1b2c4728ca2f97df7f2ae..9210810d1fd7b51ae0439a0a363cc50e36963455 2022-10-22 01:17:55 +0000 to 2022-10-25 22:31:50 +0000

- Fix 410 gone response handling (rust-lang/cargo#11286)
- Fix inequality in "stale mtime" log messages (rust-lang/cargo#11281)
- doc(cargo-tree): mention it considering feature unification (rust-lang/cargo#11282)
- Improve the error message if `publish` is `false` or empty list (rust-lang/cargo#11280)
- Add test for deleted index entry (rust-lang/cargo#11278)

20 months agoRollup merge of #103549 - maurer:llvm-main, r=cuviper
Yuki Okushi [Wed, 26 Oct 2022 23:30:56 +0000 (08:30 +0900)]
Rollup merge of #103549 - maurer:llvm-main, r=cuviper

llvm-16: Don't initialize removed legacy passes

LLVM removed initialization for legacy passes:
https://reviews.llvm.org/D136615

20 months agoRollup merge of #103537 - notriddle:notriddle/line-numbers, r=GuillaumeGomez
Yuki Okushi [Wed, 26 Oct 2022 23:30:55 +0000 (08:30 +0900)]
Rollup merge of #103537 - notriddle:notriddle/line-numbers, r=GuillaumeGomez

rustdoc: combine shared CSS between `.*-line-numbers`

Example: https://notriddle.com/notriddle-rustdoc-demos/line-numbers/test_dingus/fn.test.html

This PR should result in no visible changes. The example is here, so it can be easily tested in different browsers.

20 months agoRollup merge of #103526 - Rageking8:more-dupe-typos-again, r=Mark-Simulacrum
Yuki Okushi [Wed, 26 Oct 2022 23:30:55 +0000 (08:30 +0900)]
Rollup merge of #103526 - Rageking8:more-dupe-typos-again, r=Mark-Simulacrum

More dupe typos again

There are some others in submodules, which I will file separate PRs for in their respective repos. Thanks.

20 months agoRollup merge of #103432 - jsha:box-is-not-notable, r=GuillaumeGomez
Yuki Okushi [Wed, 26 Oct 2022 23:30:54 +0000 (08:30 +0900)]
Rollup merge of #103432 - jsha:box-is-not-notable, r=GuillaumeGomez

rustdoc: don't mark Box<T> as Iterator, Read, etc

Because Box<T> has pass-through implementations, rustdoc was giving it the "Notable Traits" treatment for Iterator, Read, Write, and Future, even when the type of T was unspecified.

Pin had the same problem, but just for Future.

Fixes #100320

20 months agoNo need to probe when relating opaques in nll_relate
Michael Goulet [Wed, 26 Oct 2022 22:09:48 +0000 (22:09 +0000)]
No need to probe when relating opaques in nll_relate

20 months agorustdoc: add test case for positioning of notable trait tooltip
Michael Howell [Wed, 26 Oct 2022 21:42:53 +0000 (14:42 -0700)]
rustdoc: add test case for positioning of notable trait tooltip

20 months agorustc_lexer::TokenKind improve docs
Tshepang Mbambo [Wed, 26 Oct 2022 21:32:14 +0000 (23:32 +0200)]
rustc_lexer::TokenKind improve docs

20 months agoAuto merge of #103571 - RalfJung:miri, r=RalfJung
bors [Wed, 26 Oct 2022 21:06:38 +0000 (21:06 +0000)]
Auto merge of #103571 - RalfJung:miri, r=RalfJung

update Miri

r? `@ghost`

20 months agothread::set_name: debug-assert that things went well
Ralf Jung [Wed, 26 Oct 2022 20:11:12 +0000 (22:11 +0200)]
thread::set_name: debug-assert that things went well

20 months agoremove unused parser fn
Michael Goulet [Wed, 26 Oct 2022 19:19:37 +0000 (19:19 +0000)]
remove unused parser fn

20 months agorustdoc: remove redundant CSS selector `.notable-traits .notable`
Michael Howell [Wed, 26 Oct 2022 19:15:58 +0000 (12:15 -0700)]
rustdoc: remove redundant CSS selector `.notable-traits .notable`

The margin was already being set to 0 only a few lines lower.

20 months agoAuto merge of #103492 - ehuss:highfive-triagebot, r=Mark-Simulacrum
bors [Wed, 26 Oct 2022 18:02:49 +0000 (18:02 +0000)]
Auto merge of #103492 - ehuss:highfive-triagebot, r=Mark-Simulacrum

Migrate from highfive to triagebot

This migrates rust-lang/rust from highfive to triagebot.

20 months agoProcess registered region obligation in resolve_regions_with_wf_tys
Michael Goulet [Wed, 26 Oct 2022 16:05:58 +0000 (16:05 +0000)]
Process registered region obligation in resolve_regions_with_wf_tys

20 months agoFix typo in docs for `guaranteed_ne`
Lukas Markeffsky [Wed, 26 Oct 2022 14:50:08 +0000 (16:50 +0200)]
Fix typo in docs for `guaranteed_ne`

20 months ago:arrow_up: rust-analyzer
Laurențiu Nicola [Wed, 26 Oct 2022 14:40:41 +0000 (17:40 +0300)]
:arrow_up: rust-analyzer

20 months agoUpdate library/core/src/ptr/mod.rs
Ben Kimock [Wed, 26 Oct 2022 14:14:20 +0000 (07:14 -0700)]
Update library/core/src/ptr/mod.rs

Co-authored-by: Ralf Jung <post@ralfj.de>
20 months agoAuto merge of #103572 - Dylan-DPC:rollup-a8bnxrw, r=Dylan-DPC
bors [Wed, 26 Oct 2022 14:12:16 +0000 (14:12 +0000)]
Auto merge of #103572 - Dylan-DPC:rollup-a8bnxrw, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #95710 (Stabilize arbitrary_enum_discriminant, take 2)
 - #102706 (Support excluding the generation of the standalone docs)
 - #103428 (Removed verbose printing from the `PrettyPrinter` when printing constants)
 - #103543 (Update books)
 - #103546 (interpret: a bit of cast cleanup)
 - #103554 (rustdoc: add visible focus outline to rustdoc-toggle)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

20 months agoexplicitly mention that both components of wide prts are compared
Ralf Jung [Wed, 26 Oct 2022 12:20:31 +0000 (14:20 +0200)]
explicitly mention that both components of wide prts are compared

20 months agoRollup merge of #103554 - notriddle:notriddle/summary-focus-visible, r=jsha
Dylan DPC [Wed, 26 Oct 2022 12:02:56 +0000 (17:32 +0530)]
Rollup merge of #103554 - notriddle:notriddle/summary-focus-visible, r=jsha

rustdoc: add visible focus outline to rustdoc-toggle

The change in opacity is inconsistent with most of rustdoc, which uses default browser styles for the focus outline. Unfortunately, just using the default focus outline here won't work, because it gets applied to the summary itself instead of the pseudo-element "real button."

Preview: https://notriddle.com/notriddle-rustdoc-demos/focus-outline/test_dingus/fn.test.html

## Screenshots

### light

![image](https://user-images.githubusercontent.com/1593513/197903818-61ce09e2-024e-4ca9-9aba-764039561d0a.png)

### dark

![image](https://user-images.githubusercontent.com/1593513/197903765-76e428ea-71e8-4724-ad21-7a4f9d923ea2.png)

### ayu

![image](https://user-images.githubusercontent.com/1593513/197903790-322e22ae-64b5-4138-b931-9ff3ff54f3b0.png)

20 months agoRollup merge of #103546 - RalfJung:cast, r=oli-obk
Dylan DPC [Wed, 26 Oct 2022 12:02:55 +0000 (17:32 +0530)]
Rollup merge of #103546 - RalfJung:cast, r=oli-obk

interpret: a bit of cast cleanup

r? `@oli-obk`

20 months agoRollup merge of #103543 - ehuss:update-books, r=ehuss
Dylan DPC [Wed, 26 Oct 2022 12:02:55 +0000 (17:32 +0530)]
Rollup merge of #103543 - ehuss:update-books, r=ehuss

Update books

## reference

4 commits in f6ed74f582bddcec73f753eafaab3749c4f7df61..4ea7c5def38ac81df33a9e48e5637a82a5ac404d
2022-10-08 02:43:26 -0700 to 2022-10-25 15:14:36 -0700
- Document Half Open Range Patterns + Improve Range Patterns in General (rust-lang/reference#1274)
- clarifying which row contains the example (rust-lang/reference#1287)
- Add `sym` operands for inline assembly (rust-lang/reference#1270)
- Add basic GATs reference information (rust-lang/reference#1265)

## book

141 commits in f1e5ad844d0c61738006cdef26227beeb136948e..aa5ee485bd6bd80d205da7c82fcdd776f92fdd51
2022-09-19 09:48:21 -0400 to 2022-10-20 16:49:55 -0400
- Remove Turkish translation
- Update chapter 4 from latest print edits
- Update chapter 3 from latest print edits
- Clarify division truncates toward zero. Fixes rust-lang/book#2856.
- Update chapter 2 from latest print edits
- Fix a problem with literal style ending
- Explain both kinds of format string arguments
- Update chapter 1 from latest print edits
- Snapshot consolidated appendices
- Fix ListNumber0, newlines after lists
- Don't match nodes without anything
- Handle listing numbers in appendices too
- Regenerate everything
- Fix chapter numbers in word doc so they're in the XML
- Number Table captions too
- Handle figures too
- Regenerate ch4
- Handle listing numbers
- Regenerate ch13
- Regenerate ch12
- Regenerate ch11
- Regenerate chapter 10
- Fix ListBullet0
- Handle ending of BoxCode better
- Regenerate chapter 9
- Regenerate ch8
- Make RunInHead consistent-ish
- Fix extra newline before boxes
- Fix Box RunIn Head/Para
- Fix newline after RunInHead/Para
- Regenerate ch7
- Fix QuotePara
- Fix ListPlain
- Regenerate ch6
- Fix BoxCode
- Regenerate chapter 5
- Fix GraphicSlug and CaptionLine
- Regenerate snapshot of chapter 4
- Fix boxes a bit
- Add a shellcheck ignore
- Handle BoxListBullet
- Handle superscript
- Regenerate ch3 from xml and fix tables
- Fix italics and whitespace interactions
- Fix italic preceding/following
- Fix preceding/following xpaths again
- Fix italics
- Fix code blocks
- Fix more last bullets in lists
- Fix box newlines
- Fix last bullet in a list
- Fix BoxType
- Fix notes
- Fix literals
- Add the no editing warning at the top when getting snapshots from docx
- Make the snapshot of the frontmatter nicer
- Updates to appendixes C, D, and E after copyedit checks
- Snapshots after copyedit checks of appendices a and b + recheck of 20
- Snapshot of appendices from copyedit
- Updated snapshot of the appendices
- Re-checks of chapter 19
- Re-checks of chapter 18
- Messy snapshot of chapter 20 after copyedit checks
- Snapshot of ch20 after copyedit
- Updated snapshot of chapter 20
- Messy snapshot of chapter 19 after copyedit checks
- Snapshot of ch19 after copyedit
- Updated snapshot of ch19
- Messy snapshot of ch 18 after copyedit review
- Snapshot of ch 18 after copyedit
- Update snapshot of ch18
- Messy snapshot of ch 17 after copyedit review
- Snapshot of ch17 copyedit
- Updated snapshot of ch17
- Messy snapshot of ch16 after copyedit
- Snapshot of ch16 copyedited
- Updated snapshot of ch16
- Messy snapshot of ch 15 after copyedit checks
- Re-review of earlier chapters
- Snapshot of ch15 copyedit
- Update snapshot of ch15
- Messy snapshots of other chapters with indentation fixed
- Messy snapshot of ch2 with indentation fixed
- Add unittests to the allowed words
- Messy snapshot of chapter 14 after checking copyedit
- Snapshot of chapter 14 after copyedit
- Update snapshot of ch14
- Regenerate manual output for chapter 14
- Messy snapshot of chapter 13 after copyedit check
- Updated snapshot of ch13 after copyedit
- Updated snapshot of ch13
- Messy snapshot of chapter 12 after copyedit checks
- Snapshot of chapter 12 copyedited
- Update snapshot for chapter 12
- Messy snapshot of chapter 11 after copyedit check
- Snapshot of chapter 11 copyedited
- Updated snapshot of chapter 11
- Messy snapshot of chapter 10 after copyedit check
- Snapshot of chapter 10 copyedit
- Updated snapshot of chapter 10
- Messy snapshot of ch9 after copyedit checks
- Snapshot of ch 9 copyedit
- Update snapshot of chapter 9
- Messy snapshot of chapter 8
- Update println style in ch8
- Snapshot of chapter 8 from copyedit
- Updated snapshot of chapter 8
- Rearrange my notes yet again
- Messy snapshot of ch7 after copyedit checks
- Snapshot of chapter 7 from copyedit, fix chapter 6 name
- Update snapshot of chapter 7
- Messy snapshot of chapter 6 after copyedit check
- Update snapshot of chapter 6
- Change my notes again
- Messy snapshot of chapter 5 after checking copyedit
- Snapshot of chapter 5 from copyedit
- Messy snapshot of chapter 4 after copyedit check
- Changing my notes again
- Snapshot of ch4 from nostarch
- Messy snapshot of chapter 3 after copyedit check, ch4 on start check
- Snapshot of ch3 from nostarch
- Updated snapshot of ch3
- reorder notes
- Messy snapshot of chapter 1 after copyedit check
- Snapshot of ch01 docx from nostarch
- Updated snapshot of chapter 1
- Messy snapshot of frontmatter docx
- Another snapshot to fix the crab pinchers description
- Messy snapshot of chapter 2 docx
- Get the latest snapshot of chapter 2
- Upgrade to rand 0.8.5
- Notes to self
- Update xsl and take snapshots from docx, such as they are
- Update instructions on docx -&gt; md now that I've done it again
- Propagate frontmatter edits to src
- Updated snapshots extracted from frontmatter
- Support different styles in the docx
- Line wrap bio
- Frontmatter from word doc
- Edits to docx files for nostarch
- docx files from nostarch

## rust-by-example

6 commits in 5e7b296d6c345addbd748f242aae28c42555c015..03491f33375c5a2a1661c7fa4be671fe95ce1249
2022-10-05 08:24:45 -0300 to 2022-10-21 07:30:08 -0300
- fix rust-lang/rust-by-example#1628: the box pointer is on stack not on heap (rust-lang/rust-by-example#1629)
- fix rust-lang/rust-by-example#1608: out-of-bound indexing is a runtime error (not a compile-time error) (rust-lang/rust-by-example#1626
)
- Fix: Path internal representation and conversions (rust-lang/rust-by-example#1625)
- fix crate name in example (rust-lang/rust-by-example#1620)
- avoid reserved keyword try as crate name (rust-lang/rust-by-example#1619)
- Fix typo in iter_result.md (rust-lang/rust-by-example#1614)

## rustc-dev-guide

7 commits in 7518c3445dc02df0d196f5f84e568d633c5141fb..51a37ad19a15709d0601afbac6581f5aea6a45da
2022-10-08 12:29:47 +0200 to 2022-10-25 10:18:58 -0700
- Update `traits/resolution.md` (rust-lang/rustc-dev-guide#1494)
- Update diagnostics to flat fluent message paths
- Update rust-analyzer suggestions (rust-lang/rustc-dev-guide#1487)
- miri is no longer a submodule but a subtree. (rust-lang/rustc-dev-guide#1488)
- fix some links (rust-lang/rustc-dev-guide#1490)
- typo and grammar (rust-lang/rustc-dev-guide#1484)
- Add missing prerequisite for some Linux distros (rust-lang/rustc-dev-guide#1481)

20 months agoRollup merge of #103428 - SarthakSingh31:issue-94187, r=compiler-errors
Dylan DPC [Wed, 26 Oct 2022 12:02:54 +0000 (17:32 +0530)]
Rollup merge of #103428 - SarthakSingh31:issue-94187, r=compiler-errors

Removed verbose printing from the `PrettyPrinter` when printing constants

Partially solves #94187 by completing the first step described in [this comment](https://github.com/rust-lang/rust/issues/94187#issuecomment-1282339909).

20 months agoRollup merge of #102706 - ferrocene:pa-ignore-doc-index, r=jyn514
Dylan DPC [Wed, 26 Oct 2022 12:02:54 +0000 (17:32 +0530)]
Rollup merge of #102706 - ferrocene:pa-ignore-doc-index, r=jyn514

Support excluding the generation of the standalone docs

For Ferrocene we need to exclude the generation of the standalone docs (which include the index page, which we want to replace with our own), but with the way bootstrap is currently implemented that proved not possible. This PR aims to support that.

The first problem is that the `doc::Standalone` step did two things: it generated the "standalone" documentation (which includes the index page and all the pages at the root of the documentation tree), but it also generated some files like `rust.css` and `version_info.html` that other step like `doc::TheBook` required. This meant generating the book required generating the index page, which made disabling the index page generation problematic.

The approach I took to fix the first problem is to split the step into `doc::Standalone` and `doc::SharedAssets`, with `doc::TheBook` now depending on `doc::SharedAssets`.

The second problem is that disabling the `doc::Standalone` proved to be tricky due to its path, `src/doc`. The path is accurate, as the source files for that step are `src/doc/*.md`. The problem is, bootstrap treats `--exclude` as a *suffix*, and so it also excluded the Cargo book whose source lives at `src/tools/cargo/src/doc`.

The approach I took to fix the second problem is to add the `standalone` path in addition to `src/doc`, so that you can pass `--exclude standalone`. I'm not fully happy with the solution, and the other idea I had was to just move the standalone docs source code to `src/doc/standalone`. I feel that second approach is cleaner, but also requires more changes and might require more consensus.

This PR is best reviewed commit-by-commit.

r? `@jyn514`

20 months agoRollup merge of #95710 - fee1-dead-contrib:stabilize_arbitrary_enum_discriminant...
Dylan DPC [Wed, 26 Oct 2022 12:02:53 +0000 (17:32 +0530)]
Rollup merge of #95710 - fee1-dead-contrib:stabilize_arbitrary_enum_discriminant, r=joshtriplett

Stabilize arbitrary_enum_discriminant, take 2

Documentation has been updated in https://github.com/rust-lang/reference/pull/1055. cc #86860 for previous stabilization report.

Not yet marks https://github.com/rust-lang/rust/issues/60553 as done: need documentation in the rust reference.

20 months agoAuto merge of #103284 - compiler-errors:const-sad, r=oli-obk
bors [Wed, 26 Oct 2022 11:29:15 +0000 (11:29 +0000)]
Auto merge of #103284 - compiler-errors:const-sad, r=oli-obk

Revert "Unify tcx.constness and param env constness checks"

Too much of a perf regression https://github.com/rust-lang/rust/pull/102975#issuecomment-1282702513, and an attempt in #103263 didn't fix it except for just a tiny bit.

This change isn't really needed (see https://github.com/rust-lang/rust/pull/102830#issuecomment-1272514096), so this should be an easy revert.

20 months agoUpdate src/librustdoc/html/static/css/rustdoc.css
Michael Howell [Wed, 26 Oct 2022 09:41:34 +0000 (02:41 -0700)]
Update src/librustdoc/html/static/css/rustdoc.css

Co-authored-by: Jacob Hoffman-Andrews <github@hoffman-andrews.com>
20 months agoptr::eq: clarify that comparing dyn Trait is fragile
Ralf Jung [Wed, 26 Oct 2022 09:15:14 +0000 (11:15 +0200)]
ptr::eq: clarify that comparing dyn Trait is fragile

20 months agoAuto merge of #2620 - RalfJung:getname, r=RalfJung
bors [Wed, 26 Oct 2022 08:58:53 +0000 (08:58 +0000)]
Auto merge of #2620 - RalfJung:getname, r=RalfJung

add pthread_getname_np

A new libstd test needs this, and there doesn't seem to be a good reason not to have this.

20 months agoaccount for different max thread name lengths on different platforms
Ralf Jung [Wed, 26 Oct 2022 08:50:11 +0000 (10:50 +0200)]
account for different max thread name lengths on different platforms

20 months agoadd pthread_getname_np
Ralf Jung [Wed, 26 Oct 2022 08:42:43 +0000 (10:42 +0200)]
add pthread_getname_np

20 months agoAuto merge of #2614 - saethlin:stack-inspection-tools, r=RalfJung
bors [Wed, 26 Oct 2022 07:58:36 +0000 (07:58 +0000)]
Auto merge of #2614 - saethlin:stack-inspection-tools, r=RalfJung

Improve miri_print_borrow_stacks

Per post-merge review on https://github.com/rust-lang/miri/pull/2322

* `miri_print_stacks` renamed to `miri_print_borrow_stacks`
* A bit more details in docs, clarified how unstable these functions are meant to be
* Print an `unknown_bottom` if one exists

Open question: Currently `miri_get_alloc_id` gets the expected `AllocId` for `Wildcard` pointers, but for pointers with no provenance, the function reports UB and halts the interpreter. That's definitely wrong. But what _should_ we do? Is it reasonable to check if the pointer has `None` provenance and try to get an `AllocId` for its address? That still leaves us with a failure path, which in this case might be best-handled as an ICE? I'm just not sure that changing the return type of `miri_get_alloc_id` to `Option` is a win because it complicates all normal uses of this.

20 months agoAuto merge of #103562 - Dylan-DPC:rollup-sheepp5, r=Dylan-DPC
bors [Wed, 26 Oct 2022 07:58:28 +0000 (07:58 +0000)]
Auto merge of #103562 - Dylan-DPC:rollup-sheepp5, r=Dylan-DPC

Rollup of 10 pull requests

Successful merges:

 - #102951 (suggest type annotation for local statement initialed by ref expression)
 - #103209 (Diagnostic derives: allow specifying multiple alternative suggestions)
 - #103287 (Use a faster allocation size check in slice::from_raw_parts)
 - #103416 (Name the `impl Trait` in region bound suggestions)
 - #103430 (Workaround unstable stmt_expr_attributes for method receiver expressions)
 - #103444 (Remove extra type error after missing semicolon error)
 - #103520 (rustc_middle: Rearrange resolver outputs structures slightly)
 - #103533 (Use &self instead of &mut self for cast methods)
 - #103536 (Remove `rustc_driver::set_sigpipe_handler()`)
 - #103542 (Pinning tests for some `macro_rules!` errors discussed in the lang meeting)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

20 months agotweak docs
Ralf Jung [Wed, 26 Oct 2022 07:58:21 +0000 (09:58 +0200)]
tweak docs

20 months agolibrary: allow some unused things in Miri
Ralf Jung [Wed, 26 Oct 2022 07:48:47 +0000 (09:48 +0200)]
library: allow some unused things in Miri

20 months agoRollup merge of #103542 - scottmcm:invalid-macro-patterns, r=compiler-errors
Dylan DPC [Wed, 26 Oct 2022 05:59:57 +0000 (11:29 +0530)]
Rollup merge of #103542 - scottmcm:invalid-macro-patterns, r=compiler-errors

Pinning tests for some `macro_rules!` errors discussed in the lang meeting

r? ``@nikomatsakis``

Mind just stamping these, since they were useful for the meeting discussion today?

20 months agoRollup merge of #103536 - Enselic:remove-set_sigpipe_handler, r=tmiasko
Dylan DPC [Wed, 26 Oct 2022 05:59:57 +0000 (11:29 +0530)]
Rollup merge of #103536 - Enselic:remove-set_sigpipe_handler, r=tmiasko

Remove `rustc_driver::set_sigpipe_handler()`

Its usage was removed in https://github.com/rust-lang/rust/pull/102587 and https://github.com/rust-lang/rust/pull/103495, so we do not need to keep it around any longer. According to [preliminary input](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Find.20.60rustc_driver.60.20dependent.20projects.3F/near/304490764), we do not need to worry about any deprecation cycle for this explicitly unstable API, and can just straight up remove it.

PR that added `set_sigpipe_handler`: https://github.com/rust-lang/rust/pull/49606

Tracking issue for `unix_sigpipe`: #97889

Migration instructions for any remaining clients
---

Change from

```rust
#![feature(rustc_private)]

extern crate rustc_driver;

fn main() {
    rustc_driver::set_sigpipe_handler();
    // ...
```

to

```rust
#![feature(unix_sigpipe)]

#[unix_sigpipe = "sig_dfl"]
fn main() {
    // ...
```

``@rustbot`` labels +T-compiler

20 months agoRollup merge of #103533 - jachris:cast-without-mut, r=oli-obk
Dylan DPC [Wed, 26 Oct 2022 05:59:56 +0000 (11:29 +0530)]
Rollup merge of #103533 - jachris:cast-without-mut, r=oli-obk

Use &self instead of &mut self for cast methods

r? ``@oli-obk``

20 months agoRollup merge of #103520 - petrochenkov:resout, r=cjgillot
Dylan DPC [Wed, 26 Oct 2022 05:59:56 +0000 (11:29 +0530)]
Rollup merge of #103520 - petrochenkov:resout, r=cjgillot

rustc_middle: Rearrange resolver outputs structures slightly

Addresses https://github.com/rust-lang/rust/pull/98106#discussion_r898427061.
I also haven't seen the motivation for moving `cstore` from its old place, so I moved it back in this PR.
r? ```@cjgillot```

20 months agoRollup merge of #103444 - chenyukang:yukang/fix-103425-extra-diag, r=davidtwco
Dylan DPC [Wed, 26 Oct 2022 05:59:55 +0000 (11:29 +0530)]
Rollup merge of #103444 - chenyukang:yukang/fix-103425-extra-diag, r=davidtwco

Remove extra type error after missing semicolon error

Fixes #103425

20 months agoRollup merge of #103430 - cjgillot:receiver-attrs, r=petrochenkov
Dylan DPC [Wed, 26 Oct 2022 05:59:55 +0000 (11:29 +0530)]
Rollup merge of #103430 - cjgillot:receiver-attrs, r=petrochenkov

Workaround unstable stmt_expr_attributes for method receiver expressions

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

cc ``@Mark-Simulacrum`` ``@ehuss``

20 months agoRollup merge of #103416 - compiler-errors:rpit-named, r=cjgillot
Dylan DPC [Wed, 26 Oct 2022 05:59:54 +0000 (11:29 +0530)]
Rollup merge of #103416 - compiler-errors:rpit-named, r=cjgillot

Name the `impl Trait` in region bound suggestions

Slightly more descriptive message

20 months agoRollup merge of #103287 - saethlin:faster-len-check, r=thomcc
Dylan DPC [Wed, 26 Oct 2022 05:59:53 +0000 (11:29 +0530)]
Rollup merge of #103287 - saethlin:faster-len-check, r=thomcc

Use a faster allocation size check in slice::from_raw_parts

I've been perusing through the codegen changes that result from turning on the standard library debug assertions. The previous check in here uses saturating arithmetic, which in my experience sometimes makes LLVM just fail to optimize things around the saturating operation.

Here is a demo of the codegen difference: https://godbolt.org/z/WMEqrjajW
Before:
```asm
example::len_check_old:
        mov     rax, rdi
        mov     ecx, 3
        mul     rcx
        setno   cl
        test    rax, rax
        setns   al
        and     al, cl
        ret

example::len_check_old:
        mov     rax, rdi
        mov     ecx, 8
        mul     rcx
        setno   cl
        test    rax, rax
        setns   al
        and     al, cl
        ret
```
After:
```asm
example::len_check_new:
        movabs  rax, 3074457345618258603
        cmp     rdi, rax
        setb    al
        ret

example::len_check_new:
        shr     rdi, 60
        sete    al
        ret
```

Running rustc-perf locally, this looks like up to a 4.5% improvement when `debug-assertions-std = true`.

Thanks ```@LegionMammal978``` (I think that's you?) for turning my idea into a much cleaner implementation.

r? ```@thomcc```

20 months agoRollup merge of #103209 - Xiretza:multiple-suggestions, r=davidtwco
Dylan DPC [Wed, 26 Oct 2022 05:59:53 +0000 (11:29 +0530)]
Rollup merge of #103209 - Xiretza:multiple-suggestions, r=davidtwco

Diagnostic derives: allow specifying multiple alternative suggestions

This allows porting `span_suggestions()` to diagnostic structs.

Doesn't work for `multipart_suggestions()` because the rank would be reversed - the struct would specify multiple spans, each of which has multiple possible replacements, while `multipart_suggestions()` creates multiple possible replacements, each with multiple spans.

20 months agoRollup merge of #102951 - SparrowLii:type_annotation, r=estebank
Dylan DPC [Wed, 26 Oct 2022 05:59:53 +0000 (11:29 +0530)]
Rollup merge of #102951 - SparrowLii:type_annotation, r=estebank

suggest type annotation for local statement initialed by ref expression

In a local statement with a type declaration, if a ref expression is used on the right side and not used on the left side, in addition to removing the `&` and `&mut` on the right side, we can add them on the left side alternatively
Fixes #102892

20 months agoAuto merge of #103279 - compiler-errors:normalize-hack-back, r=lcnr
bors [Wed, 26 Oct 2022 05:17:46 +0000 (05:17 +0000)]
Auto merge of #103279 - compiler-errors:normalize-hack-back, r=lcnr

Add eval hack in `super_relate_consts` back

Partially reverts 01adb7e98d5656c06497f33dd2747df144e78356.

This extra eval call *still* needs to happen, for example, in `normalize_param_env_or_error` when a param-env predicate has an unnormalized constant, since the param-env candidates never get normalized during candidate assembly (everywhere else we can assume that they are normalized fully).

r? `@lcnr,` though I feel like I've assigned quite a few PRs to you in the last few days, so feel free to reassign to someone else familiar with this code if you're busy!

cc #103243 (fixes the issue, but don't want to auto-close that until a backport is performed).

20 months agoAuto merge of #103158 - Bryanskiy:resolve_perf, r=petrochenkov
bors [Wed, 26 Oct 2022 02:30:18 +0000 (02:30 +0000)]
Auto merge of #103158 - Bryanskiy:resolve_perf, r=petrochenkov

Perf improvements for effective visibility calculating

related to https://github.com/rust-lang/rust/pull/102026
r? `@petrochenkov`

20 months agoUpdate cargo
Weihang Lo [Wed, 26 Oct 2022 01:20:22 +0000 (09:20 +0800)]
Update cargo

5 commits in 071eeaf210708219a5a1b2c4728ca2f97df7f2ae..9210810d1fd7b51ae0439a0a363cc50e36963455
2022-10-22 01:17:55 +0000 to 2022-10-25 22:31:50 +0000

- Fix 410 gone response handling (rust-lang/cargo#11286)
- Fix inequality in "stale mtime" log messages (rust-lang/cargo#11281)
- doc(cargo-tree): mention it considering feature unification (rust-lang/cargo#11282)
- Improve the error message if `publish` is `false` or empty list (rust-lang/cargo#11280)
- Add test for deleted index entry (rust-lang/cargo#11278)

20 months agorustdoc: add visible focus outline to rustdoc-toggle
Michael Howell [Tue, 25 Oct 2022 23:52:50 +0000 (16:52 -0700)]
rustdoc: add visible focus outline to rustdoc-toggle

The change in opacity is inconsistent with most of rustdoc, which uses
default browser styles for the focus outline. Unfortunately, just using
the default focus outline here won't work, because it gets applied to
the summary itself instead of the pseudo-element "real button."

20 months agoAuto merge of #102903 - compiler-errors:region-var-leak, r=jackh726
bors [Tue, 25 Oct 2022 23:24:36 +0000 (23:24 +0000)]
Auto merge of #102903 - compiler-errors:region-var-leak, r=jackh726

Assert if inference vars are leaking from `InferCtxt::fully_resolve`

`InferCtxt::fully_resolve` shouldn't return unresolved inference vars without us at least being aware of it, so make it an assertion now. This should only happen in cases where we used to be returning `ReEmpty`...

cc `@jackh726`

20 months agoUpdate books
Eric Huss [Tue, 25 Oct 2022 19:34:05 +0000 (12:34 -0700)]
Update books

20 months agollvm-16: Don't initialize removed legacy passes
Matthew Maurer [Tue, 25 Oct 2022 22:03:21 +0000 (15:03 -0700)]
llvm-16: Don't initialize removed legacy passes

LLVM removed initialization for legacy passes:
https://reviews.llvm.org/D136615

20 months agoTry to say that memory outside the AM is always exposed
Ben Kimock [Sun, 16 Oct 2022 05:03:52 +0000 (01:03 -0400)]
Try to say that memory outside the AM is always exposed

Co-authored-by: Ralf Jung <post@ralfj.de>
20 months agoRename, improve docs, fail better
Ben Kimock [Sun, 23 Oct 2022 16:32:45 +0000 (12:32 -0400)]
Rename, improve docs, fail better

20 months agointerpret: a bit of cast cleanup
Ralf Jung [Tue, 25 Oct 2022 20:09:35 +0000 (22:09 +0200)]
interpret: a bit of cast cleanup

20 months agoPinning tests for some macro_rules things discussed in the lang meeting
Scott McMurray [Tue, 25 Oct 2022 19:16:25 +0000 (12:16 -0700)]
Pinning tests for some macro_rules things discussed in the lang meeting

20 months agoSplit diagnostic details out into a separate function and fluent files
Oli Scherer [Tue, 25 Oct 2022 18:28:04 +0000 (18:28 +0000)]
Split diagnostic details out into a separate function and fluent files

20 months agoAuto merge of #2618 - RalfJung:rustup, r=RalfJung
bors [Tue, 25 Oct 2022 18:02:23 +0000 (18:02 +0000)]
Auto merge of #2618 - RalfJung:rustup, r=RalfJung

Rustup

20 months agobless clippy
Ralf Jung [Tue, 25 Oct 2022 17:59:36 +0000 (19:59 +0200)]
bless clippy

20 months agorustup
Ralf Jung [Tue, 25 Oct 2022 17:49:12 +0000 (19:49 +0200)]
rustup

20 months agoMerge branch 'master' of http://localhost:8000/rust-lang/rust.git:at_commit=75dd959a3...
Ralf Jung [Tue, 25 Oct 2022 17:48:23 +0000 (19:48 +0200)]
Merge branch 'master' of http://localhost:8000/rust-lang/rust.git:at_commit=75dd959a3a40eb5b4574f8d2e23aa6efbeb33573[:prefix=src/tools/miri]:/src/tools/miri

20 months agorustdoc: combine shared CSS between `.*-line-numbers`
Michael Howell [Tue, 25 Oct 2022 17:43:08 +0000 (10:43 -0700)]
rustdoc: combine shared CSS between `.*-line-numbers`

20 months agoRemove `rustc_driver::set_sigpipe_handler()`
Martin Nordholts [Mon, 24 Oct 2022 18:59:22 +0000 (20:59 +0200)]
Remove `rustc_driver::set_sigpipe_handler()`

Its usage was removed in 5e624bf4ba and 093b075d32, so we do not need to
keep it around any longer. According to [preliminary
input](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Find.20.60rustc_driver.60.20dependent.20projects.3F/near/304490764),
we do not need to worry about any deprecation cycle for this API and can
just straight up remove it.

Migration instructions for remaining clients
--------------------------------------------

Change from

```rust

extern crate rustc_driver;

fn main() {
    rustc_driver::set_sigpipe_handler();
    // ...
```

to

```rust

fn main() {
    // ...
```

20 months agoName impl trait in region bound suggestion
Michael Goulet [Sat, 22 Oct 2022 21:38:05 +0000 (21:38 +0000)]
Name impl trait in region bound suggestion

20 months agoUse &self instead of &mut self for cast methods
Jannis Christopher Köhl [Tue, 25 Oct 2022 16:31:11 +0000 (18:31 +0200)]
Use &self instead of &mut self for cast methods

20 months agoAuto merge of #102340 - JakobDegen:pass-manager-simplification, r=oli-obk
bors [Tue, 25 Oct 2022 15:55:39 +0000 (15:55 +0000)]
Auto merge of #102340 - JakobDegen:pass-manager-simplification, r=oli-obk

Split phase change from `MirPass`

The main goal here is to simplify the pass manager logic. `MirPass` no longer contains the `phase_change` method, and `run_passes` instead accepts an `Option<PhaseChange>`. The hope is that this addresses the comments (and maybe perf regression) from #99102 .

r? `@oli-obk` cc `@RalfJung`

20 months agomore dupe typos again
Rageking8 [Tue, 25 Oct 2022 14:51:47 +0000 (22:51 +0800)]
more dupe typos again

20 months agoMove a wf-check into the site where the value is instantiated
Oli Scherer [Thu, 20 Oct 2022 09:39:09 +0000 (09:39 +0000)]
Move a wf-check into the site where the value is instantiated

20 months agoAuto merge of #103392 - RalfJung:miri, r=oli-obk
bors [Tue, 25 Oct 2022 12:33:39 +0000 (12:33 +0000)]
Auto merge of #103392 - RalfJung:miri, r=oli-obk

update Miri

I had to use a hacked version of josh to create this, so let's be careful with merging this and maybe wait a bit to see if the josh issue becomes more clear. But the history looks good to me, we are not adding duplicates of rustc commits that were previously mirrored to Miri.

Also I want to add some cross-testing of Miri in x.py.

20 months agoPerf improvements for effective visibility calculating
Bryanskiy [Mon, 17 Oct 2022 17:09:03 +0000 (20:09 +0300)]
Perf improvements for effective visibility calculating

20 months agorustc_middle: Rearrange resolver outputs structures slightly
Vadim Petrochenkov [Tue, 25 Oct 2022 10:45:02 +0000 (14:45 +0400)]
rustc_middle: Rearrange resolver outputs structures slightly

20 months agoMiri: disable macOS testing for now
Ralf Jung [Tue, 25 Oct 2022 11:40:38 +0000 (13:40 +0200)]
Miri: disable macOS testing for now

20 months agoAuto merge of #103513 - Dylan-DPC:rollup-nn3ite2, r=Dylan-DPC
bors [Tue, 25 Oct 2022 09:37:06 +0000 (09:37 +0000)]
Auto merge of #103513 - Dylan-DPC:rollup-nn3ite2, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #98204 (Stabilize `Option::unzip()`)
 - #102587 (rustc: Use `unix_sigpipe` instead of `rustc_driver::set_sigpipe_handler`)
 - #103122 (Remove misc_cast and validate types when casting)
 - #103379 (Truncate thread names on Linux and Apple targets)
 - #103482 (Clairify Vec::capacity docs)
 - #103511 (Codegen tweaks)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

20 months agoRollup merge of #103511 - nnethercote:bb-tweaks, r=bjorn3
Dylan DPC [Tue, 25 Oct 2022 09:13:16 +0000 (14:43 +0530)]
Rollup merge of #103511 - nnethercote:bb-tweaks, r=bjorn3

Codegen tweaks

Best reviewed one commit at a time.

r? `@bjorn3`

20 months agoRollup merge of #103482 - aDotInTheVoid:vec-cap-docs, r=thomcc
Dylan DPC [Tue, 25 Oct 2022 09:13:15 +0000 (14:43 +0530)]
Rollup merge of #103482 - aDotInTheVoid:vec-cap-docs, r=thomcc

Clairify Vec::capacity docs

Update both the text and example to be clear that the method gives *total*, (not *spare*) capacity

Fixes #103326

20 months agoRollup merge of #103379 - cuviper:truncate-thread-name, r=thomcc
Dylan DPC [Tue, 25 Oct 2022 09:13:15 +0000 (14:43 +0530)]
Rollup merge of #103379 - cuviper:truncate-thread-name, r=thomcc

Truncate thread names on Linux and Apple targets

These targets have system limits on the thread names, 16 and 64 bytes
respectively, and `pthread_setname_np` returns an error if the name is
longer. However, we're not in a context that can propagate errors when
we call this, and we used to implicitly truncate on Linux with `prctl`,
so now we manually truncate these names ahead of time.

r? ``````@thomcc``````

20 months agoRollup merge of #103122 - ouz-a:mir-technical-debt, r=oli-obk
Dylan DPC [Tue, 25 Oct 2022 09:13:14 +0000 (14:43 +0530)]
Rollup merge of #103122 - ouz-a:mir-technical-debt, r=oli-obk

Remove misc_cast and validate types when casting

Continuing our work in #102675

r? ````@oli-obk````

20 months agoRollup merge of #102587 - Enselic:rustc-unix_sigpipe, r=jackh726
Dylan DPC [Tue, 25 Oct 2022 09:13:14 +0000 (14:43 +0530)]
Rollup merge of #102587 - Enselic:rustc-unix_sigpipe, r=jackh726

rustc: Use `unix_sigpipe` instead of `rustc_driver::set_sigpipe_handler`

This is the first (known) step towards starting to use `unix_sigpipe` in the wild. Eventually, `rustc_driver::set_sigpipe_handler` can be removed and all clients can use `unix_sigpipe` instead.

For now we just start using `unix_sigpipe` in one place: `rustc` itself.

It is easy to manually verify this change. If you remove `#[unix_sigpipe = "sig_dfl"]` and run `./x.py build` you will get an ICE when you do `./build/x86_64-unknown-linux-gnu/stage1/bin/rustc --help | false`. Add back `#[unix_sigpipe = "sig_dfl"]` and the ICE disappears again.

PR that added `set_sigpipe_handler`: https://github.com/rust-lang/rust/pull/49606

Tracking issue for `unix_sigpipe`: #97889

Not sure exactly how to label this PR. Going with T-libs for now since this is a T-libs feature.

````@rustdoc```` labels +T-libs