Commit Graph

215100 Commits

Author SHA1 Message Date
Yuki Okushi
80c3ec84a6
Rollup merge of #106657 - jyn514:review, r=Mark-Simulacrum
Remove myself from rust-lang/rust reviewers

I don't have time to both review and work on my foundation grant.
2023-01-11 14:18:56 +09:00
Yuki Okushi
8f57062970
Rollup merge of #106653 - ehuss:allow-features-help, r=nilstrieb
Fix help docs for -Zallow-features

The arguments for -Zallow-features are comma-separated (`parse_opt_comma_list`), not space separated (`parse_list`).
2023-01-11 14:18:55 +09:00
Yuki Okushi
e078d82711
Rollup merge of #106645 - c410-f3r:rfc-2397-1, r=oli-obk
[RFC 2397] Initial implementation

cc #51992

Because of previous experiences where ppl didn't have the time to review large PRs (or any at all), the implementation of this feature will be delivered in small chunks to hopefully make things faster.

In this initial PR, only the attribute is being declared and gated with ordinary tests.
2023-01-11 14:18:55 +09:00
Yuki Okushi
f547c4b33a
Rollup merge of #106642 - albertlarsan68:test-106062, r=JohnTitor
Add test for #106062

Add a regression test for #106062

Closes #106062
2023-01-11 14:18:54 +09:00
Yuki Okushi
397013dc44
Rollup merge of #106635 - RalfJung:std-test-nits, r=thomcc
std sync tests: better type name, clarifying comment

Just resolving some confusion that I encountered while reading these tests.

r? `@thomcc`
2023-01-11 14:18:54 +09:00
Yuki Okushi
b0ffc113a4
Rollup merge of #106628 - GuillaumeGomez:rm-itemid-primitive, r=notriddle
Remove unneeded ItemId::Primitive variant

