Commit graph

154044 commits

Author SHA1 Message Date
Mara Bos
2013792641
Rollup merge of #88413 - spastorino:weird-return-types-tait-test, r=oli-obk
Add weird return types TAIT test

r? `@oli-obk`

Related to #86727
2021-08-31 10:41:21 +02:00
Mara Bos
0e49feb1e5
Rollup merge of #88409 - spastorino:autoleakage-tait-test, r=oli-obk
Add auto trait leakage TAIT test

r? `@oli-obk`

Related to #86727
2021-08-31 10:41:20 +02:00
Mara Bos
b490f3580b
Rollup merge of #88408 - spastorino:inference-cycle-tait-test, r=oli-obk
Add inference cycle TAIT test

r? `@oli-obk`

Related to #86727
2021-08-31 10:41:19 +02:00
Mara Bos
5eeeb0bf3b
Rollup merge of #88406 - spastorino:tait-nest-infer-test, r=oli-obk
Tait nest infer test

r? `@oli-obk`

Related to #86727
2021-08-31 10:41:18 +02:00
Mara Bos
cd20fbdf82
Rollup merge of #88394 - ChrisDenton:patch-1, r=joshtriplett
Document `std::env::current_exe` possible rename behaviour

It might not be obvious that the "path of the current running executable" may (or may not) imply "at the time it was loaded".

This came up recently in chat so I thought it might be worth documenting.
2021-08-31 10:41:17 +02:00
bors
fe37929e4c Auto merge of #88491 - RalfJung:miri, r=RalfJung
update miri

Fixes https://github.com/rust-lang/rust/issues/88473
2021-08-31 08:32:31 +00:00
bors
d4f263a558 Auto merge of #88467 - sexxi-goose:issue-88431, r=nikomatsakis
2229: Drop any deref in move closure

Fixes: #88431

r? `@nikomatsakis`
2021-08-31 06:01:52 +00:00
Michael Howell
435cdd0f9a
Update E0785.md 2021-08-30 22:18:55 -07:00
Michael Howell
026322c34b fix(rustc_typeck): produce better errors for dyn auto trait
Fixes #85026
2021-08-30 22:15:11 -07:00
Sönke Hahn
4027629edc Remove unnecessary mut from udp doctests 2021-08-30 22:31:34 -06:00
bors
1e37e83dc0 Auto merge of #88414 - Aaron1011:guess-foreign-head-span, r=estebank
Don't use `guess_head_span` in `predicates_of` for foreign span

Previously, the result of `predicates_of` for a foreign trait
would depend on the *current* state of the corresponding source
file in the foreign crate. This could lead to ICEs during incremental
compilation, since the on-disk contents of the upstream source file
could potentially change without the upstream crate being recompiled.

Additionally, this ensure that that the metadata we produce for a crate
only depends on its *compiled* upstream dependencies (e.g an rlib or
rmeta file), *not* the current on-disk state of the upstream crate
source files.
2021-08-31 03:34:22 +00:00
Cameron Steffen
3ff1d6bbf4 Fix tests 2021-08-30 20:18:44 -05:00
Cameron Steffen
5b95df4bdc Add let-else tests 2021-08-30 20:18:43 -05:00
Cameron Steffen
df9a2e0687 Handle irrufutable or unreachable let-else 2021-08-30 20:18:43 -05:00
Cameron Steffen
dc028f6568 Calculate LetSource later 2021-08-30 20:18:42 -05:00
Cameron Steffen
29bc94ff0d Handle let-else initializer edge case errors 2021-08-30 20:18:42 -05:00
Cameron Steffen
2f4e86b9ef Enforce diverging let...else 2021-08-30 20:18:42 -05:00
Cameron Steffen
cb4439a315 Temporary fix rustfmt for let-else 2021-08-30 20:18:41 -05:00
Cameron Steffen
04d7903304 Fix clippy for let-else 2021-08-30 20:18:41 -05:00
Cameron Steffen
960ea093ab Add let_else feature gate 2021-08-30 20:18:39 -05:00
Cameron Steffen
ae32e88909 Lower let-else to HIR 2021-08-30 20:17:46 -05:00
Cameron Steffen
120d46e255 Refactor lower_stmts 2021-08-30 20:17:45 -05:00
Cameron Steffen
581abbfc6d Move some methods to block module 2021-08-30 20:17:45 -05:00
Cameron Steffen
89d2600d01 Add let-else to AST 2021-08-30 20:17:45 -05:00
bors
56ea5e0ee9 Auto merge of #88100 - HTG-YT:edition2021-compopt-stabilization, r=m-ou-se
Make Edition 2021 Stable

An item of #87959.

This is an "on-demand" pull request, which means it will be merged when it is the right time to.
2021-08-31 01:03:55 +00:00
bors
6f388bb369 Auto merge of #88369 - lcnr:cec-rename, r=oli-obk
update const generics feature gates

