Commit Graph

124866 Commits

Author SHA1 Message Date
bors
8e738539be Auto merge of #75310 - petrochenkov:needwasm, r=Mark-Simulacrum
tests: Mark `ui/asm/bad-arch.rs` as requiring wasm llvm backend

So it doesn't fail when not all LLVM backends are built.
2020-08-09 08:52:53 +00:00
Vadim Petrochenkov
bef1ee3857 tests: Mark ui/asm/bad-arch.rs as requiring wasm llvm backend 2020-08-09 11:40:48 +03:00
kadmin
be0d6f1c06 Change Ord impl for ParamKindOrd
Updated tests and error msgs

Update stderr from test

Update w/ lcnr comments

Change some tests around, and also updated Ord implementation for ParamKindOrd

Update w/ nits from lcnr
2020-08-09 07:41:26 +00:00
kadmin
4f461f5d12 Switched to unordered field in ParamKindOrd
Run fmt
2020-08-09 07:41:26 +00:00
kadmin
1ae1a6332c Add ParamKindOrd::ConstUnordered variant 2020-08-09 07:41:26 +00:00
kadmin
319c4f45e0 Blessed old test where error message had changed
Added minor fmt change to ast_validation
2020-08-09 07:41:26 +00:00
kadmin
b8352eb2d1 Test lifetimes after types after consts forbidden
Added more complex test and changed error message
2020-08-09 07:41:24 +00:00
kadmin
f8588284af Added +1 test for only works w/ feat const gen
Added this test to ensure that reordering the parameters only works with the feature const
generics enabled.

Fixed nits

Also added another test to verify that intermixed lifetimes are forbidden
2020-08-09 07:41:22 +00:00
Esteban Küber
4dbe0ac928 Detect likely for foo of bar JS syntax
Fix #75311.
2020-08-08 20:53:40 -07:00
bors
f50f1c8e17 Auto merge of #75280 - overdrivenpotato:psp-unwind, r=dtolnay
Add back unwinding support for Sony PSP

This PR adds back unwinding support for the Sony PSP. The `mipsel-sony-psp` target works well with unwinding. In [rust-psp], we use the `panic_unwind` crate along with LLVM's libunwind to catch panics, run destructors, and print them to the debug screen without aborting all threads.

[rust-psp]: https://github.com/overdrivenpotato/rust-psp
2020-08-09 03:07:00 +00:00
bors
aced185592 Auto merge of #75306 - Amanieu:hashbrown8, r=Mark-Simulacrum
Update hashbrown to 0.8.2

