Commit Graph

199920 Commits

Author SHA1 Message Date
Michael Howell
bff8078fb4 rustdoc: remove no-op #search { margin-left: 0 }
This rule was added in c729e4dca7 to remove an
unnecessary left margin that was present on desktop. This desktop-mode margin
was itself removed in 135281ed15.
2022-09-11 18:32:19 -07:00
bors
fa521a4691 Auto merge of #101688 - cjgillot:verify-hir-parent, r=petrochenkov
Assert that HIR nodes are not their own parent.

Fixes https://github.com/rust-lang/rust/issues/101505.
Replaces #101513

r? `@petrochenkov` `@nnethercote`
2022-09-12 00:41:56 +00:00
bors
98e1f041b6 Auto merge of #101442 - joboet:null_check_tcs, r=thomcc
Check if TCS is a null pointer on SGX

The `EENTER` instruction only checks if the TCS is aligned, not if it zero. Saying the address returned is a `NonNull<u8>` (for which `Tcs` is a type alias) is unsound. As well-behaved runners will not put the TCS at address zero, so the definition of `Tcs` is correct. However, `std` should check the address before casting it to a `NonNull`.

ping `@jethrogb` `@raoulstrackx`
`@rustbot` label I-unsound
2022-09-11 22:19:24 +00:00
Guillaume Gomez
d010f95af1 Update tests for new browser-ui-test version 2022-09-11 22:09:23 +02:00
bors
59e7a308e4 Auto merge of #101299 - saethlin:vecdeque-drain-drop, r=thomcc
Remove &[T] from vec_deque::Drain

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

I don't know what the right approach is here. There were a few suggestions in the issue, and they all seem a bit thorny to implement. So I just picked one that was kind of familiar.
2022-09-11 19:50:41 +00:00
Nixon Enraght-Moony
c3fcfa8272 Rustdoc-Json: Add tests for trait impls. 2022-09-11 20:32:47 +01:00
Camille GILLOT
51f486931f Assert that HIR nodes are not their own parent. 2022-09-11 20:12:51 +02:00
bors
0d56e34047 Auto merge of #101678 - jannic:fix-101640, r=jyn514
Add diagnostic arg 'current_crate'

With this fix, I get almost the same error message as on stable, again.

However, I expected to get the new error message `std is required by {$current_crate} because it does not declare #![no_std]`, but I didn't. Instead, I got a new line `help: consider building the standard library from source with cargo build -Zbuild-std`. So I obviously do not fully understand what is going on.

In any case, the bug itself seems to be fixed by this patch.

Closes #101640
2022-09-11 16:30:59 +00:00
zahash
a91e6188e4 replace i.e. with e.g. in readme which is more accurate given the context 2022-09-11 21:15:55 +05:30
KaDiWa
66211d83f9
Avoid Iterator::last 2022-09-11 17:23:00 +02:00
bors
17a627fe87 Auto merge of #101682 - compiler-errors:rpitit-encode, r=fee1-dead
Only encode return-position `impl Trait` in trait when parent function has a default body

Semi-blocked on #101679, because I can't currently write a test for when we _should_ encode the type of the return-position `impl Trait` in trait, which is when a trait has a default function body, like so:

```rust
trait Foo {
  fn bar() -> impl Sized { }
}
```

Though this can land even without #101679, since it does prevent ICEs from occuring any time you use `#![feature(return_position_impl_trait_in_trait)]` in a library, which is kind annoying.
2022-09-11 13:49:52 +00:00
bors
2e9f1204ca Auto merge of #13214 - SpencerSharkey:ubuntu-container-build, r=lnicola
Build release artifact against older Glibc

When GitHub [deprecated Ubuntu 18.04](https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/) runners, rust-analyzer was forced to bump runners to 20.04 which includes an updated Glib. This renders RA incompatible with the still popular Ubuntu 18.04 and other slightly older distro versions.

Until a deprecation plan is announced on RA's side, I propose binaries shall be built against older glibc to maintain compatibility.

This PR changes the Release CI workflow to build the `linux-x64/x86_64-unknown-linux-gnu` release in an Ubuntu 18.04 container.

Fixes #13081 and #13085
2022-09-11 11:34:25 +00:00
zahash
5b758f0d9a smol grammar changes to README.md 2022-09-11 16:39:19 +05:30
joboet
2fa58080cb
std: check if TCS is a null pointer 2022-09-11 12:15:32 +02:00
Michael Goulet
1335da9d48 Only encode RPITIT when trait method has default body 2022-09-11 09:36:02 +00:00
Michael Goulet
89b6488ef0 Deny RPITIT for object safety 2022-09-11 09:14:07 +00:00
bors
6f0c4a6c5c Auto merge of #101673 - crlf0710:generator_clone, r=oli-obk
Allow generators to impl Clone/Copy

Revives #95137. It's a pity that the original pr didn't land because the implementation is almost complete! All credits goes to `@canndrew,` and i just resolved the merge conflicts and updated the feature gate version number.

r? `@oli-obk`
2022-09-11 08:50:35 +00:00
Jan Niehusmann
156717d3e5 Add diagnostic arg 'current_crate' 2022-09-11 07:15:23 +00:00
winxpqq955
2126622887 Add test for #101211 2022-09-11 15:09:39 +08:00
Michael Goulet
fd2766e7fd Check that the types in RPITITs are WF 2022-09-11 06:58:11 +00:00
Spencer
73d759955f
use rustup minimal profile and add curl retries 2022-09-10 23:43:33 -07:00
Spencer
ae57150d0d
add rustup bin to path 2022-09-10 23:29:15 -07:00
bors
4c3f8eb277 Auto merge of #101670 - obi1kenobi:patch-1, r=jyn514
Add @obi1kenobi to the cc list for rustdoc-json-types