**tl;dr: split const generics into three features: `adt_const_params`, `const_generics_defaults` and `generic_const_exprs`**

continuing the work of `@BoxyUwU` in #88324, this PR
- renames `feature(const_evaluatable_checked)` to `feature(generic_const_exprs)` which now doesn't need any other feature gate to work. Previously `feature(const_evaluatable_checked)` was only useful in combination with `feature(const_generics)`.
- completely removes `feature(lazy_normalization_consts)`. This feature only supplied the parents generics to anonymous constants, which is pretty useless as generic anon consts are only allowed with `feature(generic_const_exprs)` anyways.
- moves the ability to use additional const param types from `feature(const_generics)` into `feature(adt_const_params)`. As `feature(const_generics)` is now mostly useless without `feature(generic_const_exprs)` we also remove that feature flag.
- updates tests, removing duplicates and unnecessary revisions in some cases and also deletes all unused `*.stderr` files.

I not also remove the ordering restriction for const and type parameters if any of the three const generics features is active.
This ordering restriction feels like the only "real" use of the current `feature(const_generics)` right now so this change isn't a perfect solution, but as I intend to stabilize the ordering - and `feature(const_generics_defaults)` -  in the very near future, I think this is acceptable for now.

---

cc `@rust-lang/project-const-generics` about the new feature names and this change in general.

I don't think we need any external approval for this change but I do intend to publish an update to the const generics tracking issue the day this PR lands, so I don't want this merged yet.

Apologies to whoever ends up reviewing this PR 😅 ❤️

r? rust-lang/project-const-generics
2021-08-30 22:21:01 +00:00
Mara Bos
ac93ca3b94 Turn to ifs into a match. 2021-08-30 23:57:16 +02:00
Mara Bos
96d4666f23 Update tests for array_into_iter lint upgrade. 2021-08-30 23:43:38 +02:00
Mara Bos
90080f4703 Don't give invalid suggestions in array_into_iter. 2021-08-30 23:43:38 +02:00
Mara Bos
422ad3bec2 Upgrade array_into_iter lint to include Deref-to-array types. 2021-08-30 23:43:38 +02:00
Mara Bos
f8beb8f7f7 Add test for extra <> in dyn suggestion. 2021-08-30 22:34:46 +02:00
Mara Bos
23d2cb8435 Don't suggest extra <> in dyn suggestion. 2021-08-30 22:34:34 +02:00
Mark Rousskov
4c7c97a208 Fix loading large rlibs
Bumps object crate to permit parsing archives with 64-bit table entries. These
are primarily encountered when there's more than 4GB of archive data.
2021-08-30 16:22:53 -04:00
Katherine Philip
8cecac2602 Add test case for using slice::fill with MaybeUninit 2021-08-30 13:20:11 -07:00
ibraheemdev
b99038f478 use unwrap_unchecked where possible 2021-08-30 16:13:56 -04:00
Mara Bos
532be287c9 Test that turbofish does not swim away in prelude collusion suggestion. 2021-08-30 21:55:30 +02:00
Mara Bos
4986bbf135 Keep turbofish in prelude collision lint. 2021-08-30 21:55:10 +02:00
Mara Bos
756ef3bff6 Add test for 2021 ambiguous [T; N].into_iter(). 2021-08-30 21:27:31 +02:00
Mara Bos
336f31432d Warn when [T; N].into_iter() is ambiguous in the new edition. 2021-08-30 21:27:31 +02:00
Mara Bos
10eed8f0c5 No longer pass -Z unstable-options for edition 2021 in test. 2021-08-30 20:41:02 +02:00
Mara Bos
ab369274d6 Update test output for stable Rust 2021. 2021-08-30 20:41:01 +02:00
bors
5d6804469d Auto merge of #88466 - sexxi-goose:issue-88372, r=nikomatsakis
2229: Handle update to capture kind properly

Fixes: #88372

r? `@nikomatsakis`
2021-08-30 18:27:54 +00:00
ibraheemdev
dafc14794f clean up c::linger conversion 2021-08-30 14:00:21 -04:00
David Carlier
8539a3c001 sunos systems add sanitizer supported. 2021-08-30 18:49:56 +01:00
ibraheemdev
3b6777f1ab add TcpStream::set_linger and TcpStream::linger 2021-08-30 13:42:52 -04:00
Mara Bos
89a98675aa Add test for glob imported prelude collision trait. 2021-08-30 19:21:40 +02:00
Mara Bos
51e4fbaed1 Fix prelude collision suggestions for glob imported traits. 2021-08-30 19:21:22 +02:00
Mara Bos
78a7d1c652 Add and update tests. 2021-08-30 19:02:29 +02:00
Mara Bos
e2abf06890 Fix lifetime generics in <T<..> as Trait>::try_from suggestion. 2021-08-30 19:02:06 +02:00
Mara Bos
a4f6d3e5c2 Fix lifetime generics in <T as Trait<..>>::try_from suggestion. 2021-08-30 19:01:34 +02:00