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
Guillaume Gomez
c7de1a16f8
Improve documentation and add some explanations in the code
2022-04-18 20:59:09 +02:00
Guillaume Gomez
49297337b4
Simplify parser syntax
2022-04-18 20:59:08 +02:00
Guillaume Gomez
99d552092c
Make query parser more strict and improve display of errors
2022-04-18 20:59:08 +02:00
Guillaume Gomez
264064df36
* Greatly improve the rustdoc search parser source code
...
* Move all functions outside parseQuery
2022-04-18 20:59:08 +02:00
Guillaume Gomez
99c5394ecc
Add query syntax for the parser
2022-04-18 20:59:08 +02:00
Guillaume Gomez
51de26cfd9
* If type filter is in quotes, throw an error.
...
* If there are generics, don't allow to have quotes.
2022-04-18 20:59:08 +02:00
Guillaume Gomez
bbcf1762dd
Improve naming of "val" field
2022-04-18 20:59:08 +02:00
Guillaume Gomez
f5833e759e
Add parser tests
2022-04-18 20:59:08 +02:00
Guillaume Gomez
7cefee027a
Add possibility to check parsed query
2022-04-18 20:59:08 +02:00
Guillaume Gomez
0f51652ad3
Update tests
2022-04-18 20:59:08 +02:00
Guillaume Gomez
3aeef67037
Update search engine and parser to error when quotes are used on queries with more than one element.
2022-04-18 20:59:08 +02:00
Guillaume Gomez
be41750a10
Greatly improve rustdoc search
2022-04-18 20:59:08 +02:00
bors
cbdf17c884
Auto merge of #8707 - OneSignal:await-invalid-types, r=llogiq
...
Add `await_holding_invalid_type` lint
changelog: [`await_holding_invalid_type`]
This lint allows users to create a denylist of types which are not allowed to be
held across await points. This is essentially a re-implementation of the
language-level [`must_not_suspend`
lint](https://github.com/rust-lang/rust/issues/83310 ). That lint has a lot of
work still to be done before it will reach Rust stable, and in the meantime
there are a lot of types which can trip up developers if they are used
improperly.
I originally implemented this specifically for `tracing::span::Entered`, until I discovered #8434 and read the commentary on that PR. Given this implementation is fully user configurable, doesn't tie clippy to any one particular crate, and introduces no additional dependencies, it seems more appropriate.
2022-04-18 18:36:50 +00:00
Lily Mara
05086858c4
fixup! Add await_holding_invalid_type
lint
2022-04-18 11:32:28 -07:00
Lily Mara
8eccbbed68
fixup! Add await_holding_invalid_type
lint
2022-04-18 11:30:59 -07:00
bors
8305398d7a
Auto merge of #96178 - Dylan-DPC:rollup-6z8pcob, r=Dylan-DPC
...
Rollup of 5 pull requests
Successful merges:
- #96032 (Update books)
- #96136 (Reword clarification on lifetime for ptr->ref safety docs)
- #96143 (Fix snapshot --bless not working anymore in htmldocck)
- #96148 (Use revisions instead of nll compare mode for `/self/` ui tests)
- #96156 (Replace u8to64_le macro with u64::from_le_bytes)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-04-18 18:29:46 +00:00
Lily Mara
7e26edce65
fixup! Add await_holding_invalid_type
lint
2022-04-18 11:16:35 -07:00
Lily Mara
a511072c2c
fixup! Add await_holding_invalid_type
lint
2022-04-18 10:34:25 -07:00
Lily Mara
ee3ebb35f4
Update clippy_lints/src/await_holding_invalid.rs
...
Co-authored-by: llogiq <bogusandre@gmail.com>
2022-04-18 10:32:11 -07:00
Lily Mara
228ce783bc
Update clippy_lints/src/await_holding_invalid.rs
...
Co-authored-by: llogiq <bogusandre@gmail.com>
2022-04-18 10:32:03 -07:00
Lily Mara
6d0baf2b16
Update clippy_lints/src/await_holding_invalid.rs
...
Co-authored-by: llogiq <bogusandre@gmail.com>
2022-04-18 10:31:57 -07:00
Ralf Jung
55f0977a6b
remove an unnecessary use of loc_place.ptr.into_pointer_or_addr
2022-04-18 12:47:38 -04:00