As I mentioned [here](https://github.com/rust-lang/rust/pull/106412#issuecomment-1371405115), I wondered if `ItemId::Primitive` was actually used for anything. Apparently, it seems so because removing it led to no changes as far as I and tests could see.

r? `@notriddle`
2023-01-11 14:18:53 +09:00
Yuki Okushi
12b124283c
Rollup merge of #106521 - oskgo:remove-E0280, r=jackh726
remove E0280

After looking at #61137 I tried my hand at E0280. I'm unable to find a reasonable example that emits the error. There are a couple of old examples that compile with the current compiler ([#26217](https://github.com/rust-lang/rust/issues/26217), [#42114](https://github.com/rust-lang/rust/issues/42114), [#27113](https://github.com/rust-lang/rust/issues/27113)) and there is a [bug with chalk](b7cdb635c4/src/test/ui/chalkify/bugs/async.rs) that makes it emit the error, with a couple more chalk bugs on zulip.

It seems like the error is supposed to be emitted from unfulfilled where bounds, of which two are related to borrow checking (error in where T: 'a or where 'a: 'b) and thus tend to emit errors like "lifetime may not live long enough" from borrow checking instead. The final case is with type equality constraints (where <T as Iterator>::Item == u32), which is unimplemented ([#20041](https://github.com/rust-lang/rust/issues/20041)). That such different problems are supposed to have the same error code also seems strange to me.

Since the error seems to only be emitted when using chalk I propose to remove it and replace it with an ICE instead. A crater run might be warranted.

Pinging `@jackh726` due to removal of chalk test that now ICEs.
2023-01-11 14:18:53 +09:00
Yuki Okushi
8d7a06aece
Rollup merge of #105194 - tmiasko:cleanup-kinds, r=davidtwco
Add comment to cleanup_kinds

based on the original commit message 1ae7ae0c1c
2023-01-11 14:18:52 +09:00
Eric Huss
bb60a764f6 Remove duplicate sha-1 dependency 2023-01-10 21:02:06 -08:00
Ibraheem Ahmed
f8276c94ac add SyncSender::send_timeout test 2023-01-10 21:54:53 -05:00
Ibraheem Ahmed
2538c0c170 fix SyncSender spinning behavior 2023-01-10 21:39:02 -05:00
Michael Goulet
7c2d48bcc2 Add compiler-errors to some trait system notification groups 2023-01-11 00:32:52 +00:00
bors
15226f91bb Auto merge of #10166 - sulami:master, r=giraffate
unused_self: Don't trigger if the method body contains todo!()

If the author is using todo!(), presumably they intend to use self at some point later, so we don't have a good basis to recommend factoring out to an associated function.

Fixes #10117.

---

changelog: Enhancement: [`unused_self`]: No longer lints, if the method body contains a `todo!()` call
[#10166](https://github.com/rust-lang/rust-clippy/pull/10166)
<!-- changelog_checked -->
2023-01-11 00:30:19 +00:00
bors
bf7ea0d11b Auto merge of #106687 - pietroalbini:pa-cve-nightly, r=pietroalbini
[nightly] Fix CVE-2022-46176

See https://blog.rust-lang.org/2023/01/10/cve-2022-46176.html

r? `@ghost`
2023-01-10 22:49:23 +00:00
Alan Egerton
1a87ed9a45
mv binary_heap.rs binary_heap/mod.rs 2023-01-10 18:01:39 +00:00
Guillaume Gomez
36c9b49c14 Remove unneeded ItemId::Primitive variant 2023-01-10 18:30:37 +01:00
Guillaume Gomez
719f545831 Add GUI test for item declaration block scrolling 2023-01-10 18:27:42 +01:00
Guillaume Gomez
0399a636e6 Fix scrolling for item declaration block 2023-01-10 18:27:42 +01:00
Guillaume Gomez
2214c6d194 Fix invalid files array re-creation in rustdoc-gui tester 2023-01-10 18:16:43 +01:00
Pietro Albini
e491b080b3
update release notes for 1.66.1 2023-01-10 17:28:38 +01:00
Pietro Albini
4f40eee2bc
bump Cargo submodule to fix CVE-2022-46176 2023-01-10 17:28:37 +01:00
yukang
f7bc68bb4e use with_capacity in read read_to_string 2023-01-11 00:19:27 +08:00
Pietro Albini
04acc1d9dc
disable fast submodule checkout due to spurious ci failures 2023-01-10 16:33:16 +01:00
Robert Bastian
8ca900b01c rename 2023-01-10 11:12:54 +01:00
Tomasz Miąsko
72f8d6a659 Change type of box_noalias to bool 2023-01-10 10:14:59 +01:00
Tomasz Miąsko
78075e1e26 Change type of mutable_noalias to bool 2023-01-10 10:14:51 +01:00
Tomasz Miąsko
836ef6162d Add comment to cleanup_kinds
based on the original commit message 1ae7ae0c1c
2023-01-10 09:53:18 +01:00
Albert Larsan
1300c8d272
Check compiler docs in PR CI 2023-01-10 08:43:54 +00:00
ozkanonur
5fb9ca3c5e create helper function for rustc_lint_defs::Level and remove it's duplicated code r=ozkanonur
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-01-10 10:56:17 +03:00
bors
0442fbabe2 Auto merge of #106607 - compiler-errors:be-more-accurate-abt-method-suggestions, r=oli-obk
Consider return type when giving various method suggestions

1. Fix a bug in method probe where we weren't normalizing `xform_ret_ty` for non-`impl` method candidates. This shouldn't affect happy-path code, since we only use `xform_ret_ty` when probing methods for diagnostics (I think).
2. Pass the return type expectation down to `lookup_probe`/`probe_for_name` usages in diagnostics. Added a few UI tests to gate against bad suggestions.
3. Make a `FnCtxt::lookup_probe_for_diagnostic` which properly passes down `IsSuggestion(true)`. Should help suppress other weird notes in some corner cases.
2023-01-10 06:22:01 +00:00
bors
deba5ddd07 Auto merge of #106656 - JohnTitor:rollup-rk2qltg, r=JohnTitor
Rollup of 9 pull requests

Successful merges:

 - #105034 (Add example for iterator_flatten)
 - #105708 (Enable atomic cas for bpf targets)
 - #106175 (Fix bad import suggestion with nested `use` tree)
 - #106204 (No need to take opaques in `check_type_bounds`)
 - #106387 (Revert "bootstrap: Get rid of `tail_args` in `stream_cargo`")
 - #106636 (Accept old spelling of Fuchsia target triples)
 - #106639 (update Miri)
 - #106640 (update test for inductive canonical cycles)
 - #106647 (rustdoc: merge common CSS for `a`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-01-10 03:26:29 +00:00
Ezra Shaw
203bbfa2f7
impl: specialize impl of ToString on bool 2023-01-10 15:34:21 +13:00
bowlerman
f75eb24f4f remove E0280 and ICE instead 2023-01-10 03:04:28 +01:00
Eric Huss
2717f60093 Update mdbook 2023-01-09 17:04:14 -08:00
bors
d53924d8c7 Auto merge of #106495 - JohnTitor:issue-100772, r=compiler-errors
Add regression test for #100772

Closes #100772
r? `@compiler-errors`
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-01-10 00:22:16 +00:00
Rejyr
88e5dd2530 refactor: cleanup 2023-01-09 18:57:02 -05:00
Rejyr
fe09291036 migrate: deref_into_dyn_supertrait.rs 2023-01-09 18:57:02 -05:00
Rejyr
f38db48dbd add: allow lints in lints.rs 2023-01-09 18:57:02 -05:00
Rejyr
758140e196 migrate: rest of builtin.rs without builtin_asm_labels 2023-01-09 18:56:59 -05:00
Caio
c43faf110d [RFC 2397] Initial implementation 2023-01-09 20:51:01 -03:00
Joshua Nelson
2ee546aa5e Remove myself from rust-lang/rust reviewers
I don't have time to both review and work on my foundation grant.
2023-01-09 17:39:12 -06:00
Yuki Okushi
ed840a6c3b
Rollup merge of #106647 - notriddle:notriddle/a, r=GuillaumeGomez
rustdoc: merge common CSS for `a`
2023-01-10 08:05:37 +09:00
Yuki Okushi
9bed3d96e6
Rollup merge of #106640 - lcnr:update-test, r=jackh726
update test for inductive canonical cycles

the previous test always resulted in a cycle 😅 cc https://github.com/rust-lang/chalk/pull/787.

I checked with #102713 and this is the only test which fails with that PR.

r? ``@jackh726``
2023-01-10 08:05:36 +09:00
Yuki Okushi
0ba27de3ac
Rollup merge of #106639 - RalfJung:miri, r=RalfJung
update Miri

Notable PRs:
- https://github.com/rust-lang/miri/pull/2748
- https://github.com/rust-lang/miri/pull/2752

r? `@ghost`
2023-01-10 08:05:36 +09:00
Yuki Okushi
96e53c0c6c
Rollup merge of #106636 - djkoloski:accept_old_fuchsia_triple, r=tmandry
Accept old spelling of Fuchsia target triples

The old spelling of Fuchsia target triples was changed in #106429 to add a proper vendor. Because the old spelling is widely used, some projects may need time to migrate their uses to the new triple spelling. The old spelling may eventually be removed altogether.

r? ``@tmandry``
2023-01-10 08:05:35 +09:00
Yuki Okushi
b102673698
Rollup merge of #106387 - jyn514:clippy, r=Mark-Simulacrum
Revert "bootstrap: Get rid of `tail_args` in `stream_cargo`"

This reverts commit 9dfe50440e. (Note: that merged as part of https://github.com/rust-lang/rust/pull/106305, but https://github.com/rust-lang/rust/pull/106305/ contains more commits than just 9dfe50440e6d48bd2fd40a4b7b3992998e55eace.)

Fixes `x clippy`. It turns out `clippy` was the only one using `tail_args` 🤦 sorry for not testing this earlier.

r? `@Mark-Simulacrum`
2023-01-10 08:05:35 +09:00
Yuki Okushi
e5e116dca9
Rollup merge of #106204 - compiler-errors:no-take-opaques-in-compare, r=oli-obk
No need to take opaques in `check_type_bounds`

`InferCtxt` already has its defining use anchor set to err

r? ``@oli-obk``
2023-01-10 08:05:34 +09:00
Yuki Okushi
684a3717cb
Rollup merge of #106175 - compiler-errors:bad-import-sugg, r=oli-obk
Fix bad import suggestion with nested `use` tree

Fixes #105566
Fixes #105373

Ideally, we'd find some way to turn these into structured suggestions -- perhaps on a separate line as a different `use` statement, but I have no idea how to access the span for the whole `use` from this point in the import resolution code.
2023-01-10 08:05:34 +09:00
Yuki Okushi
5773e8baf0
Rollup merge of #105708 - tomerze:enable-atomic-cas-bpf, r=nagisa
Enable atomic cas for bpf targets

It seems like LLVM now supports it.

https://reviews.llvm.org/D72184 - the PR in LLVM
2023-01-10 08:05:33 +09:00
Yuki Okushi
002eccc752
Rollup merge of #105034 - HintringerFabian:improve_iterator_flatten_doc, r=cuviper
Add example for iterator_flatten

Adds an Example to iterator_flatten
Fixes #82687
2023-01-10 08:05:32 +09:00