Commit Graph

221595 Commits

Author SHA1 Message Date
Vadim Petrochenkov
612ddd2196 std: Mark two reexports that should be inlined as doc(inline) 2023-04-08 13:29:16 +03:00
Vadim Petrochenkov
b20ecc7c35 rustdoc: Migrate some logic to module_reexports 2023-04-08 13:29:16 +03:00
Vadim Petrochenkov
d11b9165ee resolve: Preserve reexport chains in ModChildren
This may be potentially useful for
- avoiding uses of `hir::ItemKind::Use`
- preserving documentation comments on all reexports
- preserving and checking stability/deprecation info on reexports
- all kinds of diagnostics
2023-04-08 13:29:15 +03:00
Deadbeef
3b187c3253 Bump serde to use syn 2.0 2023-04-08 09:31:55 +00:00
klensy
fdfca765a7 fixup: use Bool instead of bool 2023-04-08 12:15:26 +03:00
bors
9e124c4f7a Auto merge of #110076 - Nilstrieb:rollup-22yp01c, r=Nilstrieb
Rollup of 5 pull requests

Successful merges:

 - #110030 (rustdoc: clean up JS)
 - #110037 (rustdoc: add test and bug fix for theme defaults)
 - #110065 (Fix wrong type in docs: i16 -> u16)
 - #110068 (Temporarily remove myself from reviewers list)
 - #110075 (Fix a typo in `config.example.toml`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-04-08 09:06:34 +00:00
Deadbeef
2412f1b645 bless ui tests 2023-04-08 08:50:46 +00:00
Nilstrieb
f80c60c554
Rollup merge of #110075 - KittyBorgX:master, r=Nilstrieb
Fix a typo in `config.example.toml`

It's a really small PR and probably got missed in the previous cleanup PR
2023-04-08 10:26:16 +02:00
Nilstrieb
57936197e9
Rollup merge of #110068 - eholk:eholk-on-vacation, r=wesleywiser
Temporarily remove myself from reviewers list

I'm going to be unable to review for the next few weeks, so I'm removing myself from the review queue. Once I'm back and able to review again, I'll add myself back to the list.

r? ``@wesleywiser``
2023-04-08 10:26:15 +02:00
Nilstrieb
965707ef0b
Rollup merge of #110065 - jbethune:master, r=ehuss
Fix wrong type in docs: i16 -> u16

``@rustbot`` label +A-docs

r? docs
2023-04-08 10:26:15 +02:00
Nilstrieb
370084860a
Rollup merge of #110037 - notriddle:notriddle/theme-default, r=GuillaumeGomez
rustdoc: add test and bug fix for theme defaults

Part of https://github.com/rust-lang/rust/issues/66181
2023-04-08 10:26:14 +02:00
Nilstrieb
77639c0947
Rollup merge of #110030 - notriddle:notriddle/clean-up-js, r=GuillaumeGomez
rustdoc: clean up JS

* Stop checking `func` in `onEach`. It's always hard-coded right at the call site, so there's no point.
* Use the ternary operator in a few spots where it makes sense.
* No point in making `onEach` store `arr.length` in a variable if it's only used once anyway.
2023-04-08 10:26:13 +02:00
Krishna Ramasimha
2b36f5a40f
Fix a typo in config.example.toml 2023-04-08 13:49:00 +05:30
Deadbeef
0cd49018d1 Revert "Make the Step implementations const."
This reverts commit 7bc67ef6e0.
2023-04-08 08:18:29 +00:00
Deadbeef
04a5d61161 Revert "Mark DoubleEndedIterator as #[const_trait] using rustc_do_not_const_check, implement const Iterator and DoubleEndedIterator for Range."
This reverts commit 8a9d6bf4fd.
2023-04-08 08:18:29 +00:00
bors
c49c4fba11 Auto merge of #109995 - enkron:u/enkron/substitute-hardcoded-port-num-in-listen-on-fn, r=the8472
chore(tcp): change a hardcoded port number in a doctest to `port` var