I'm one of the maintainers of `cargo-semver-checks`, and as mentioned [in Zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Long.20Term.20Rustdoc.20JSON.20Stability) it's very useful to me to know about upcoming rustdoc JSON types changes so I can be ready to publish new `cargo-semver-checks` releases compatible with the new JSON format.
2022-09-11 06:27:29 +00:00
Spencer
dd65588c51
install rustup directly 2022-09-10 23:25:30 -07:00
Charles Lew
4e9bcb5d54 Update unit test outputs 2022-09-11 14:21:40 +08:00
Charles Lew
0f367a9be8 Use current rustc version. 2022-09-11 14:04:18 +08:00
Andrew Cann
9cd008f514 fix tests after rebase 2022-09-11 14:04:18 +08:00
Andrew Cann
d9a17229dc test async diagnostics for feature(generator_clone) 2022-09-11 14:04:17 +08:00
Andrew Cann
62112f4dc1 minor fixups as per PR feedback 2022-09-11 14:04:17 +08:00
Andrew Cann
543023c249 Add some comments to generator clone shim code 2022-09-11 14:04:17 +08:00
Andrew Cann
1bc9453aa8 Add tracking issue number to feature(generator_clone) 2022-09-11 14:04:17 +08:00
Andrew Cann
fa6dbcf20d Add feature gate tests for generator_clone 2022-09-11 14:04:16 +08:00
Andrew Cann
22f4bbb20f Apply formatting fixes 2022-09-11 14:04:16 +08:00
Andrew Cann
8aa30dd3cb move generator_clone feature definition
Move it to the list of features with no tracking issue, since it has no
tracking issue.
2022-09-11 14:04:16 +08:00
Andrew Cann
c1f1bc6e8f fix GeneratorWitness: Clone check 2022-09-11 14:04:16 +08:00
Andrew Cann
a5cb3cca5e loosen restriction on when GeneratorWitness: Clone 2022-09-11 14:04:15 +08:00
Andrew Cann
0228c073e0 add generator_clone feature gate 2022-09-11 14:04:12 +08:00
Andrew Cann
2c0bc9444e implement Copy/Clone for generators 2022-09-11 13:50:35 +08:00
bors
56b625be68 Auto merge of #101482 - joboet:netbsd_parker, r=sanxiyn
Optimize thread parking on NetBSD

As the futex syscall is not present in the latest stable release, NetBSD cannot use the efficient thread parker and locks Linux uses. Currently, it therefore relies on a pthread-based parker, consisting of a mutex and semaphore which protect a state variable. NetBSD however has more efficient syscalls available: [`_lwp_park`](https://man.netbsd.org/_lwp_park.2) and [`_lwp_unpark`](https://man.netbsd.org/_lwp_unpark.2). These already provide the exact semantics of `thread::park` and `Thread::unpark`, but work with thread ids. In `std`, this ID is here stored in an atomic state variable, which is also used to optimize cases were the parking token is already available at the time `thread::park` is called.

r? `@m-ou-se`
2022-09-11 04:07:17 +00:00
LingMan
fd21df7182 Fix naming format of IEEE 754 standard
Currently the documentation of f64::min refers to "IEEE-754 2008" while the documentation of
f64::minimum refers to "IEEE 754-2019".
Note that one has the format IEEE,hyphen,number,space,year while the other is
IEEE,space,number,hyphen,year. The official IEEE site [1] uses the later format and it is also the
one most commonly used throughout the codebase.

Update all comments and - more importantly - documentation to consistently use the official format.

[1] https://standards.ieee.org/ieee/754/4211/
2022-09-11 04:13:33 +02:00
Predrag Gruevski
a1fa958cf3
Add @obi1kenobi to the cc list for rustdoc-json-types 2022-09-10 22:04:57 -04:00
bors
abd4d2ef0d Auto merge of #101643 - ChrisDenton:alloc-link-kernel32, r=thomcc
Explicitly link kernel32.lib from alloc
2022-09-11 01:44:09 +00:00
Spencer
b843b8801d
revert conditional logic for apt update step 2022-09-10 18:10:56 -07:00
yukang
975dd6cdea fix #101626, suggest pub instead of public for const type item 2022-09-11 08:29:38 +08:00
bors
781ef3e995 Auto merge of #101613 - GuillaumeGomez:codeblock-tooltip, r=notriddle
Simplify codeblock and their associated tooltip

It is based on https://github.com/rust-lang/rust/pull/101600 so it needs to wait for this one to be merged first.

This PR does two things:

 * Remove CSS class duplication by setting CSS classes such as `compile_fail` directly on the `div` wrapping both the codeblock and the tooltip.
 * Simplify DOM: no need to wrap the tooltip into a `<div>`, it can work just as well without it.

You can test it [here](https://rustdoc.crud.net/imperio/codeblock-tooltip/std/string/struct.String.html#deref).

r? `@notriddle`
2022-09-10 23:13:23 +00:00
Ben Kimock
54684c438f Alternate approach; just modify Drain 2022-09-10 17:52:34 -04:00
Ben Kimock
25f4cb59d3 Remove &[T] from vec_deque::Drain 2022-09-10 17:52:34 -04:00
bors
2287107588 Auto merge of #98559 - jackh726:remove-reempty, r=oli-obk
Remove ReEmpty

r? rust-lang/types
2022-09-10 20:54:01 +00:00
joboet
81b11ed698
std: optimize thread parking on NetBSD 2022-09-10 20:03:15 +02:00
bors
4a6ac3c225 Auto merge of #101647 - crlf0710:test_for_99551, r=bjorn3
Fix LLVM IR type mismatch reported in #99551

Closes #99551 .
2022-09-10 17:39:16 +00:00