]> git.lizzy.rs Git - rust.git/log
rust.git
20 months agorustup
Ralf Jung [Mon, 24 Oct 2022 10:00:35 +0000 (12:00 +0200)]
rustup

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 agoalso smoke-test 'cargo miri test'
Ralf Jung [Sat, 22 Oct 2022 11:59:45 +0000 (13:59 +0200)]
also smoke-test 'cargo miri test'

20 months agoadd support for testing Miri on other targets, and do some cross-testing on CI
Ralf Jung [Sat, 22 Oct 2022 09:18:23 +0000 (11:18 +0200)]
add support for testing Miri on other targets, and do some cross-testing on CI

20 months agoupdate lockfile
Ralf Jung [Sat, 22 Oct 2022 08:45:25 +0000 (10:45 +0200)]
update lockfile

20 months agoAuto merge of #2615 - RalfJung:josh, r=oli-obk
bors [Mon, 24 Oct 2022 08:14:12 +0000 (08:14 +0000)]
Auto merge of #2615 - RalfJung:josh, r=oli-obk

point to my fork of josh for now

This is the version of josh that I used to create https://github.com/rust-lang/rust/pull/103392.

20 months agopoint to my fork of josh for now
Ralf Jung [Mon, 24 Oct 2022 06:05:52 +0000 (08:05 +0200)]
point to my fork of josh for now

20 months agoAuto merge of #2613 - RalfJung:scalar-only-field-retagging, r=RalfJung
bors [Sun, 23 Oct 2022 11:18:11 +0000 (11:18 +0000)]
Auto merge of #2613 - RalfJung:scalar-only-field-retagging, r=RalfJung

add scalar-abi-only field retagging option

`@saethlin` has requested a Stacked Borrows field retagging mode that matches when we do in terms of emitting `noalias` for LLVM. So here you go! Types with `Scalar` and `ScalarPair` ABI are being recursively retagged, everything else is not.

Given that many types can get `ScalarPair` ABI, I don't think this actually helps to make many things sound that are unsound under full field retagging -- but it might still be useful for some experimentation.

20 months agoadd scalar-abi-only field retagging option
Ralf Jung [Sat, 22 Oct 2022 20:48:48 +0000 (22:48 +0200)]
add scalar-abi-only field retagging option

20 months agoAuto merge of #2612 - ChrisDenton:getfiletype, r=RalfJung
bors [Fri, 21 Oct 2022 17:51:44 +0000 (17:51 +0000)]
Auto merge of #2612 - ChrisDenton:getfiletype, r=RalfJung

add GetFileType stub

because I'm planning to break miri again https://github.com/rust-lang/rust/pull/103360

See [GetFileType](https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfiletype)

20 months agoadd GetFileType stub
Chris Denton [Fri, 21 Oct 2022 17:24:46 +0000 (18:24 +0100)]
add GetFileType stub

20 months agoAuto merge of #2611 - pfmooney:libffi, r=RalfJung
bors [Fri, 21 Oct 2022 16:33:36 +0000 (16:33 +0000)]
Auto merge of #2611 - pfmooney:libffi, r=RalfJung

Update libffi-sys to 2.0.1

