bors
dc4242d905
Auto merge of #68929 - matprec:consistent-issue-references, r=Dylan-DPC
...
Make issue references consistent
Fixes https://github.com/rust-lang/rust/issues/62976
cc https://github.com/rust-lang/rust/pull/63008
r? @varkor because you reviewed the original pr
2020-02-11 02:00:27 +00:00
Matthias Prechtl
7b555178ae
--bless --compare-mode=nll
2020-02-09 20:43:49 +01:00
Matthew Jasper
fa5a3c35dc
Don't parse mut a @ b as mut a @ mut b
2020-02-09 13:19:06 +00:00
bors
f8d830b4de
Auto merge of #68376 - Centril:move-ref-patterns, r=matthewjasper
...
Initial implementation of `#![feature(move_ref_pattern)]`
Following up on #45600 , under the gate `#![feature(move_ref_pattern)]`, `(ref x, mut y)` is allowed subject to restrictions necessary for soundness. The match checking implementation and tests for `#![feature(bindings_after_at)]` is also adjusted as necessary.
Closes #45600 .
Tracking issue: #68354 .
r? @matthewjasper
2020-02-09 04:01:28 +00:00
Eduard-Mihai Burtescu
4c7eb59e81
rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.
2020-02-06 21:46:38 +02:00
Mazdak Farrokhzad
d2b88b7050
move_ref_pattern: test captures inside closure
2020-02-02 21:17:49 +01:00
Mazdak Farrokhzad
bd318be05d
move_ref_pattern: change pov in diagnostics & add binding names
2020-02-02 17:58:15 +01:00
Mazdak Farrokhzad
8d4973f587
move_ref_pattern: don't ICE on unreachable 2xby-move conflicts
2020-02-02 16:07:51 +01:00
Mazdak Farrokhzad
d984f127f6
move_ref_patterns: introduce tests
...
bindings_after_at: harden tests
2020-02-02 14:13:07 +01:00
Matthew Jasper
425e494fce
Remove or_patterns from INCOMPLETE_FEATURES
2020-02-01 22:07:11 +00:00
varkor
24a2929ed1
Normalise notes with the/is
2020-01-24 16:24:50 +00:00
Mazdak Farrokhzad
58eb03d20f
check_match: simplify check_arm
2020-01-20 23:39:24 +01:00
Mazdak Farrokhzad
78f0c7fd64
check_match: unify some lowering code and fix some ICEs
2020-01-20 19:46:27 +01:00
Mazdak Farrokhzad
e3c2f8fc57
slice_patterns: organize some tests
2020-01-18 19:33:47 +01:00
Mazdak Farrokhzad
a1eadca88f
slice_patterns: remove gates in tests
2020-01-18 19:33:47 +01:00
varkor
8461fa5119
Diagnostics should not end with a full stop
2020-01-12 15:37:50 +00:00
Matthew Jasper
b358929251
Split rustc_mir::{build, hair, lints} into their own crate
2020-01-12 09:39:26 +00:00
Vadim Petrochenkov
642669c74d
Update tests
2020-01-09 21:23:12 +03:00
Mazdak Farrokhzad
2c3e5d3de0
- remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}
...
- remove syntax::{help!, span_help!, span_note!}
- remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!}
- lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints
- inline syntax::{struct_span_warn!, diagnostic_used!}
- stringify_error_code! -> error_code! & use it more.
- find_plugin_registrar: de-fatalize an error
- de-fatalize metadata errors
- move type_error_struct! to rustc_typeck
- struct_span_err! -> rustc_errors
2020-01-08 04:25:33 +01:00
LeSeulArtichaut
5cc9f6b706
Reformulate test description
...
Co-authored-by: Centril <twingoow@gmail.com>
2020-01-02 21:11:43 +01:00
LeSeulArtichaut
dc19b4842a
Enhance test
...
Co-authored-by: Centril <twingoow@gmail.com>
2020-01-02 21:08:25 +01:00
LeSeulArtichaut
318280519d
Move test
...
Co-authored-by: Centril <twingoow@gmail.com>
2020-01-02 20:16:55 +01:00
Mazdak Farrokhzad
f8d2cce0ce
Blame user type in pat type error.
2019-12-30 14:28:40 +01:00
Mazdak Farrokhzad
d7e2f3aee5
refactor and fix this-expression-has-type note
2019-12-30 14:05:17 +01:00
Mazdak Farrokhzad
960acb044b
Show scrutinee expr type for struct fields.
...
TODO: The type is wrong and will be fixed in later commits.
2019-12-30 13:50:20 +01:00
Mazdak Farrokhzad
ab050d6a83
MatchExpressionArmPattern: Use more generic wording.
...
The existing wording was inappropriate for e.g.
`if let Ok(_) = expr { .. }`. The diagnostic would
leak the fact that we desugar to a `match`.
2019-12-30 13:50:20 +01:00
Mazdak Farrokhzad
07effe18b0
Rollup merge of #67543 - JohnTitor:regression-tests, r=Centril
...
Add regression tests for fixed ICEs
Closes #61747 (fixed from 1.41.0-nightly (4007d4ef2 2019-12-01))
Closes #66205 (fixed from 1.41.0-nightly (4007d4ef2 2019-12-01))
Closes #66270 (fixed by #66246 )
Closes #67424 (fixed by #67160 )
Also picking a minor nit up from #67071 with 101dd7bad9
r? @Centril
2019-12-24 04:39:55 +01:00
Mazdak Farrokhzad
371446cc50
Remove bindings_after_at from INCOMPLETE_FEATURES.
2019-12-23 14:47:20 +01:00
Mazdak Farrokhzad
8846a6b6bb
Test that nested type ascription is banned.
2019-12-23 14:47:20 +01:00
Mazdak Farrokhzad
c37bd26eaa
Test that _ @ subpat is syntactically rejected.
2019-12-23 14:47:20 +01:00
Mazdak Farrokhzad
e39abcfad9
harden & split borrowck-pat-at-and-box
2019-12-23 14:47:20 +01:00
Mazdak Farrokhzad
48f2766522
enhance borrowck-pat-by-copy-bindings-in-at
2019-12-23 14:47:20 +01:00
Mazdak Farrokhzad
427b1c33e9
clarify bind-by-move-neither-can-livee..
2019-12-23 14:47:20 +01:00
Mazdak Farrokhzad
6fa8f4a57b
bindings_after_at: harden tests wrt. contexts & slice_patterns
2019-12-23 14:47:20 +01:00
Mazdak Farrokhzad
0034e6199e
bindings_after_at: harden tests wrt. promotion
2019-12-23 14:47:19 +01:00
Mazdak Farrokhzad
9ab36037a4
--bless bindings-after-at tests
2019-12-23 14:47:19 +01:00
Mazdak Farrokhzad
6a87f99620
check_legality_of_move_bindings: generalize diagnostics & add comments
2019-12-23 14:47:19 +01:00
Mazdak Farrokhzad
5f92a56ed6
Introduce #![feature(bindings_after_at)].
...
Under the gate, `x @ Some(y)` is allowed.
This is subject to various restrictions for soundness.
2019-12-23 14:47:19 +01:00
Yuki Okushi
6ec3a63bb2
Add test for issue-66270
2019-12-23 07:42:26 +09:00
Mazdak Farrokhzad
eac5fb8b0a
Rollup merge of #67189 - LeSeulArtichaut:binop-wording, r=estebank
...
Unify binop wording
Closes #60497
r? @estebank
2019-12-19 10:29:51 +01:00
Niko Matsakis
1719337d02
Revert "Remove #![feature(never_type)] from tests."
...
This reverts commit 8f6197f39f .
2019-12-14 09:01:04 -05:00
LeSeulArtichaut
eac6fac10b
Update tests
2019-12-12 20:56:14 +01:00
LeSeulArtichaut
3bd46f1aec
Update UI test expectations
2019-12-12 20:56:14 +01:00
Nadrieril
fbd2cd09e6
Revert a diagnostic change in the case of integer ranges
2019-12-11 18:17:58 +00:00
Nadrieril
40f434b8c5
Reuse adt_defined_here
2019-12-04 16:43:24 +00:00
Nadrieril
2216318484
Use the default code path to list missing patterns
...
This uses the exact same code path that would be used for
`match x { _ if false => {} }`, since in both cases the resulting matrix
is empty. Since we think the behaviour in that case is ok, then we can
remove the special case and use the default code path.
2019-12-04 16:43:24 +00:00
Nadrieril
e444346b12
List missing constructors in an almost empty match
...
Actually empty matches are still handled by a different code path
2019-12-04 16:43:24 +00:00
Nadrieril
5a3b7d2055
Add tests
2019-12-04 16:43:24 +00:00
Nadrieril
c0f3c06c6d
Only warn about missing patterns in the case of an enum
2019-12-04 16:43:21 +00:00
Nadrieril
2099dd1aa2
Add tests
2019-12-04 16:43:21 +00:00