The `listen_on` function in the example has a `port` option but doesn't use it
2023-04-08 06:54:40 +00:00
Matt Harding
ee554e2444 Make "codegen" config.toml profile build llvm 2023-04-08 07:16:24 +01:00
Gimbles
f1ded91a48 rm box_items
fix in plugin.md

fmt
2023-04-08 11:24:24 +05:30
Gimbles
c80a69440c s/ignore_git/omit_git_hash 2023-04-08 11:08:01 +05:30
Matt Harding
c4f686401d Correct missed rename of config.example.toml
This commit:
fcb2a3665f (Rename `config.toml.example` to `config.example.toml`, 2023-03-11)
missed an instance in `config.example.toml` itself.
2023-04-08 06:36:59 +01:00
bors
131211acd2 Auto merge of #110043 - ickk:fix_infer_message, r=eholk
Fix help message for `infer_source_kind_subdiag_let`

I discovered there's a double "the" in the help message for E0282.
2023-04-08 03:26:54 +00:00
Scott McMurray
ed0b8af505 The wrapping_neg example for unsigned types shouldn't use i8 2023-04-07 20:09:15 -07:00
bors
0f0dc29264 Auto merge of #109971 - WaffleLapkin:yeet_ownership, r=Nilstrieb
Yeet `owning_ref`

Based on the discussions from https://github.com/rust-lang/rust/pull/109948

This replaces `owning_ref` with a far simpler & safer abstraction.

Fixes #109974
2023-04-08 01:08:26 +00:00
Andrew Xie
9920baba5f Switched provisional evaluation cache map to FxIndexMap, and replaced map.drain_filter with map.retain 2023-04-07 19:41:08 -04:00
bors
ba86600c94 Auto merge of #109448 - ozkanonur:download-beta-compiler-toolchain, r=Mark-Simulacrum
Download beta compiler toolchain in bootstrap if it doesn't yet exist

Blocker for #107812 and #99989

See: https://github.com/rust-lang/rust/pull/107812#discussion_r1143492202

r? `@jyn514`
2023-04-07 22:54:35 +00:00
Obei Sideg
066638b94a Migrate rustc_hir_analysis to session diagnostic
Part 3: Finishing `collect.rs` file
2023-04-08 01:24:54 +03:00
Eric Holk
f8b62ff535
Remove myself from reviewers list
I'm going to be unable to review for the next few weeks, so I'm
removing myself from the review queue. Once I'm back and able to review
again, I'll add myself back to the list.
2023-04-07 15:24:08 -07:00
Sergei Belokon
081e222d99 fix(tcp): remove redundant format! macro call 2023-04-08 08:20:05 +10:00
Jörn Bethune
7e9e91c3d3 Fix wrong type in docs: i16 -> u16
@rustbot label +A-docs

r? docs
2023-04-07 23:49:20 +02:00
ozkanonur
eeec73244d download beta compiler toolchain in bootstrap if it doesn't yet exist
This is needed for when the shell scripts bypass python altogether and run the downloaded
bootstrap directly. Changes are mainly provided from @jyn514, I just fixed the review notes.

Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-04-08 00:30:49 +03:00
bors
23ee2af2f7 Auto merge of #109788 - compiler-errors:trait-item-from-non-trait, r=petrochenkov
More descriptive error when qself path doesnt have a trait on the RHS of `as`

`<Ty as Enum>::Assoc` should report that `Enum` is a trait. Main question is whether to eagerly report the error, or raise it with `return Err(..)` -- i'll note that in an inline comment though.

cc `@GuillaumeGomez` who said this came up at a Paris Rust meetup.

