Commit Graph

221919 Commits

Author SHA1 Message Date
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
zhaixiaojuan
a3f0046142 Define MIN_ALIGN for loongarch64 2023-04-08 00:09:54 +08:00
zhaixiaojuan
bf1758d229 Define UNWIND_DATA_REG for loongarch64 2023-04-08 00:09:54 +08: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
bluthej
9ec542873c Add 5 other container types and start testing 2023-04-07 16:07:43 +02:00
Nicholas Nethercote
f08f15481a Add a size assertion for RegionKind. 2023-04-07 09:15:38 -04:00
bors
592ea3954d Auto merge of #10604 - blyxyas:fix-book_broken_links, r=flip1995
(Small) Fix broken links for Rust merge

rust-lang/rust#110003's CI is [currently broken](https://github.com/rust-lang/rust/actions/runs/4628510374/jobs/8187672234?pr=110003) because of broken links. This PR fixes that.
It was tested against `lintcheck` and found another broken link in `usage.md` (apart from CI's broken links)

changelog:Fix broken links in the book
Sorry for putting more work on you, but you're the one doing the Rust PR
r? `@flip1995`
2023-04-07 11:51:08 +00:00
bors
4a2cb5a7b8 Auto merge of #10497 - y21:outer_doc_comment_bang, r=dswij
new lint: suspicious_doc_comments

Fixes #10485.

This PR adds a new lint (`suspicious_doc_comments`) that triggers when the user writes `///!` or `/**!`.
This is almost certainly a mistake and the user probably meant to write an inner doc comment (`//!`, `/*!`) to document the module or crate that this comment is contained in.

changelog: [`suspicious_doc_comments`]: new lint
2023-04-07 11:14:10 +00:00
blyxyas
90e6ddc8e7
New chapter: "Type Checking" 2023-04-07 13:11:18 +02: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
y21
5d01e6e96c new lint: suspicious_doc_comments 2023-04-07 12:04:55 +02: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
bors
b8cbce8e6a Auto merge of #10601 - schubart:manual_slice_size_calculation, r=llogiq
Add [`manual_slice_size_calculation`]

Fixes: #10518

---

changelog: new lint [`manual_slice_size_calculation`]
2023-04-07 07:39:11 +00: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
Michael Howell
5cad51c0c5 rustdoc: add test and bug fix for theme defaults 2023-04-06 20:25:07 -07:00
Tom Martin
5c5c3c9527
Add more complex test cases for new suggestion 2023-04-07 04:22:43 +01:00
Jack Huey
b15195a304 Remove u32 on BoundTyKind::Anon 2023-04-06 23:08:04 -04:00
Jack Huey
f0edcc8a6f Remove index from BrAnon 2023-04-06 23:01:40 -04:00