95528 Commits

Author SHA1 Message Date
Mazdak Farrokhzad
ce48086293 enum-variant-generic-args-pats-pass: harden + describe. 2019-06-15 19:18:09 +02:00
Mazdak Farrokhzad
86c74d3a86 (type_alias_enum_variants); issue-58006: rename to something descriptive. 2019-06-15 19:18:09 +02:00
Mazdak Farrokhzad
d358b5f1d8 type-alias-enum-variants-panic: rename to something descriptive. 2019-06-15 19:18:09 +02:00
Mazdak Farrokhzad
bed189791e type-alias-enum-variants-panic: harden + describe the test. 2019-06-15 19:18:09 +02:00
Mazdak Farrokhzad
77ff384865 type-alias-enum-variants-pass: harden; account for unit variants. 2019-06-15 19:18:09 +02:00
Mazdak Farrokhzad
d87cae326d type-alias-enum-variants-priority-3: rename to something descriptive. 2019-06-15 19:18:09 +02:00
Mazdak Farrokhzad
c0c48a6677 type-alias-enum-variants-priority-3: describe the test. 2019-06-15 19:18:09 +02:00
Mazdak Farrokhzad
fd44b7655b type-alias-enum-variants-priority-2: rename to something descriptive. 2019-06-15 19:18:09 +02:00
Mazdak Farrokhzad
6d1ecb3c95 type-alias-enum-variants-priority-2: account for 'const's + describe test. 2019-06-15 19:18:09 +02:00
Mazdak Farrokhzad
ff7d6a18ad type-alias-enum-variants-priority: rename to something more descriptive. 2019-06-15 19:18:09 +02:00
Mazdak Farrokhzad
f5f1144a02 type-alias-enum-variants-priority: elaborate on why this exists. 2019-06-15 19:18:09 +02:00
Mazdak Farrokhzad
4f66364fd4 Rename type-alias-enum-variants.rs to something descriptive. 2019-06-15 19:18:09 +02:00
Mazdak Farrokhzad
86422582df Cleanup type-alias-enum-variants.rs test. 2019-06-15 19:18:09 +02:00
Mazdak Farrokhzad
0d27995b0d type_alias_enum_variants: remove duplicate run-pass test. 2019-06-15 19:18:09 +02:00
Mazdak Farrokhzad
05dc864880 Move type_alias_enum_variants tests to a folder; Strip feature gates. 2019-06-15 19:18:09 +02:00
Mazdak Farrokhzad
281d787f6b cleanup some new active feature gates. 2019-06-15 19:00:49 +02:00
Pyry Kontio
2d6e1df51c fix syntax 2019-06-16 01:51:32 +09:00
Pyry Kontio
9d99ae520b swig@3 is keg-only and not linked by default so add linking so that the build scripts can find it 2019-06-16 01:51:32 +09:00
Pyry Kontio
d6e410b320 Fix rust-lldb wrapper scripts. 2019-06-16 01:51:32 +09:00
Mazdak Farrokhzad
e5060da781 type_alias_enum_variants: Remove feature gate test. 2019-06-15 18:35:59 +02:00
Mazdak Farrokhzad
ac94bbef55 Stabilize type_alias_enum_variants. 2019-06-15 18:35:59 +02:00
Mazdak Farrokhzad
ab2d2f90c4
Rollup merge of #61854 - alexreg:fix-type-alias-enum-patterns, r=Centril
Minor cosmetic improvements to accompany PR 61825

r? @Centril
2019-06-15 17:45:07 +02:00
Mazdak Farrokhzad
145abd88ca
Rollup merge of #61844 - AaronKutch:master, r=Centril
Change `...` to `..=` where applicable

This is mainly to fix #61816, but I decided to manually check a few thousand `...` throughout the code base to check for any other cases. I think I found a documentation bug in `src\libsyntax\ast.rs` where both `1..` and `1...` where mentioned. If there is internal support for both `1..` and `1..=` (that can exist before error handling gets to it), then I can add that back.
There were some other cases that look like `// struct Closure<'l0...'li, T0...Tj, CK, CS, U0...Uk> {`, `// <P0 as Trait<P1...Pn>>::Foo: 'a`, and `assert!(min <= max, "discriminant range is {}...{}", min, max);`, but I am not sure if I should change those.
There are a bunch of cases in the `/test/` directory that could be changed, but I presume I should just leave those be.
2019-06-15 17:45:06 +02:00
Mazdak Farrokhzad
eb188f1317
Rollup merge of #61824 - rust-lang:single_derive, r=eddyb
in which we decline to lint single-use lifetimes in `derive`d impls

Resolves #53738.

r? @eddyb
2019-06-15 17:45:04 +02:00
Mazdak Farrokhzad
be09427b11
Rollup merge of #61813 - matthewjasper:remove-unnecessary-symbol-ops, r=petrochenkov
Remove some unnecessary symbol interner ops

* Don't gensym symbols that don't need to worry about colliding with other symbols
* Use symbol constants instead of interning string literals in a few places.
* Don't generate a module in `__register_diagnostic`

