Matthias Krüger
99c6be1321
Rollup merge of #94754 - c410-f3r:nice-error, r=lcnr
...
Warn users about `||` in let chain expressions
Or more specifically, warn that `||` operators are forbidden.
This PR is simple so I guess anyone can review 🤷
cc #53667
cc ``@matthewjasper``
2022-03-09 23:14:13 +01:00
Matthias Krüger
ec09e70ee1
Rollup merge of #94739 - estebank:suggest-let-else, r=oli-obk
...
Suggest `if let`/`let_else` for refutable pat in `let`
r? `````@oli-obk`````
2022-03-09 23:14:11 +01:00
Matthias Krüger
d5c05fcc8a
Rollup merge of #93057 - frengor:iter_collect_into, r=m-ou-se
...
Add Iterator::collect_into
This PR adds `Iterator::collect_into` as proposed by ``@cormacrelf`` in #48597 (see https://github.com/rust-lang/rust/pull/48597#issuecomment-842083688 ).
Followup of #92982 .
This adds the following method to the Iterator trait:
```rust
fn collect_into<E: Extend<Self::Item>>(self, collection: &mut E) -> &mut E
```
2022-03-09 23:14:11 +01:00
Matthias Krüger
2567d0f883
Rollup merge of #92541 - asquared31415:from-docs, r=m-ou-se
...
Mention intent of `From` trait in its docs
This pr is a docs modification to add to the documentation of the `From` trait a note about its intent as a perfect conversion. This is already stated in the `TryFrom` docs so this is simply adding that information in a more visible way.
2022-03-09 23:14:10 +01:00
Matthias Krüger
c0259626b6
Rollup merge of #91804 - woppopo:const_clone, r=oli-obk
...
Make some `Clone` impls `const`
Tracking issue: #91805
`Clone::clone_from` and some impls (Option, Result) bounded on `~const Drop`.
```rust
// core::clone
impl const Clone for INTEGER
impl const Clone for FLOAT
impl const Clone for bool
impl const Clone for char
impl const Clone for !
impl<T: ?Sized> const Clone for *const T
impl<T: ?Sized> const Clone for *mut T
impl<T: ?Sized> const Clone for &T
// core::option
impl<T> const Clone for Option<T>
where
T: ~const Clone + ~const Drop
// core::result
impl<T, E> const Clone for Result<T, E>
where
T: ~const Clone + ~const Drop,
E: ~const Clone + ~const Drop,
// core::convert
impl const Clone for Infallible
// core::ptr
impl<T: ?Sized> const Clone for NonNull<T>
impl<T: ?Sized> const Clone for Unique<T>
```
2022-03-09 23:14:09 +01:00
ridwanabdillahi
eae68350c8
Add support for targeting riscv32im-unknown-none-elf
...
Update riscv32im-unknown-none-elf to Tier2 support.
Downgrade to Tier 3 platform support.
2022-03-09 13:51:29 -08:00
Jacob Pratt
38478ea0cd
Permit #[deprecated]
in stdlib
2022-03-09 16:32:47 -05:00
Jacob Pratt
5636655d0f
New deprecated_suggestion
feature, use in tests
2022-03-09 16:32:47 -05:00
Martin Gammelsæter
7f4f4fc34c
Use indexing instead of .get_unchecked() for LUT lookup
...
Based on @paolobarbolini's tip that the unsafe block was unnecessary in
this case.
Not much left of `hexify()` after this, so seemed clearer to just inline
it.
2022-03-09 22:21:35 +01:00
xFrednet
be84049570
Add comment about unfulfilled_lint_expectation
not being in a group (RFC 2383)
2022-03-09 21:58:13 +01:00
bors
458262b131
Auto merge of #94779 - GuillaumeGomez:ci-spurious-failures, r=Dylan-DPC
...
Fix spurious CI failures
This should fix the CI error encountered in https://github.com/rust-lang/rust/pull/94774 (and multiple others).
cc `@nikic`
2022-03-09 20:29:12 +00:00
Guillaume Gomez
18006a60d0
Fix spurious CI failures
2022-03-09 21:28:23 +01:00
fren_gor
63eddb3e68
Add tracking issue
2022-03-09 21:12:07 +01:00
Jubilee
89bc660d21
rust-lang/portable-simd#255 : run Miri on CI
...
This is allowed to fail, but might produce useful results to check on.
2022-03-09 12:08:31 -08:00
Caio
8073a88f35
Implement macro meta-variable expressions
2022-03-09 16:46:23 -03:00
Caio
915f9a599c
Warn users about || in let chain expressions
2022-03-09 15:04:09 -03:00
lancethepants
9c5616a195
Update armv7-unknown-linux-uclibceabi platform support page.
2022-03-09 10:50:49 -07:00
Michael Howell
32d7f8145a
diagnostics: use rustc_on_unimplemented to recommend [].iter()
...
To make this work, the `#[rustc_on_unimplemented]` data needs to be used to
report method resolution errors, which is most of what this commit does.
Fixes #94581
2022-03-09 09:52:55 -07:00
Martin Gammelsæter
876142417c
Optimize ascii::escape_default by using a digit LUT
2022-03-09 17:10:34 +01:00
Ralf Jung
4023d77e39
run Miri on CI (but allowed to fail)
2022-03-09 10:59:28 -05:00
Loïc BRANSTETT
6781016421
Add miri to the well known conditional compilation names and values
2022-03-09 16:58:07 +01:00
Mara Bos
4d56c1563c
Add documentation about lifetimes to thread::scope.
2022-03-09 15:20:00 +01:00
b-naber
021c3b011a
keep ERROR in message
2022-03-09 14:16:41 +01:00
Ralf Jung
adbd47973e
reduce number of tests being run under Miri
2022-03-09 07:54:49 -05:00
Loïc BRANSTETT
e346920907
Also take in account mdbook redirect in linkchecker
2022-03-09 13:45:50 +01:00
b-naber
18bb2dd7f1
manually bless 32-bit stderr
2022-03-09 13:39:25 +01:00
Raoul Strackx
491350ce75
Ignore close_read_wakes_up
test on SGX platform
2022-03-09 12:28:16 +01:00
Mara Bos
b97d87518d
Add soundness test for dropping scoped thread results before joining.
2022-03-09 11:47:53 +01:00
Mara Bos
1c06eb7c1f
Remove outdated comment.
2022-03-09 11:47:46 +01:00
Mara Bos
7a481ff8a4
Properly abort when thread result panics on drop.
2022-03-09 11:44:24 +01:00
Mara Bos
5226395d6f
Fix soundness issue in scoped threads.
2022-03-09 11:44:24 +01:00
b-naber
26fe550670
normalization change and rebase
2022-03-09 11:33:11 +01:00
Mara Bos
7c7411fb5d
Rename is_{some,ok,err}_with to is_{some,ok,err}_and.
2022-03-09 11:20:36 +01:00
b-naber
8a811a1213
bless tests
2022-03-09 10:52:04 +01:00
b-naber
40e4bd2d02
treat all mir::Constant values as ConstantKind::Val
2022-03-09 10:52:04 +01:00
Nikita Popov
6c58b5e1ab
Enable issue-23036.rs on wasm32
2022-03-09 10:03:58 +01:00
Nikita Popov
0c7d0a19dd
Use new pass manager on s390x with LLVM 14
...
The problematic compile-time issue should be resolved with this
version.
2022-03-09 10:00:23 +01:00
bors
10dccdc7fc
Auto merge of #94515 - estebank:tweak-move-error, r=davidtwco
...
Tweak move error
Point at method definition that causes type to be consumed.
Fix #94056 .
2022-03-09 08:58:47 +00:00
Nikita Popov
8a0045fd5b
Update LLVM submodule
2022-03-09 09:51:12 +01:00
bors
6045c34f15
Auto merge of #94761 - Dylan-DPC:rollup-v4emqsy, r=Dylan-DPC
...
Rollup of 6 pull requests
Successful merges:
- #94312 (Edit `rustc_trait_selection::infer::lattice` docs)
- #94583 (Add a team for '`@rustbot` ping fuchsia')
- #94686 (Do not allow `#[rustc_legacy_const_generics]` on methods)
- #94699 (BTree: remove dead data needlessly complicating insert)
- #94756 (Use `unreachable!` for an unreachable code path)
- #94759 (Update cargo)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-03-09 06:30:19 +00:00
Dylan DPC
822c4b6a92
Rollup merge of #94759 - ehuss:update-cargo, r=ehuss
...
Update cargo
11 commits in 3d6970d50e30e797b8e26b2b9b1bdf92dc381f34..65c82664263feddc5fe2d424be0993c28d46377a
2022-02-28 19:29:07 +0000 to 2022-03-09 02:32:56 +0000
- Remove remaining 2 warn(clippy::*) instances (rust-lang/cargo#10438 )
- Use `available_parallelism` instead of `num_cpus` (rust-lang/cargo#10427 )
- Wait up to one second while waiting for curl (rust-lang/cargo#10456 )
- Improve code coverage (rust-lang/cargo#10460 )
- Don't recommend leaking tokens into the console history (rust-lang/cargo#10458 )
- fix some typos (rust-lang/cargo#10454 )
- Use `extend` instead of `push`ing in a loop (rust-lang/cargo#10453 )
- Use locked_version more (rust-lang/cargo#10449 )
- Disable dependabot (rust-lang/cargo#10443 )
- Update git2 dependencies (rust-lang/cargo#10442 )
- Stop gating stable features (rust-lang/cargo#10434 )
2022-03-09 06:38:53 +01:00
Dylan DPC
28d06bdec9
Rollup merge of #94756 - ChrisDenton:unreachable, r=yaahc
...
Use `unreachable!` for an unreachable code path
Closes #73212
2022-03-09 06:38:53 +01:00
Dylan DPC
4de06d459f
Rollup merge of #94699 - ssomers:btree_prune_insert, r=Dylan-DPC
...
BTree: remove dead data needlessly complicating insert
Possibly needless instructions generated
r? rust-lang/libs
r? ``@Amanieu``
cc ``@frank-king``
2022-03-09 06:38:52 +01:00
Dylan DPC
3ce01f71ba
Rollup merge of #94686 - ChayimFriedman2:issue-94629, r=jackh726
...
Do not allow `#[rustc_legacy_const_generics]` on methods
It caused an ICE since `item` was `None`.
Fixes #94629 .
2022-03-09 06:38:51 +01:00
Dylan DPC
d365d5eeaf
Rollup merge of #94583 - dtolnay:fuchsia, r=Mark-Simulacrum
...
Add a team for '@rustbot ping fuchsia'
I was looking for this in response to https://github.com/rust-lang/rust/pull/93858#issuecomment-1041367498 .
Depends on https://github.com/rust-lang/team/pull/710 .
2022-03-09 06:38:50 +01:00
Dylan DPC
2b17c27626
Rollup merge of #94312 - pierwill:fix-94311-lattice-docs, r=jackh726
...
Edit `rustc_trait_selection::infer::lattice` docs
Closes #94311 .
Removes mentions of outdated/missing type and filename (`infer.rs` and `LatticeValue`).
2022-03-09 06:38:50 +01:00
Eric Huss
6fee0b0b71
Update cargo
2022-03-08 20:28:22 -08:00
bors
163c207fc2
Auto merge of #94750 - cuviper:dirent64_min, r=joshtriplett
...
unix: reduce the size of DirEntry
On platforms where we call `readdir` instead of `readdir_r`, we store
the name as an allocated `CString` for variable length. There's no point
carrying around a full `dirent64` with its fixed-length `d_name` too.
2022-03-09 02:17:58 +00:00
Chris Denton
57442beb18
Use unreachable!
for an unreachable code path
2022-03-09 01:05:47 +00:00
Loïc BRANSTETT
4e067e80eb
Improve rustdoc book
2022-03-09 00:55:29 +01:00