Commit Graph

208698 Commits

Author SHA1 Message Date
Ryan Lopopolo
d0a33f25d5
Bless ui tests 2022-10-19 19:17:32 -07:00
Ryan Lopopolo
16dd5737b0
Add default trait implementations for "c-unwind" ABI function pointers
Following up on #92964, only add default trait implementations for the
`c-unwind` family of function pointers. The previous attempt in #92964
added trait implementations for many more ABIs and ran into concerns
regarding the increase in size of the libcore rlib.

An attempt to abstract away function pointer types behind a unified
trait to reduce the duplication of trait impls is being discussed in #99531
but this change looks to be blocked on a lang MCP.

Following @RalfJung's suggestion in
https://github.com/rust-lang/rust/pull/99531#issuecomment-1233440142,
this commit is another cut at #92964 but it _only_ adds the impls for
`extern "C-unwind" fn` and `unsafe extern "C-unwind" fn`.

I am interested in landing this patch to unblock the stabilization of
the `c_unwind` feature.

RFC: https://github.com/rust-lang/rfcs/pull/2945
Tracking Issue: https://github.com/rust-lang/rust/issues/74990
2022-10-19 19:17:32 -07:00
Finn Bear
4f44d6253d Put fn in the right place. 2022-10-19 19:15:58 -07:00
Finn Bear
f81cd87eea Copy of #102941. 2022-10-19 19:07:45 -07:00
Andrew Pollack
205006660a Adjusting test to needs-unwind, with linking issue 2022-10-20 01:04:39 +00:00
Thom Chiovoloni
4b66432268
Update libstd's libc to 0.2.135 2022-10-19 17:54:55 -07:00
bors
cb9467515b 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`
2022-10-20 00:22:17 +00:00
Michael Goulet
c5c9f74829 Erase regions before checking for default in uninitialized binding error 2022-10-19 23:36:28 +00:00
clubby789
19bc8fb05a Remove extra spaces 2022-10-19 23:54:00 +01:00
bors
a77ac93b2a Auto merge of #13128 - Veykril:invocation-strategy, r=Veykril
Implement invocation strategy config

Fixes https://github.com/rust-lang/rust-analyzer/issues/10793

This allows to change how we run build scripts (and `checkOnSave`), exposing two configs:
- `once`: run the specified command once in the project root (the working dir of the server)
- `per_workspace`: run the specified command per workspace in the corresponding workspace

This also applies to `checkOnSave` likewise, though `once_in_root` is useless there currently, due to https://github.com/rust-lang/cargo/issues/11007
2022-10-19 21:53:19 +00:00
Lukas Wirth
46732369f4 Remove simplistic interpolation for manifest-path 2022-10-19 23:53:00 +02:00
Lukas Wirth
7db50294a3 {manifest-path} interpolation 2022-10-19 23:21:34 +02:00
Lukas Wirth
5174b65ed8 Use correct invocation strategy config for checkOnSave 2022-10-19 23:21:34 +02:00
Lukas Wirth
4a287d2525 Implement invocation strategy config for checkOnSave
Note that due to how cargo works, none of the modes currently work for r-a
2022-10-19 23:21:34 +02:00
Lukas Wirth
7e2c41dbd6 Implement invocation strategy config for build scripts 2022-10-19 23:21:29 +02:00
bors
57781b24c5 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
2022-10-19 21:17:09 +00:00
Michael Howell
0dd329f687 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 4fd061c426.

It remained even when body's font size was bumped up to 16px,
4d5f4ff5e9, making the rule a no-op, and was
carried forward when it was converted to 1rem in
cc18120425.
2022-10-19 13:57:39 -07:00
bors
82ac6f7d48 Auto merge of #13441 - Veykril:sysroot-logging, r=Veykril
Add some sysroot logging
2022-10-19 20:27:09 +00:00
Lukas Wirth
653dafa7b1 Add some sysroot logging 2022-10-19 22:26:44 +02:00
Santiago Pastorino
49ce8a22b0
Do anonymous lifetimes remapping correctly for nested rpits 2022-10-19 16:49:39 -03:00
Santiago Pastorino
fb5475887f
Extract orig_opt_local_def_id as a function 2022-10-19 16:49:39 -03:00
Matthias Krüger
652417e332
Rollup merge of #103258 - SUPERCILEX:miri, r=RalfJung
Make miri read_dir test a little more robust

r? `@RalfJung`
2022-10-19 21:38:42 +02:00
Matthias Krüger
952c15622a
Rollup merge of #103257 - notriddle:notriddle/setting-line, r=GuillaumeGomez
rustdoc: move `setting-line` color CSS to settings.css
2022-10-19 21:38:42 +02:00
Matthias Krüger
e85def73b5
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
```
2022-10-19 21:38:41 +02:00
Matthias Krüger
12775ce16a
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
2022-10-19 21:38:41 +02:00
Matthias Krüger
d17cef67a2
Rollup merge of #103237 - GuillaumeGomez:codeblock-tooltip-cleanup, r=notriddle
Clean up codeblock-tooltip rustdoc-gui test