Prior version of libffi [could not be cross-compiled to illumos](https://github.com/tov/libffi-rs/pull/59) due to host-triple complications.  This should fix rustup builds of miri for the illumos platform.

20 months agoUpdate libffi-sys to 2.0.1
Patrick Mooney [Thu, 20 Oct 2022 16:48:13 +0000 (11:48 -0500)]
Update libffi-sys to 2.0.1

Prior version of libffi could not be cross-compiled to illumos due to
host-triple complications.  This should fix rustup builds of miri for
the illumos platform.

20 months agoAuto merge of #2610 - RalfJung:issue-1909, r=RalfJung
bors [Fri, 21 Oct 2022 12:48:54 +0000 (12:48 +0000)]
Auto merge of #2610 - RalfJung:issue-1909, r=RalfJung

add test for #1909

Fixes https://github.com/rust-lang/miri/issues/1909

20 months agoadd test for #1909
Ralf Jung [Fri, 21 Oct 2022 12:28:12 +0000 (14:28 +0200)]
add test for #1909

20 months agoAuto merge of #2609 - RalfJung:is_terminal, r=RalfJung
bors [Fri, 21 Oct 2022 12:23:11 +0000 (12:23 +0000)]
Auto merge of #2609 - RalfJung:is_terminal, r=RalfJung

Use is_terminal to implement isatty

This means that Linux targets on Windows hosts should give a correct reply. We still don't have an implementation for Windows targets though, that requires some tracking of handles.

Fixes https://github.com/rust-lang/miri/issues/2419

Also restructure our `fs` tests a bit to test the parts that don't need libc separately.

`as_unix_host_fd` is now not used any more, but it could become useful again in the future so I kept it.

20 months agotest is_terminal
Ralf Jung [Fri, 21 Oct 2022 12:16:12 +0000 (14:16 +0200)]
test is_terminal

20 months agosplit libc tests from stdlib tests
Ralf Jung [Fri, 21 Oct 2022 12:12:19 +0000 (14:12 +0200)]
split libc tests from stdlib tests

20 months agouse is_terminal to implement isatty
Ralf Jung [Fri, 21 Oct 2022 12:05:38 +0000 (14:05 +0200)]
use is_terminal to implement isatty

20 months agoAuto merge of #2607 - RalfJung:rustup, r=RalfJung
bors [Fri, 21 Oct 2022 10:21:17 +0000 (10:21 +0000)]
Auto merge of #2607 - RalfJung:rustup, r=RalfJung

Rustup

20 months agoadd always-failing GetFileInformationByHandleEx stub
Ralf Jung [Fri, 21 Oct 2022 10:19:59 +0000 (12:19 +0200)]
add always-failing GetFileInformationByHandleEx stub

20 months agorustup
Ralf Jung [Fri, 21 Oct 2022 08:22:15 +0000 (10:22 +0200)]
rustup

20 months agomerge rustc history
Ralf Jung [Fri, 21 Oct 2022 08:18:54 +0000 (10:18 +0200)]
merge rustc history

20 months agoAuto merge of #103308 - sunfishcode:sunfishcode/wasi-io-safety, r=joshtriplett
bors [Fri, 21 Oct 2022 04:05:02 +0000 (04:05 +0000)]
Auto merge of #103308 - sunfishcode:sunfishcode/wasi-io-safety, r=joshtriplett

Mark `std::os::wasi::io::AsFd` etc. as stable.

io_safety was stabilized in Rust 1.63, so mark the io_safety exports in `std::os::wasi::io` as stable.

Fixes #103306.

20 months agoAuto merge of #2601 - DrMeepster:windows_init_once, r=RalfJung
bors [Thu, 20 Oct 2022 22:03:17 +0000 (22:03 +0000)]
Auto merge of #2601 - DrMeepster:windows_init_once, r=RalfJung

Add Windows InitOnceBeginInitialize and InitOnceComplete shims

Fixes #2595

20 months agoslight refactoring
Ralf Jung [Thu, 20 Oct 2022 20:18:59 +0000 (22:18 +0200)]
slight refactoring

20 months agoMake the whole `std::os::wasi::io` module stable.
Dan Gohman [Thu, 20 Oct 2022 21:31:11 +0000 (14:31 -0700)]
Make the whole `std::os::wasi::io` module stable.

20 months agoAuto merge of #103322 - matthiaskrgr:rollup-m9zgpft, r=matthiaskrgr
bors [Thu, 20 Oct 2022 21:08:28 +0000 (21:08 +0000)]
Auto merge of #103322 - matthiaskrgr:rollup-m9zgpft, r=matthiaskrgr

Rollup of 9 pull requests

Successful merges:

 - #103221 (Fix `SelfVisitor::is_self_ty` ICE)
 - #103230 (Clarify startup)
 - #103281 (Adjust `transmute{,_copy}` to be clearer about which of `T` and `U` is input vs output)
 - #103288 (Fixed docs typo in `library/std/src/time.rs`)
 - #103296 (+/- shortcut now only expand/collapse, not both)
 - #103297 (fix typo)
 - #103313 (Don't label `src/test` tests as `A-testsuite`)
 - #103315 (interpret: remove an incorrect assertion)
 - #103319 (Improve "`~const` is not allowed here" message)

Failed merges:

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

20 months agoRollup merge of #103319 - fee1-dead-contrib:improve_tilde_const_msg, r=oli-obk
Matthias Krüger [Thu, 20 Oct 2022 20:42:42 +0000 (22:42 +0200)]
Rollup merge of #103319 - fee1-dead-contrib:improve_tilde_const_msg, r=oli-obk

Improve "`~const` is not allowed here" message

r? `@oli-obk`

20 months agoRollup merge of #103315 - RalfJung:interpret-switchint-ice, r=bjorn3
Matthias Krüger [Thu, 20 Oct 2022 20:42:41 +0000 (22:42 +0200)]
Rollup merge of #103315 - RalfJung:interpret-switchint-ice, r=bjorn3

interpret: remove an incorrect assertion

This fixes an ICE in Miri, [reported](https://rust-lang.zulipchat.com/#narrow/stream/269128-miri/topic/SwitchInt.20with.20no.20targets.3F) by `@saethlin.` The faulty assertion was introduced by https://github.com/rust-lang/rust/commit/432535da2b5144d467056efcfa6864d35ba2de0f, when a previously correct assertion checking that the `otherwise` target exists got replaced by this assertion checking that at least one more target beyond `otherwise` exists.

Sadly we don't have a small reproducer so I don't think we can easily add a testcase.

20 months agoRollup merge of #103313 - compiler-errors:no-test, r=jyn514
Matthias Krüger [Thu, 20 Oct 2022 20:42:41 +0000 (22:42 +0200)]
Rollup merge of #103313 - compiler-errors:no-test, r=jyn514

Don't label `src/test` tests as `A-testsuite`

Nearly every PR modifies `src/test`; A-testsuite is meant to be for things affecting the test runners themselves.

cc https://github.com/rust-lang/rust/pull/103204#discussion_r1000868781

r? `@jyn514`

20 months agoRollup merge of #103297 - catandcoder:master, r=JohnTitor
Matthias Krüger [Thu, 20 Oct 2022 20:42:40 +0000 (22:42 +0200)]
Rollup merge of #103297 - catandcoder:master, r=JohnTitor

fix typo

20 months agoRollup merge of #103296 - GuillaumeGomez:collapse-expand-shortcuts, r=notriddle
Matthias Krüger [Thu, 20 Oct 2022 20:42:40 +0000 (22:42 +0200)]
Rollup merge of #103296 - GuillaumeGomez:collapse-expand-shortcuts, r=notriddle

+/- shortcut now only expand/collapse, not both

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

r? ```@notriddle```

20 months agoRollup merge of #103288 - johnmatthiggins:master, r=thomcc
Matthias Krüger [Thu, 20 Oct 2022 20:42:39 +0000 (22:42 +0200)]
Rollup merge of #103288 - johnmatthiggins:master, r=thomcc

Fixed docs typo in `library/std/src/time.rs`

* Changed comment from `Previous rust versions panicked when self was earlier than the current time.` to `Previous rust versions panicked when the current time was earlier than self.`
* Resolves #103282.

20 months agoRollup merge of #103281 - thomcc:long-overdue, r=jyn514
Matthias Krüger [Thu, 20 Oct 2022 20:42:39 +0000 (22:42 +0200)]
Rollup merge of #103281 - thomcc:long-overdue, r=jyn514

Adjust `transmute{,_copy}` to be clearer about which of `T` and `U` is input vs output

This is essentially a documentation-only change (although it does touch code in an irrelevant way).

20 months agoRollup merge of #103230 - nnethercote:clarify-startup, r=jyn514
Matthias Krüger [Thu, 20 Oct 2022 20:42:38 +0000 (22:42 +0200)]
Rollup merge of #103230 - nnethercote:clarify-startup, r=jyn514

Clarify startup

A small follow-up to #102769.

r? `@jyn514`

20 months agoRollup merge of #103221 - TaKO8Ki:fix-103202, r=oli-obk
Matthias Krüger [Thu, 20 Oct 2022 20:42:38 +0000 (22:42 +0200)]
Rollup merge of #103221 - TaKO8Ki:fix-103202, r=oli-obk

Fix `SelfVisitor::is_self_ty` ICE

Fixes #103202

20 months agochange rust version to fix CI
DrMeepster [Thu, 20 Oct 2022 06:06:01 +0000 (23:06 -0700)]
change rust version to fix CI

20 months agoremove redundant Ok(...?)
DrMeepster [Wed, 19 Oct 2022 06:50:39 +0000 (23:50 -0700)]
remove redundant Ok(...?)

20 months agocode reuse for sync ids
DrMeepster [Wed, 19 Oct 2022 01:24:16 +0000 (18:24 -0700)]
code reuse for sync ids

20 months agouse Default derive for InitOnceStatus
DrMeepster [Wed, 19 Oct 2022 00:23:17 +0000 (17:23 -0700)]
use Default derive for InitOnceStatus

20 months agoupdate rust version
DrMeepster [Tue, 18 Oct 2022 23:37:30 +0000 (16:37 -0700)]
update rust version

20 months agoadd test for init once
DrMeepster [Tue, 18 Oct 2022 07:48:40 +0000 (00:48 -0700)]
add test for init once

20 months agoadd windows one time initialization
DrMeepster [Tue, 18 Oct 2022 05:50:30 +0000 (22:50 -0700)]
add windows one time initialization

20 months agoImprove "`~const` is not allowed here" message
Deadbeef [Thu, 20 Oct 2022 19:32:16 +0000 (19:32 +0000)]
Improve "`~const` is not allowed here" message

20 months agointerpret: remove an incorrect assertion
Ralf Jung [Thu, 20 Oct 2022 17:06:34 +0000 (19:06 +0200)]
interpret: remove an incorrect assertion

20 months agono test in testsuite label
Michael Goulet [Thu, 20 Oct 2022 16:46:05 +0000 (16:46 +0000)]
no test in testsuite label

20 months agoAuto merge of #103092 - petrochenkov:weaklto, r=wesleywiser
bors [Thu, 20 Oct 2022 16:20:50 +0000 (16:20 +0000)]
Auto merge of #103092 - petrochenkov:weaklto, r=wesleywiser

linker: Fix weak lang item linking with combination windows-gnu + LLD + LTO

In https://github.com/rust-lang/rust/pull/100404 this logic was originally disabled for MSVC due to issues with LTO, but the same issues appear on windows-gnu with LLD because that LLD uses the same underlying logic as MSVC LLD, just with re-syntaxed command line options.

So this PR just disables it for LTO builds in general.

20 months agoMark `std::os::wasi::io::AsFd` etc. as stable.
Dan Gohman [Thu, 20 Oct 2022 15:04:19 +0000 (08:04 -0700)]
Mark `std::os::wasi::io::AsFd` etc. as stable.

io_safety was stabilized in Rust 1.63, so mark the io_safety exports in
`std::os::wasi::io` as stable.

Fixes #103306.

20 months agoAuto merge of #103290 - matthiaskrgr:rollup-ngozai3, r=matthiaskrgr
bors [Thu, 20 Oct 2022 13:33:50 +0000 (13:33 +0000)]
Auto merge of #103290 - matthiaskrgr:rollup-ngozai3, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #103197 (Stabilize proc_macro::Span::source_text)
 - #103251 (Fix item declaration highlighting)
 - #103262 (Adjusting test to needs-unwind, with linking issue)
 - #103268 (rustdoc: remove no-op CSS `nav.sub { font-size: 1rem }`)
 - #103272 (Remove extra spaces in docs)
 - #103276 (Erase regions before checking for `Default` in uninitialized binding error)

Failed merges:

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

20 months agoAuto merge of #2606 - cbiffle:nostdio, r=RalfJung
bors [Thu, 20 Oct 2022 11:09:41 +0000 (11:09 +0000)]
Auto merge of #2606 - cbiffle:nostdio, r=RalfJung

Magic functions for writing to stdout/stderr.

This enables I/O in no_std contexts (or, really, any Miri-specific OS-independent context). Combined with the `abort` intrinsic it should allow a reasonable test framework in no_std.

**Question for maintainers:** So, the `no_std` panic test needs work, for two reasons:

- First, its stdout includes Miri's whole message about the abort intrinsic having been used. I guess whatever panic handler you use in `std` contexts exits cleanly without triggering this message. Comparing the entire output with backtrace as golden seems fragile.
- Second, likely for the same reason, the test framework appears to expect the test to exit successfully, when in fact it exits with status 1 due to the abort. This means the test doesn't actually pass right now.

What shall I do there?

20 months agoAuto merge of #103185 - chenyukang:yukang/fix-span-next-point, r=davidtwco
bors [Thu, 20 Oct 2022 10:40:09 +0000 (10:40 +0000)]
Auto merge of #103185 - chenyukang:yukang/fix-span-next-point, r=davidtwco

Fix the bug of next_point in source_map

There is a bug in `next_point`, the new span won't move to next position when be called in the first time.

For this reason, our current code is working like this:
1. When we really want to move to the next position, we called two times of `next_point`
2. Some code which use `next_point` actually done the same thing with `shrink_to_hi`

This fix make sure when `next_point` is called, span will move with the width at least 1, and also work correctly in the scenario of multiple bytes.

Ref: https://github.com/rust-lang/rust/pull/103140#discussion_r997710998

r? `@davidtwco`

20 months agofix typo
cui fliter [Thu, 20 Oct 2022 10:00:36 +0000 (18:00 +0800)]
fix typo

20 months agoAdd GUI tests for collapse/expand actions
Guillaume Gomez [Thu, 20 Oct 2022 09:34:40 +0000 (11:34 +0200)]
Add GUI tests for collapse/expand actions

20 months ago+/- shortcut now only expand/collapse, not both
Guillaume Gomez [Thu, 20 Oct 2022 09:33:31 +0000 (11:33 +0200)]
+/- shortcut now only expand/collapse, not both

20 months agoRollup merge of #103276 - compiler-errors:default-on-uninit-ice, r=TaKO8Ki
Matthias Krüger [Thu, 20 Oct 2022 05:58:58 +0000 (07:58 +0200)]
Rollup merge of #103276 - compiler-errors:default-on-uninit-ice, r=TaKO8Ki

Erase regions before checking for `Default` in uninitialized binding error

Fixes #103250

20 months agoRollup merge of #103272 - clubby789:extra-spaces, r=thomcc
Matthias Krüger [Thu, 20 Oct 2022 05:58:57 +0000 (07:58 +0200)]
Rollup merge of #103272 - clubby789:extra-spaces, r=thomcc

Remove extra spaces in docs

Removing some random extra spaces in the examples for `core::sync::atomic`.

r? `@thomcc`

20 months agoRollup merge of #103268 - notriddle:notriddle/nav-sub-font-size, r=GuillaumeGomez
Matthias Krüger [Thu, 20 Oct 2022 05:58:57 +0000 (07:58 +0200)]
Rollup merge of #103268 - notriddle:notriddle/nav-sub-font-size, r=GuillaumeGomez

rustdoc: remove no-op CSS `nav.sub { font-size: 1rem }`

This rule originated as a `font-size: 16px`, when body had `font-size: 13px` set in 4fd061c426902b0904c65e64a3780b21f9ab3afb.

It remained even when body's font size was bumped up to 16px, 4d5f4ff5e9297dcad21612f9dd20ae4598b5b7e2, making the rule a no-op, and was carried forward when it was converted to 1rem in cc18120425a5c571a968d850c75cc935a8321136.

20 months agoRollup merge of #103262 - andrewpollack:switch-needs-unwind, r=tmandry
Matthias Krüger [Thu, 20 Oct 2022 05:58:56 +0000 (07:58 +0200)]
Rollup merge of #103262 - andrewpollack:switch-needs-unwind, r=tmandry

Adjusting test to needs-unwind, with linking issue

Test requires `needs-unwind` (see linked issue #103261)

20 months agoRollup merge of #103251 - GuillaumeGomez:item-decl-highlighting, r=notriddle
Matthias Krüger [Thu, 20 Oct 2022 05:58:56 +0000 (07:58 +0200)]
Rollup merge of #103251 - GuillaumeGomez:item-decl-highlighting, r=notriddle

Fix item declaration highlighting

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

As mentioned in the issue, https://github.com/rust-lang/rust/pull/102924 introduced this regression. This PR partially reverts it and adds a regression test.

r? `@notriddle`

20 months agoRollup merge of #103197 - est31:stabilize_proc_macro_source_text, r=petrochenkov
Matthias Krüger [Thu, 20 Oct 2022 05:58:55 +0000 (07:58 +0200)]
Rollup merge of #103197 - est31:stabilize_proc_macro_source_text, r=petrochenkov

Stabilize proc_macro::Span::source_text

Splits `proc_macro::Span::source_text` into a new feature gate and stabilizes it. The [FCP is complete](https://github.com/rust-lang/rust/issues/101991#issuecomment-1279393265).

```Rust
impl Span {
    pub fn source_text(&self) -> Option<String>;
}
```

Closes #101991

20 months agoAuto merge of #103220 - compiler-errors:deny-infers, r=lcnr
bors [Thu, 20 Oct 2022 05:56:56 +0000 (05:56 +0000)]
Auto merge of #103220 - compiler-errors:deny-infers, r=lcnr

Deny hashing ty/re/ct inference variables

cc `@cjgillot` and https://github.com/rust-lang/rust/pull/102695#issuecomment-1275706528
r? `@lcnr`

best reviewed one commit at a time, mostly because the second commit that fixes `ClosureOutlivesRequirement` is mostly noise because of losing its `<'tcx>` lifetime parameter.

20 months agoAdjust `transmute{,_copy}` to be clearer about which of `T` and `U` is input vs output
Thom Chiovoloni [Thu, 20 Oct 2022 02:07:24 +0000 (19:07 -0700)]
Adjust `transmute{,_copy}` to be clearer about which of `T` and `U` is input vs output

20 months agocheck if impl_self is `Some`
Takayuki Maeda [Thu, 20 Oct 2022 05:10:52 +0000 (14:10 +0900)]
check if impl_self is `Some`

20 months agoFixed docs typo in `library/std/src/time.rs`
John Higgins [Thu, 20 Oct 2022 04:49:29 +0000 (21:49 -0700)]
Fixed docs typo in `library/std/src/time.rs`

20 months agoAuto merge of #103205 - spastorino:fix-rpits-lifetime-remapping, r=cjgillot
bors [Thu, 20 Oct 2022 03:07:17 +0000 (03:07 +0000)]
Auto merge of #103205 - spastorino:fix-rpits-lifetime-remapping, r=cjgillot

Do anonymous lifetimes remapping correctly for nested rpits

Closes #103141

r? `@cjgillot` `@nikomatsakis`

This fixes a stable to stable regression that in my opinion is `P-critical` so, we probably want to backport it all the way up to stable.

20 months agoMagic functions for writing to stdout/stderr.
Cliff L. Biffle [Wed, 19 Oct 2022 20:16:29 +0000 (13:16 -0700)]
Magic functions for writing to stdout/stderr.

This enables I/O in no_std contexts (or, really, any Miri-specific
OS-independent context). Combined with the `abort` intrinsic it should
allow a reasonable test framework in no_std.

20 months agoAdjusting test to needs-unwind, with linking issue
Andrew Pollack [Wed, 19 Oct 2022 19:02:55 +0000 (19:02 +0000)]
Adjusting test to needs-unwind, with linking issue

20 months agoAuto merge of #102417 - oli-obk:opaque_lifetimes2, r=jackh726
bors [Thu, 20 Oct 2022 00:22:17 +0000 (00:22 +0000)]
Auto merge of #102417 - oli-obk:opaque_lifetimes2, r=jackh726

Require lifetime bounds for opaque types in order to allow hidden types to capture said lifetimes

fixes #96996

cc `@aliemjay`

20 months agoErase regions before checking for default in uninitialized binding error
Michael Goulet [Wed, 19 Oct 2022 23:35:47 +0000 (23:35 +0000)]
Erase regions before checking for default in uninitialized binding error

20 months agoRemove extra spaces
clubby789 [Wed, 19 Oct 2022 22:54:00 +0000 (23:54 +0100)]
Remove extra spaces

20 months agoAuto merge of #103264 - matthiaskrgr:rollup-3ja4spo, r=matthiaskrgr
bors [Wed, 19 Oct 2022 21:17:09 +0000 (21:17 +0000)]
Auto merge of #103264 - matthiaskrgr:rollup-3ja4spo, r=matthiaskrgr

Rollup of 7 pull requests

Successful merges:

 - #103211 (rustdoc: remove class name `location` from sidebar sibling nav)
 - #103223 (Use already checked RHS ty for LHS deref suggestions)
 - #103237 (Clean up codeblock-tooltip rustdoc-gui test)
 - #103239 (Allow #[unstable] impls for fn() with unstable abi.)
 - #103246 (Mark `rust-analyzer` as a host-only tool)
 - #103257 (rustdoc: move `setting-line` color CSS to settings.css)
 - #103258 (Make miri read_dir test a little more robust)

Failed merges:

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

20 months agorustdoc: remove no-op CSS `nav.sub { font-size: 1rem }`
Michael Howell [Wed, 19 Oct 2022 20:57:39 +0000 (13:57 -0700)]
rustdoc: remove no-op CSS `nav.sub { font-size: 1rem }`

This rule originated as a `font-size: 16px`, when body had `font-size: 13px`
set in 4fd061c426902b0904c65e64a3780b21f9ab3afb.

It remained even when body's font size was bumped up to 16px,
4d5f4ff5e9297dcad21612f9dd20ae4598b5b7e2, making the rule a no-op, and was
carried forward when it was converted to 1rem in
cc18120425a5c571a968d850c75cc935a8321136.

20 months agoDo anonymous lifetimes remapping correctly for nested rpits
Santiago Pastorino [Tue, 18 Oct 2022 17:05:17 +0000 (14:05 -0300)]
Do anonymous lifetimes remapping correctly for nested rpits

20 months agoExtract orig_opt_local_def_id as a function
Santiago Pastorino [Wed, 19 Oct 2022 19:49:21 +0000 (16:49 -0300)]
Extract orig_opt_local_def_id as a function

20 months agoRollup merge of #103258 - SUPERCILEX:miri, r=RalfJung
Matthias Krüger [Wed, 19 Oct 2022 19:38:42 +0000 (21:38 +0200)]
Rollup merge of #103258 - SUPERCILEX:miri, r=RalfJung

Make miri read_dir test a little more robust

r? `@RalfJung`

20 months agoRollup merge of #103257 - notriddle:notriddle/setting-line, r=GuillaumeGomez
Matthias Krüger [Wed, 19 Oct 2022 19:38:42 +0000 (21:38 +0200)]
Rollup merge of #103257 - notriddle:notriddle/setting-line, r=GuillaumeGomez

rustdoc: move `setting-line` color CSS to settings.css

20 months agoRollup merge of #103246 - ferrocene:pa-rust-analyzer-hosts, r=Mark-Simulacrum
Matthias Krüger [Wed, 19 Oct 2022 19:38:41 +0000 (21:38 +0200)]
Rollup merge of #103246 - ferrocene:pa-rust-analyzer-hosts, r=Mark-Simulacrum

Mark `rust-analyzer` as a host-only tool

All tools meant to be shipped with host toolchains only should be marked as `ONLY_HOSTS = true`, but rust-analyzer was marked as `ONLY_HOSTS = false` incorrectly. This meant that bootstrap attempted to build rust-analyzer for cross-compilation-only targets, causing errors because libstd is not present on some of them.

It will still be possible to cross-compile rust-analyzer by passing a different `--host` flag to `./x`, like you can cross-compile other tools.

The problem can be reproduced by running:

```
./x build src/tools/rust-analyzer --target x86_64-unknown-linux-gnu,aarch64-unknown-none
```

20 months agoRollup merge of #103239 - m-ou-se:unstable-abi-fn-impl-check, r=lcnr
Matthias Krüger [Wed, 19 Oct 2022 19:38:41 +0000 (21:38 +0200)]
Rollup merge of #103239 - m-ou-se:unstable-abi-fn-impl-check, r=lcnr

Allow #[unstable] impls for fn() with unstable abi.

This allows `#[unstable]` trait impls for `extern "unwind-C" fn()`, based on the fact that that abi and therefore that type is unstable.

See https://github.com/rust-lang/rust/pull/101263#issuecomment-1283099947

20 months agoRollup merge of #103237 - GuillaumeGomez:codeblock-tooltip-cleanup, r=notriddle
Matthias Krüger [Wed, 19 Oct 2022 19:38:40 +0000 (21:38 +0200)]
Rollup merge of #103237 - GuillaumeGomez:codeblock-tooltip-cleanup, r=notriddle

Clean up codeblock-tooltip rustdoc-gui test

r? ``@notriddle``

20 months agoRollup merge of #103223 - compiler-errors:deref-sugg-slow, r=wesleywiser
Matthias Krüger [Wed, 19 Oct 2022 19:38:40 +0000 (21:38 +0200)]
Rollup merge of #103223 - compiler-errors:deref-sugg-slow, r=wesleywiser

Use already checked RHS ty for LHS deref suggestions

There's no reason to do the `check_lhs_assignable` and RHS `check_expr_with_hint` in that order, so invert them and use the typeck results to avoid exponential blowup on error.

Fixes #103219

20 months agoRollup merge of #103211 - notriddle:notriddle/dot-location, r=GuillaumeGomez
Matthias Krüger [Wed, 19 Oct 2022 19:38:39 +0000 (21:38 +0200)]
Rollup merge of #103211 - notriddle:notriddle/dot-location, r=GuillaumeGomez

rustdoc: remove class name `location` from sidebar sibling nav

Preview: https://notriddle.com/notriddle-rustdoc-demos/sidebar-location/std/vec/struct.Vec.html

This change tweaks the CSS to apply most of its styles to `.sidebar h2`, cleaning up a few redundant rules from `.mobile-topbar .location` and restoring useful navigation aids in mobile mode.

## Before

![location-before](https://user-images.githubusercontent.com/1593513/196521014-d8730830-c3a2-4ed7-9266-05454cd31e05.png)

## After

![location-after](https://user-images.githubusercontent.com/1593513/196521020-75ec1fa5-b3dc-4c5d-97b6-afccb5fbe00a.png)

20 months agoAdd regression test for item-decl highlighting
Guillaume Gomez [Wed, 19 Oct 2022 15:15:11 +0000 (17:15 +0200)]
Add regression test for item-decl highlighting

20 months agoMake miri read_dir test a little more robust
Alex Saveau [Wed, 19 Oct 2022 17:43:57 +0000 (10:43 -0700)]
Make miri read_dir test a little more robust

Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
20 months agoDeny const variables as well
Michael Goulet [Wed, 19 Oct 2022 17:10:19 +0000 (17:10 +0000)]
Deny const variables as well

20 months agoDon't call `own_existential_vtable_entries` on unresolved trait ref
Michael Goulet [Wed, 19 Oct 2022 01:27:32 +0000 (01:27 +0000)]
Don't call `own_existential_vtable_entries` on unresolved trait ref

20 months agoMake ClosureOutlivesRequirement not rely on an unresolved type
Michael Goulet [Wed, 19 Oct 2022 01:20:24 +0000 (01:20 +0000)]
Make ClosureOutlivesRequirement not rely on an unresolved type

20 months agoDon't hash non-fresh Ty::Infer or RegionKind::Infer
Michael Goulet [Wed, 19 Oct 2022 00:19:28 +0000 (00:19 +0000)]
Don't hash non-fresh Ty::Infer or RegionKind::Infer

20 months agorustdoc: move `setting-line` color CSS to settings.css
Michael Howell [Wed, 19 Oct 2022 16:24:09 +0000 (09:24 -0700)]
rustdoc: move `setting-line` color CSS to settings.css

20 months agoFix regression in item-decl highlighting
Guillaume Gomez [Wed, 19 Oct 2022 15:14:50 +0000 (17:14 +0200)]
Fix regression in item-decl highlighting

20 months agoAuto merge of #2600 - saethlin:ice, r=RalfJung
bors [Wed, 19 Oct 2022 14:54:23 +0000 (14:54 +0000)]
Auto merge of #2600 - saethlin:ice, r=RalfJung

Fix ICE when trying to GC a Stack with an unknown bottom

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

`@RalfJung` I prefer this approach because the whole GC system is sloppy already in order to be efficient (doesn't run often, ignores small stacks) so a bit more imprecision for a simple implementation seems worth it to me. But I'm of course willing to be convinced otherwise.

20 months agoNever start the Stack::retain loop at offset 0 so that the left element is always...
Ben Kimock [Tue, 18 Oct 2022 02:17:07 +0000 (22:17 -0400)]
Never start the Stack::retain loop at offset 0 so that the left element is always inbounds

20 months agoAuto merge of #103214 - Nilstrieb:set-theory, r=petrochenkov
bors [Wed, 19 Oct 2022 13:53:06 +0000 (13:53 +0000)]
Auto merge of #103214 - Nilstrieb:set-theory, r=petrochenkov

Use Set instead of Vec in transitive_relation

Helps with #103195. It doesn't fix the underlying quadraticness but it makes it _a lot_ faster to an extent where even doubling the amount of nested references still takes less than two seconds (50s on nightly).

I want to see whether this causes regressions (because the vec was usually quite small) or improvements (as lookup for bigger sets is now much faster) in real code.

20 months agoAuto merge of #2604 - RalfJung:ret-scalar, r=RalfJung
bors [Wed, 19 Oct 2022 13:10:32 +0000 (13:10 +0000)]
Auto merge of #2604 - RalfJung:ret-scalar, r=RalfJung

use Scalar return types for Windows shims

I started doing this while working on https://github.com/rust-lang/miri/issues/2595; now I don't need the rest of this patch but this part still makes sense.

20 months agouse Scalar return types for Windows shims
Ralf Jung [Wed, 19 Oct 2022 12:41:31 +0000 (14:41 +0200)]
use Scalar return types for Windows shims

20 months agoAdd testcase for next_point, fix more trivial issues in find_width_of_character_at_span
yukang [Wed, 19 Oct 2022 03:46:26 +0000 (11:46 +0800)]
Add testcase for next_point, fix more trivial issues in find_width_of_character_at_span

20 months agomark rust-analyzer as a host-only tool
Pietro Albini [Wed, 19 Oct 2022 12:33:17 +0000 (14:33 +0200)]
mark rust-analyzer as a host-only tool

All tools meant to be shipped with host toolchains only should be marked
as `ONLY_HOSTS = true`, but rust-analyzer was marked as `ONLY_HOSTS =
false` incorrectly. This meant that bootstrap attempted to build
rust-analyzer for cross-compilation-only targets, causing errors because
libstd is not present on some of them.

It will still be possible to cross-compile rust-analyzer by passing a
different --host flag to ./x, like you can cross-compile other tools.

20 months agoAllow #[unstable] impl for fn() -> UnstableType.
Mara Bos [Wed, 19 Oct 2022 11:33:45 +0000 (13:33 +0200)]
Allow #[unstable] impl for fn() -> UnstableType.

(But not fn() -> !, which is stable.)

20 months agoAdd test for #[unstable] impl for fn() -> !.
Mara Bos [Wed, 19 Oct 2022 11:25:37 +0000 (13:25 +0200)]
Add test for #[unstable] impl for fn() -> !.

20 months agoAuto merge of #103228 - Dylan-DPC:rollup-31yiauw, r=Dylan-DPC
bors [Wed, 19 Oct 2022 11:12:10 +0000 (11:12 +0000)]
Auto merge of #103228 - Dylan-DPC:rollup-31yiauw, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #102863 (Standardize "use parentheses to call" suggestions between typeck and trait selection)
 - #103034 (Let expressions on RHS shouldn't be terminating scopes)
 - #103127 (Make transpose const and inline)
 - #103153 (Allow `Vec::leak` when using `no_global_oom_handling`)
 - #103182 (Clean up query descriptions)
 - #103216 (Consider patterns in fn params in an `Elided(Infer)` lifetime rib.)

Failed merges:

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