r? @petrochenkov
2019-06-15 17:45:02 +02:00
Mazdak Farrokhzad
9e810a2775
Rollup merge of #61805 - davidtwco:ice-const-generic-repeat-expr-count-sequel, r=varkor
typeck: Fix ICE for blocks in repeat expr count.

Fixes #61336 (again). This PR fixes an ICE that occured when a block expression resolving to a const generic was used for the count of an array repeat expression.

r? @varkor
2019-06-15 17:45:01 +02:00
Mazdak Farrokhzad
1b95e029f9
Rollup merge of #61785 - RalfJung:as-ref, r=rkruppe
note some safety concerns of raw-ptr-to-ref casts
2019-06-15 17:44:59 +02:00
bors
9f06855064 Auto merge of #61143 - estebank:issue-61106, r=eddyb
When suggesting borrow, remove useless clones

Fix #61106.
2019-06-15 13:12:13 +00:00
Shotaro Yamada
6a0abd6048 Remove unnecessary .clone() 2019-06-15 20:46:00 +09:00
Shotaro Yamada
165842ba1f Use slice::from_ref instead of cloning 2019-06-15 20:46:00 +09:00
bors
dbebcee8d0 Auto merge of #59752 - Zoxc:dylib-fix, r=alexcrichton
Limit dylib symbols

This makes `windows-gnu` match the behavior of `windows-msvc`. It probably doesn't make sense to export these symbols on other platforms either.
2019-06-15 10:18:09 +00:00
bors
9f8cd9da7b Auto merge of #61825 - Centril:tauv-infer-fix, r=petrochenkov
type_alias_enum_variants: fix #61801; allow a path pattern to infer

Fix #61801.

Given a type-relative path pattern referring to an enum variant through a type alias, allow inferring the generic argument applied in the expectation set by the scrutinee of a `match` expression.

Similar issues may exist for `let` statements but I don't know how to test for that since `PhantomData<T>` is necessary...)

The gist of the problem here was that `resolve_ty_and_res_ufcs` was called twice which is apparently no good... It is possible that this PR is papering over some deeper problem, but that is beyond my knowledge of the compiler.

r? @petrochenkov
cc @eddyb @alexreg
cc https://github.com/rust-lang/rust/pull/61682
cc https://github.com/rust-lang/rust/issues/49683
2019-06-15 03:47:55 +00:00
Mazdak Farrokhzad
5057552dc6 typeck/expr.rs: move check_field + struct helpers here. 2019-06-15 04:01:39 +02:00
Mazdak Farrokhzad
5ee36b7eca typeck/expr.rs: move check_method_call here. 2019-06-15 04:01:39 +02:00
Mazdak Farrokhzad
819c4f2f08 typeck/expr.rs: move some check_return_expr here. 2019-06-15 04:01:39 +02:00
Mazdak Farrokhzad
18edf3ed08 typeck/expr.rs: move some check_expr_*s here. 2019-06-15 04:01:39 +02:00
Mazdak Farrokhzad
a551fe08ef typeck/expr.rs: move check_expr_with_expectation_and_needs here. 2019-06-15 02:51:45 +02:00
Mazdak Farrokhzad
8fd2d12c25 typeck/expr.rs: extract out check_expr_yield. 2019-06-15 02:48:59 +02:00
Mazdak Farrokhzad
8da059beaa typeck/expr.rs: extract out check_expr_index. 2019-06-15 02:46:47 +02:00
Mazdak Farrokhzad
1aa068a01b typeck/expr.rs: move check_expr_struct here. 2019-06-15 02:43:02 +02:00
Mazdak Farrokhzad
bb934880f0 typeck/expr.rs: extract out check_expr_tuple. 2019-06-15 02:39:23 +02:00
Mazdak Farrokhzad
82cac1505c typeck/expr.rs: extract out check_expr_repeat. 2019-06-15 02:36:07 +02:00
Mazdak Farrokhzad
877d834c65 typeck/expr.rs: extract out check_expr_array. 2019-06-15 02:31:20 +02:00
Mazdak Farrokhzad
fe004da37a typeck/expr.rs: extract out check_expr_cast. 2019-06-15 02:25:37 +02:00
Mazdak Farrokhzad
046cd903c5 typeck/expr.rs: extract out check_expr_loop. 2019-06-15 02:22:52 +02:00
Mazdak Farrokhzad
867ff1b00a typeck/expr.rs: extract out check_expr_while. 2019-06-15 02:19:23 +02:00
Mazdak Farrokhzad
af800c7873 typeck/expr.rs: move check_expr_assign here. 2019-06-15 02:13:06 +02:00
Mazdak Farrokhzad
7a41cc1715 typeck/expr.rs: extract out check_expr_return. 2019-06-15 02:10:12 +02:00
Mazdak Farrokhzad
74dd65edfe typeck/expr.rs: extract out check_expr_break. 2019-06-15 02:06:02 +02:00
Mazdak Farrokhzad
9131f95c6f typeck/expr.rs: extract out check_expr_path. 2019-06-15 01:56:10 +02:00