Includes:
- Avoid closures to improve compile times (https://github.com/rust-lang/hashbrown/pull/183)
- Do not iterate to drop if empty (https://github.com/rust-lang/hashbrown/pull/182)

r? @Mark-Simulacrum
2020-08-09 01:05:56 +00:00
bors
dcf107728c Auto merge of #75308 - JohnTitor:rollup-vnnny43, r=JohnTitor
Rollup of 15 pull requests

Successful merges:

 - #74712 (Update E0271 explanation)
 - #74842 (adjust remaining targets)
 - #75151 (Consistent variable name alloc for raw_vec)
 - #75162 (Fix the documentation for move about Fn traits implementations)
 - #75248 (Add `as_mut_ptr` to `NonNull<[T]>`)
 - #75262 (Show multi extension example for Path in doctests)
 - #75266 (Add safety section to `NonNull::as_*` method docs)
 - #75284 (Show relative example for Path ancestors)
 - #75285 (Separate example for Path strip_prefix)
 - #75287 (Show Path extension example change multi extension)
 - #75288 (Use assert! for Path exists example to check bool)
 - #75289 (Remove ambiguity from PathBuf pop example)
 - #75290 (fix `min_const_generics` version)
 - #75291 (Clean up E0750)
 - #75292 (Clean up E0502)

Failed merges:

r? @ghost
2020-08-08 23:05:49 +00:00
Yuki Okushi
e6dfd308d3
Rollup merge of #75292 - slanterns:cleanup-E0502, r=GuillaumeGomez
Clean up E0502

`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead.
2020-08-09 06:41:39 +09:00
Yuki Okushi
bc3ee48fd2
Rollup merge of #75291 - GuillaumeGomez:cleanup-e0750, r=pickfire
Clean up E0750

r? @Dylan-DPC
2020-08-09 06:41:37 +09:00
Yuki Okushi
55f2490a59
Rollup merge of #75290 - rust-lang:min_const_generics-version, r=jonas-schievink
fix `min_const_generics` version

https://github.com/rust-lang/rust/pull/74877#discussion_r467451813

> This should be 1.47.0
2020-08-09 06:41:35 +09:00
Yuki Okushi
3038ecb07b
Rollup merge of #75289 - pickfire:patch-12, r=jonas-schievink
Remove ambiguity from PathBuf pop example
2020-08-09 06:41:33 +09:00
Yuki Okushi
6baee9557a
Rollup merge of #75288 - pickfire:patch-11, r=jonas-schievink
Use assert! for Path exists example to check bool
2020-08-09 06:41:32 +09:00
Yuki Okushi
42e163bf40
Rollup merge of #75287 - pickfire:patch-10, r=jonas-schievink
Show Path extension example change multi extension
2020-08-09 06:41:30 +09:00
Yuki Okushi
28ab318f57
Rollup merge of #75285 - pickfire:patch-8, r=jonas-schievink
Separate example for Path strip_prefix
2020-08-09 06:41:28 +09:00
Yuki Okushi
27b864b154
Rollup merge of #75284 - pickfire:patch-7, r=LukasKalbertodt
Show relative example for Path ancestors
2020-08-09 06:41:27 +09:00
Yuki Okushi
cb75fea1cc
Rollup merge of #75266 - aticu:master, r=RalfJung
Add safety section to `NonNull::as_*` method docs

This basically adds the safety section of `*mut T::as_{ref,mut}` to the
same methods on `NonNull` with minor modifications to fit the
differences.

Part of #48929.
2020-08-09 06:41:25 +09:00
Yuki Okushi
cbc6914baa
Rollup merge of #75262 - pickfire:patch-6, r=jyn514
Show multi extension example for Path in doctests
2020-08-09 06:41:23 +09:00
Yuki Okushi
c85075d522
Rollup merge of #75248 - TimDiekmann:NonNull-as_mut_ptr, r=RalfJung
Add `as_mut_ptr` to `NonNull<[T]>`

Adds `as_mut_ptr` to shortcut converting a `NonNull<[T]>` to `*mut T` as proposed in https://github.com/rust-lang/rust/issues/74265#issuecomment-669702969.

r? @RalfJung
2020-08-09 06:41:22 +09:00
Yuki Okushi
ccffe18c3e
Rollup merge of #75162 - poliorcetics:move-documentation-fix, r=jyn514
Fix the documentation for move about Fn traits implementations

Fixes #74997.

This uses the note from the [reference](https://doc.rust-lang.org/reference/types/closure.html#call-traits-and-coercions) but I can also just put a link to it or do both.

@rusbot modify labels: C-bug T-doc T-libs
2020-08-09 06:41:20 +09:00
Yuki Okushi
3370ac0042
Rollup merge of #75151 - pickfire:patch-4, r=LukasKalbertodt
Consistent variable name alloc for raw_vec
2020-08-09 06:41:18 +09:00
Yuki Okushi
dde4fb3fd2
Rollup merge of #74842 - hermitcore:thread_local, r=Mark-Simulacrum
adjust remaining targets

- fix commit 7dc3886
- previous commit doesn't adjust all targets
2020-08-09 06:41:16 +09:00
Yuki Okushi
5bbdc73ebc
Rollup merge of #74712 - strom-und-spiele:E0271-cleanup, r=Mark-Simulacrum
Update E0271 explanation

When reading the explanation, I got confused by it. I hope the wording is clearer now.
2020-08-09 06:41:14 +09:00
bors
ceedf1d5fe Auto merge of #75271 - cuviper:array-iter, r=LukasKalbertodt
Simplify array::IntoIter

- Initialization can use `transmute_copy` to do the bitwise copy.
- `as_slice` can use `get_unchecked` and `MaybeUninit::slice_get_ref`,
  and `as_mut_slice` can do similar.
- `next` and `next_back` can use the corresponding `Range` methods.
- `Clone` doesn't need any unsafety, and we can dynamically update the
  new range to get partial drops if `T::clone` panics.

r? @LukasKalbertodt
2020-08-08 20:43:21 +00:00
Guillaume Gomez
17db7a4b5c Remove E0750 from unchecked error codes 2020-08-08 21:18:05 +02:00
Guillaume Gomez
259d350111 Clean up E0750 explanation 2020-08-08 21:17:36 +02:00
bors
1facd4a77b Auto merge of #75163 - canova:map_into_keys_values, r=dtolnay
Implement `into_keys` and `into_values` for associative maps

This PR implements `into_keys` and `into_values` for HashMap and BTreeMap types. They are implemented as unstable, under `map_into_keys_values` feature.
Fixes #55214.
r? @dtolnay
2020-08-08 18:15:50 +00:00
bors
3f091baba4 Auto merge of #75260 - davidtwco:polymorphization-promoted-substs, r=lcnr
polymorphize: unevaluated constants

This PR makes polymorphization visit the promoted MIR of unevaluated constants with available promoted MIR instead of visiting the substitutions of that constant - which will mark all of the generic parameters as used; in addition polymorphization will now visit non-promoted unevaluated constants rather than visit their substs.

r? @lcnr
2020-08-08 15:57:12 +00:00
Nazım Can Altınova
4cd2637e2b
Update the tracking issue number of map_into_keys_values 2020-08-08 16:35:54 +02:00
Amanieu d'Antras
99f0052151 Update hashbrown to 0.8.2 2020-08-08 15:03:47 +01:00
Alexis Bourget
1cd8dffdae Add an example about the behaviour of move and Fn* traits 2020-08-08 15:57:17 +02:00
Nazım Can Altınova
1cdce3919f
Remove min/max values from IntoValues Iterator implementation 2020-08-08 15:51:22 +02:00
bors
2bac92bba1 Auto merge of #74533 - nikic:issue-74425, r=eddyb
Emit == null instead of <= null for niche check

When the niche maximum is zero, emit a "== zero" check instead of a "<= zero" check. In particular, this avoids the awkward case of "<= null". While LLVM does canonicalize this to "== null", this apparently doesn't happen for constant expressions, leading to the issue in #74425. While that can be addressed on the LLVM side, it still seems prudent to emit sensible IR here, because this will allow null checks to be optimized earlier in the pipeline.

Fixes #74425.
2020-08-08 13:33:53 +00:00
Slanterns
d8cf9aa693
Use & instead of let ref in E0502
`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead.
2020-08-08 20:26:56 +08:00
Alexis Bourget
6d77e40afe Move to intra-doc links in library/std/src/path.rs 2020-08-08 14:21:27 +02:00
aticu
c2099b5f28 Add safety section to NonNull::as_* method docs
This basically adds the safety section of `*mut T::as_{ref,mut}` to the
same methods on `NonNull` with minor modifications to fit the
differences.

Part of #48929.
2020-08-08 13:36:19 +02:00
Bastian Kauschke
ad6d23777b
fix min_const_generics version 2020-08-08 13:35:42 +02:00
bors
c989ac132a Auto merge of #74289 - lzutao:unroll, r=LukasKalbertodt
Remove some redundant parts from `unrolled_find_u16s`

See each commit message for details.

r? @wesleywiser from old PR #67705 .
2020-08-08 11:34:18 +00:00
Ivan Tham
4b15b809eb
Remove abmiguity from PathBuf pop example 2020-08-08 18:28:55 +08:00
Ivan Tham
b3ae88f6bb
Use assert! for Path exists example to check bool 2020-08-08 18:23:18 +08:00
Ivan Tham
9532b83912
Show Path extension example change multi extension 2020-08-08 18:14:29 +08:00
Ivan Tham
e7e41a8465
Add additonal case for Path starts with
Show what happens if there is an extra extension
2020-08-08 18:06:04 +08:00
Ivan Tham
6dffd2d18e
Separate example for Path strip_prefix 2020-08-08 18:01:34 +08:00
Ivan Tham
a11c27925d
Show relative example for Path ancestors 2020-08-08 17:53:16 +08:00
bors
c92fc8db8b Auto merge of #75282 - RalfJung:miri-black-box, r=oli-obk
do not call black_box on Miri

Helps with https://github.com/rust-lang/rust/issues/75274 (but https://github.com/rust-lang/rust/pull/74932 introduced unrelated breakage that will need a separate fix)
Cc @eggyal r? @Mark-Simulacrum
2020-08-08 09:46:16 +00:00
strom-und-spiele
7e68b7d10a Update E0271.md
remove references to non existing code,
expand solution suggestions
remove unneeded code in solution
2020-08-08 11:01:34 +02:00