r? `@petrochenkov`
2023-04-07 20:40:05 +00:00
Matthew Jasper
f7f2eb3e41 Move FnPtrAddr error to SessionDiagnostic 2023-04-07 19:48:27 +01:00
Maybe Waffle
5f50c0f7ac Document that &T and &mut T are Sync if T is 2023-04-07 18:36:48 +00:00
kadmin
b76dd8c807 Add feature gate 2023-04-07 11:18:07 -07:00
bors
da636956dd Auto merge of #109983 - tmiasko:inline-try, r=bjorn3
Inline try_from and try_into

To avoid link time dependency between core and compiler-builtins, when using opt-level that implicitly enables -Zshare-generics.

While compiler-builtins should be compiled with -Zshare-generics disabled, the -Zbuild-std does not ensure this at the moment.

r? `@bjorn3`
2023-04-07 17:06:24 +00:00
bors
94524020ea Auto merge of #110036 - jackh726:placeholder_boundvar, r=nnethercote
Remove u32 on BrAnon and BoundTyKind::Anon in favor of BoundVar on Placeholder types

r? `@nnethercote`

Better alternative to #110025
2023-04-07 14:26:24 +00:00
Nicholas Nethercote
f08f15481a Add a size assertion for RegionKind. 2023-04-07 09:15:38 -04:00
bors
da14081468 Auto merge of #102906 - nbdd0121:mir, r=wesleywiser,tmiasko
Refactor unwind in MIR

This makes unwinding from current `Option<BasicBlock>` into
```rust
enum UnwindAction {
	Continue,
	Cleanup(BasicBlock),
	Unreachable,
	Terminate,
}
```

cc `@JakobDegen` `@RalfJung` `@Amanieu`
2023-04-07 10:31:14 +00:00
Maybe Waffle
fbe0591c68 Mark OwnedSlice::{deref, borrow} as #[inline] 2023-04-07 10:14:50 +00:00
Gary Guo
ea69dad8fa Fix coverage test 2023-04-07 10:18:28 +01:00
Scott McMurray
1042b5df9b Avoid some manual slice length calculation
No need for us to write the multiplication when `size_of_val` does exactly what we need.
2023-04-07 01:32:12 -07:00
bors
b6f6104a1f Auto merge of #110019 - jplatte:jplatte/stabilize-is-some-and, r=Amanieu
Stabilize is_some_and

This stabilizes the following public API:

```rust
impl<T> Option<T> {
    pub fn is_some_and(self, f: impl FnOnce(T) -> bool) -> bool;
}

impl<T, E> Result<T, E> {
    pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool;
    pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool;
}
```

Closes #93050 (tracking issue).

`@rustbot` label +T-libs-api -T-libs
2023-04-07 08:09:20 +00:00
ickk
30f458ed1e update tests/ui 2023-04-07 18:07:11 +10:00
Tom Martin
668a62984a
Change type and field name to be clearer 2023-04-07 08:44:19 +01:00
ickk
726598ed9a fix infer_source_kind_subdiag_let help message - remove double "the" 2023-04-07 17:42:17 +10:00
Tom Martin
18388c9f73
Rewrite added diagnostics as translatable
Start messages with lowercase
2023-04-07 08:33:56 +01:00
León Orell Valerian Liehr
f2acafe9e2 suggest adding const param 2023-04-07 09:11:53 +02:00
bors
97879ce24b Auto merge of #109990 - gwy15:remove-bufwriter-useless-mut-pointer, r=jyn514
Remove an unnecessary `mut` in `BufWriter::into_parts`.

`ptr::read` takes `*const T` so `&mut` is not necessary.
2023-04-07 05:49:34 +00:00
Michael Goulet
d5b1ef1c3f Use smart-resolve when checking for trait in RHS of UFCS 2023-04-07 05:33:52 +00:00
bors
32ea4bb9e3 Auto merge of #109663 - fee1-dead-contrib:rustc_macros-syn-2.0, r=Nilstrieb
migrate rustc_macros to syn 2.0

WIP at this point since I need to work on migrating the code that heavily uses `NestedMeta` for parsing. Perhaps a full refactor would be nice..
2023-04-07 03:37:21 +00:00