Commit Graph

167113 Commits

Author SHA1 Message Date
Michael Woerister
c0be619724 incr. comp.: Don't export impl_stable_hash_via_hash!() and warn about using it. 2022-04-19 10:43:20 +02:00
Mara Bos
06a8f05b0c Use futex locks on emscripten. 2022-04-19 09:24:51 +02:00
Mara Bos
8f2913cc24 Use futex locks on wasm+atomics. 2022-04-19 09:21:54 +02:00
Mara Bos
65987ae8f5 Make std::sys::wasm::futex consistent with unix::futex. 2022-04-19 09:21:54 +02:00
Mara Bos
6abdd0b6d4 Make std::sys::unix::futex consistent on emscripten. 2022-04-19 09:19:29 +02:00
Nicholas Nethercote
d235ac7801 Handle Delimited opening immediately.
Instead of letting the next iteration of the loop handle it.
2022-04-19 17:02:49 +10:00
Nicholas Nethercote
29c78cc086 Add {open,close}_delim arguments to TokenCursorFrame::new().
This will facilitate the change in the next commit.

`boolean` arguments aren't great, but the function is only used in three
places within this one file.
2022-04-19 17:02:48 +10:00
Nicholas Nethercote
02317542eb Rearrange TokenCursor::inlined_next().
In particular, avoid wrapping a token within `TokenTree::Token` and then
immediately matching it and returning the token within. Just return the
token immediately.
2022-04-19 17:02:48 +10:00
Nicholas Nethercote
b1e6dee596 Merge TokenCursor::{next,next_desugared}.
And likewise for the inlined variants.

I did this for simplicity, but interesting it was a performance win as
well.
2022-04-19 17:02:48 +10:00
Nicholas Nethercote
89ec75b0e9 Inline and remove Parser::next_tok().
It has a single call site.
2022-04-19 17:02:48 +10:00
Nicholas Nethercote
aefbbeec34 Inline and remove TokenTree::{open_tt,close_tt}.
They both have a single call site.
2022-04-19 17:02:48 +10:00
Nicholas Nethercote
ad566b78f2 Tweak Cursor::next_with_spacing.
This makes it more like `CursorRef::next_with_spacing`. There is no
performance effect, just a consistency improvement.
2022-04-19 17:02:48 +10:00
Chris Morgan
0255398ff7 Improve AddrParseError description
The existing description was incorrect for socket addresses, and
misleading: users would see “invalid IP address syntax” and suppose they
were supposed to provide an IP address rather than a socket address.

I contemplated making it two variants (IP, socket), but realised we can
do still better for the IPv4 and IPv6 types, so here it is as six.

I contemplated more precise error descriptions (e.g. “invalid IPv6
socket address syntax: expected a decimal scope ID after %”), but that’s
a more invasive change, and probably not worthwhile anyway.
2022-04-19 13:02:20 +10:00
bors
e2661bac6d Auto merge of #95379 - icewind1991:suggest-associated-type-more, r=jackh726
show suggestion to replace generic bounds with associated types in more cases

Moves the hint to replace generic parameters with associated type bounds from the "not all associated type bounds are specified"(`E0191`) to "to many generic type parameters provided"(`E0107`).

Since `E0191` is only emitted in places where all associated types must be specified (when creating `dyn` types), the suggesting is currently not shown for other generic type uses (such as in generic type bounds). With this change the suggesting is always emitted when the number of excess generic parameters matches the number of unbound associated types.

Main motivation for the change was a lack of useful suggesting when doing