r? ``@notriddle``
2022-10-19 21:38:40 +02:00
Matthias Krüger
e500dcb8cb
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
2022-10-19 21:38:40 +02:00
Matthias Krüger
433f736b86
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)
2022-10-19 21:38:39 +02:00
bors
339257397d Auto merge of #13439 - Veykril:simplify, r=Veykril
Simplify
2022-10-19 19:18:00 +00:00
Lukas Wirth
9d3e616f82 Simplify 2022-10-19 21:17:11 +02:00
Guillaume Gomez
b4e06a74ca Add regression test for item-decl highlighting 2022-10-19 21:03:11 +02:00
Alex Saveau
b0f693552d
Make miri read_dir test a little more robust
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2022-10-19 11:48:56 -07:00
Josh Stone
f8e157b33f Fixup a few tests needing asm support 2022-10-19 11:34:00 -07:00
Michael Goulet
6b0ef9c810 Deny const variables as well 2022-10-19 17:11:40 +00:00
Michael Goulet
1e2eb97c6e Don't call own_existential_vtable_entries on unresolved trait ref 2022-10-19 17:11:40 +00:00
Michael Goulet
a6b5f95fb0 Make ClosureOutlivesRequirement not rely on an unresolved type 2022-10-19 17:10:59 +00:00
Michael Goulet
91af4f5d0b Don't hash non-fresh Ty::Infer or RegionKind::Infer 2022-10-19 17:10:58 +00:00
Michael Howell
db570586a5 rustdoc: move setting-line color CSS to settings.css 2022-10-19 09:24:09 -07:00
León Orell Valerian Liehr
2cc4a0aad7
rustdoc: render bounds of cross-crate GAT params 2022-10-19 17:59:05 +02:00
León Orell Valerian Liehr
f543770de2
rustdoc: Do not filter out Self: Sized bounds 2022-10-19 17:27:08 +02:00
Guillaume Gomez
a1d4ebe496 Fix regression in item-decl highlighting 2022-10-19 17:14:50 +02:00
bors
43de83e02d 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.
2022-10-19 14:54:23 +00:00
Ben Kimock
e7faf046c0 Never start the Stack::retain loop at offset 0 so that the left element is always inbounds 2022-10-19 10:45:35 -04:00
Vadim Petrochenkov
ba4834c092 resolve: Revert "Set effective visibilities for imports more precisely" 2022-10-19 18:42:47 +04:00
nils
ccc54613c3
Get rid of native_library projection queries
They don't seem particularly useful as I don't expect
native libraries to change frequently.
2022-10-19 16:21:21 +02:00
bors
1afc7e227d Auto merge of #9634 - royrustdev:fix_redundant_allocation, r=Manishearth
Update Applicability of `redundant_allocation` lint from `MachineApplicable` to `MaybeIncorrect`

This changes `redundant_allocation` lint from MachineApplicable to MaybeIncorrect

```
changelog: [`redundant_allocation]: Change Applicability from MachineApplicable to MaybeIncorrect

```

fixes #6243

---
changelog: [`redundant_allocation`]: Change Applicability from MachineApplicable to MaybeIncorrect
2022-10-19 13:58:48 +00:00
bors
4b8f431995 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.
2022-10-19 13:53:06 +00:00
bors
4207f9e088 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.
2022-10-19 13:10:32 +00:00
Ralf Jung
804cf26cc7 use Scalar return types for Windows shims 2022-10-19 15:09:13 +02:00
yukang
eb8aa9759d Add testcase for next_point, fix more trivial issues in find_width_of_character_at_span 2022-10-19 21:08:00 +08:00