```rust
fn foo<I: Iterator<usize>>(i: I) {}
```
2022-04-19 01:59:35 +00:00
Erik Desjardins
1bbae507d4 mark payload fields of ScalarPair enums as Scalar::Union when they're not always initialized 2022-04-18 21:43:20 -04:00
Joshua Nelson
b4ca06558a Remove assertion that all paths in ShouldRun exist
This breaks on submodules (see #96188). Disable the assertion for now until I can think of a proper
fix.

This doesn't revert any of the changes in `Step`s themselves, only what
`ShouldRun::paths` does.
2022-04-18 20:21:19 -05:00
Dan Gohman
19ef182655 Update the expected stderr for coerce-issue-49593-box-never. 2022-04-18 17:32:25 -07:00
Dan Gohman
b7ff10378c Update the expected stderr for coerce-issue-49593-box-never.
This test's expected stderr now includes a count of the number of types
that implment `Error`. This PR introduces two new types, so increment
the number by two.
2022-04-18 16:53:50 -07:00
Dan Gohman
890125d73e Add a comment explaining the (()) idiom for empty structs. 2022-04-18 16:53:50 -07:00
Dan Gohman
f934043c17 Split NotHandle into NullHandleError and InvalidHandleError.
Also, make the display messages more specific, and remove the `Copy`
implementation.
2022-04-18 16:53:50 -07:00
Dan Gohman
67994b77fd Move the Error impl for NotHandle out of platform-independent code. 2022-04-18 16:53:49 -07:00
Dan Gohman
5b3023c564 Fix an incorrect word in a comment. 2022-04-18 16:53:38 -07:00
Dan Gohman
703a33673d Define a dedicated error type for HandleOrNull and HandleOrInvalid.
Define a `NotHandle` type, that implements `std::error::Error`, and use
it as the error type in `HandleOrNull` and `HandleOrInvalid`.
2022-04-18 16:53:36 -07:00
bors
d5ae66c12c Auto merge of #92287 - JulianKnodt:slice_remainder, r=yaahc
Add slice::remainder

This adds a remainder function to the Slice iterator, so that a caller can access unused
elements if iteration stops.

Addresses #91733
2022-04-18 23:34:24 +00:00
est31
3c1e1661e7 Remove unused macro rules 2022-04-18 23:28:06 +02:00
Guillaume Gomez
8d0e10cfbe Correctly handle single : 2022-04-18 23:11:42 +02:00
bors
311e2683e1 Auto merge of #96171 - nikic:llvm-update-2, r=cuviper
Update LLVM submodule

Merge upstream release/14.x branch.

Fixes #94762.
2022-04-18 20:53:42 +00:00
Gary Guo
8693227e5e Skip broken symbol visibility test in MinGW 2022-04-18 20:50:56 +01:00
Gary Guo
e2fdb84df7 Conditionally export msan symbols only if they are defined
* `__msan_keep_going` is defined when `-Zsanitizer-recover=memory`.
* `__msan_track_origins` is defined when `-Zsanitizer-memory-track-origins`.
2022-04-18 20:50:56 +01:00
Gary Guo
c475117ffb Refactor exported_symbols and linked_symbols for code reuse 2022-04-18 20:50:56 +01:00
Gary Guo
78f0e72431 Ignore paths in temporary dir in reproducible build test 2022-04-18 20:50:56 +01:00
Gary Guo
773f533eae Synthesis object file for #[used] and exported symbols 2022-04-18 20:50:56 +01:00
Gary Guo
a1dae4bc9d Make #[used] considered reachable 2022-04-18 20:50:56 +01:00
Gary Guo
49cc6d1f84 Add SymbolExportInfo
This is currently a wrapper to `SymbolExportLevel` but it allows
later addition of extra information.
2022-04-18 20:50:56 +01:00
Gary Guo
419e3ba97b Add a test for issue 47384 2022-04-18 20:50:56 +01:00
Guillaume Gomez
5c6c1e110f Add test to ensure that keywords in path are working 2022-04-18 21:43:19 +02:00
Guillaume Gomez
299e8ee25e Add an extra check over filter type 2022-04-18 21:43:19 +02:00
ouz-a
5364c86e8e replace iter with into_iter() 2022-04-18 22:05:16 +03:00
Guillaume Gomez
d7d538a8c4 Fix some corner cases 2022-04-18 20:59:09 +02:00
Guillaume Gomez
da363b2fc9 Add more tests for quote errors 2022-04-18 20:59:09 +02:00
Guillaume Gomez
6f35475ba5 Parse idents the same way in both quote string elements and "normal" elements 2022-04-18 20:59:09 +02:00
Guillaume Gomez
a6051c76db Remove unnecessary elem.name.length === 0 since the rustdoc search eBNF does not allow elements without a name 2022-04-18 20:59:09 +02:00
Guillaume Gomez
ab9cf32131 Add tests for paths 2022-04-18 20:59:09 +02:00
Guillaume Gomez
51b4005003 Update the eBNF to allow generics bracket to not be closed if it's EOF 2022-04-18 20:59:09 +02:00
Guillaume Gomez
e03a950747 Handle separators in their own functions and fix missing handling of tabs 2022-04-18 20:59:09 +02:00
Guillaume Gomez
da829d8d9d Improve the BNF description a bit and fix some issues 2022-04-18 20:59:09 +02:00
Guillaume Gomez
1f5c4c2b30 Forbid rustdoc search query to end with -> 2022-04-18 20:59:09 +02:00
Guillaume Gomez
8e29ed43d9 Add isIdentCharacter function to ensure that unexpected characters are handled correctly 2022-04-18 20:59:09 +02:00
Guillaume Gomez
f9251eef68 Replace unneeded use of regex with a simple if 2022-04-18 20:59:09 +02:00
Guillaume Gomez
699ae365df Apply suggestions:
* Forbid generics without a path (so "<p>" is forbidden).
 * Change `handleSingleArg` so that it takes `results_others`, `results_in_args` and `results_returned` as arguments instead of using the "global" variables.
 * Change `createQueryElement` so that it returns the newly created element instead of taking `elems` as argument.
 * Improve documentation
2022-04-18 20:59:09 +02:00