Commit Graph

89353 Commits

Author SHA1 Message Date
varkor
dbc7924b3f Add test for generic parameter list solely containing an attribute 2019-02-07 15:03:20 +01:00
varkor
b3015abfa0 Fix update to 2018 edition 2019-02-07 15:03:20 +01:00
varkor
61f35f0641 Adjust generic const param resolution 2019-02-07 15:03:20 +01:00
varkor
bbdcc4e7ce Adjust parser generic parameter errors 2019-02-07 15:02:17 +01:00
varkor
899d013fef Fix E0670 doc error 2019-02-07 15:02:17 +01:00
varkor
7461a5e655 Fix ast_validation printing of const generics 2019-02-07 15:02:17 +01:00
varkor
1805546084 Fix const generic parameter save analysis 2019-02-07 15:02:17 +01:00
varkor
bf2f62cb98 Add test for const parameter before other generic parameters 2019-02-07 15:02:17 +01:00
varkor
ed51b6148f Add test for const parameter depending on type parameter 2019-02-07 15:02:17 +01:00
varkor
2f73245ca4 Add test forbidding const parameters in const fn 2019-02-07 15:02:17 +01:00
varkor
455d659e91 Update tests
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07 15:02:17 +01:00
varkor
8fd5979006 Add const generics feature gate test
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07 15:02:17 +01:00
varkor
3991ba76ee Support const generics in save analysis
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07 15:02:17 +01:00
varkor
06abaee21b Add error for const parameters depending on type parameters
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07 15:02:17 +01:00
varkor
11874a0c14 Validate generic parameter and argument order in ast_validation
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07 15:02:17 +01:00
varkor
2fec52bf58 Add lowering errors for const generics
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07 15:02:17 +01:00
varkor
29f7206366 Add const params to Def
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07 15:02:17 +01:00
varkor
ea0d99829d Add resolution errors for const generics
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07 15:02:17 +01:00
varkor
b4ef753e8f Add pretty-printing for const generics
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07 15:02:16 +01:00
varkor
d7695abb76 Support const generics in derive
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07 15:02:16 +01:00
varkor
0a8d98a270 Parse const generics
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07 15:02:16 +01:00
varkor
8d83521f0b Add const_generics feature flag
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07 15:02:16 +01:00
varkor
751dcdf606 Add Const kind to AST
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07 15:02:16 +01:00
bors
ad433894ab Auto merge of #58010 - Zoxc:parallel-passes, r=michaelwoerister
Move privacy checking later in the pipeline and make some passes run in parallel

r? @michaelwoerister
2019-02-07 09:49:08 +00:00
bors
626e74d5f6 Auto merge of #58254 - kennytm:rollup, r=kennytm
Rollup of 23 pull requests

Successful merges:

 - #58118 (Transition libtest to 2018 edition)
 - #58119 (libproc_macro => 2018)
 - #58123 (Avoid some bounds checks in binary_heap::{PeekMut,Hole})
 - #58124 (libsyntax_pos => 2018)
 - #58133 (libsyntax_ext => 2018)
 - #58136 (Improve error message and docs for non-UTF-8 bytes in stdio on Windows)
 - #58156 (update submodule: rust-installer from 27dec6c to ccdc47b)
 - #58192 (Do not ICE in codegen when using a extern_type static)
 - #58193 (Move librustc to 2018)
 - #58210 (Make an assert debug-only in `find_constraint_paths_between_regions`.)
 - #58217 (librustc_tsan => 2018)
 - #58218 (librustc_msan => 2018)
 - #58219 (librustc_asan => 2018)
 - #58220 (libprofiler_builtins => 2018)
 - #58223 (librustc_lsan => 2018)
 - #58225 (librustc_fs_util => 2018)
 - #58228 (librustc_plugin => 2018)
 - #58236 (librustc_resolve => 2018)
 - #58237 (Fix broken grammar in iter::from_fn() docs)
 - #58239 (librustc_apfloat => 2018)
 - #58240 (librustc_errors => 2018)
 - #58241 (librustc_llvm => 2018)
 - #58242 (Document the one TyKind that isn't documented)

Failed merges:

 - #58185 (Remove images' url to make it work even without internet connection)

r? @ghost
2019-02-07 07:11:22 +00:00
kennytm
000daf948a
Rollup merge of #58242 - notriddle:patch-3, r=zackmdavis
Document the one TyKind that isn't documented

This is especially confusing since the name `Foreign` and the name `extern type` are so different. I deduced that they're the same by consulting git-blame.
2019-02-07 13:58:02 +08:00
kennytm
5489d0dad1
Rollup merge of #58241 - taiki-e:librustc_llvm-2018, r=Centril
librustc_llvm => 2018

Transitions `librustc_llvm` to Rust 2018; cc #58099

r? @Centril
2019-02-07 13:58:01 +08:00
kennytm
207290d98e
Rollup merge of #58240 - taiki-e:librustc_errors-2018, r=Centril
librustc_errors => 2018

Transitions `librustc_errors` to Rust 2018; cc #58099

r? @Centril
2019-02-07 13:58:00 +08:00
kennytm
5007287a5b
Rollup merge of #58239 - taiki-e:librustc_apfloat-2018, r=Centril
librustc_apfloat => 2018

Transitions `librustc_apfloat` to Rust 2018; cc #58099

r? @Centril
2019-02-07 13:57:59 +08:00
kennytm
9b28322460
Rollup merge of #58237 - sdroege:docs-its-its, r=SimonSapin
Fix broken grammar in iter::from_fn() docs

Was introduced by https://github.com/rust-lang/rust/pull/58062

CC @SimonSapin
2019-02-07 13:57:57 +08:00
kennytm
86c761f3e9
Rollup merge of #58236 - taiki-e:librustc_resolve-2018, r=Centril
librustc_resolve => 2018

Transitions `librustc_resolve` to Rust 2018; cc #58099

r? @Centril
2019-02-07 13:57:56 +08:00
kennytm
73458cd1ad
Rollup merge of #58228 - taiki-e:librustc_plugin-2018, r=Centril
librustc_plugin => 2018

Transitions `librustc_plugin` to Rust 2018; cc #58099

r? @Centril
2019-02-07 13:57:55 +08:00
kennytm
c0a135f541
Rollup merge of #58225 - taiki-e:librustc_fs_util-2018, r=Centril
librustc_fs_util => 2018

Transitions `librustc_fs_util` to Rust 2018; cc #58099

r? @Centril
2019-02-07 13:57:54 +08:00
kennytm
d05313db26
Rollup merge of #58223 - taiki-e:librustc_lsan-2018, r=Centril
librustc_lsan => 2018

Transitions `librustc_lsan` to Rust 2018; cc #58099

r? @Centril
2019-02-07 13:57:53 +08:00
kennytm
247da16f1d
Rollup merge of #58220 - taiki-e:libprofiler_builtins-2018, r=Centril
libprofiler_builtins => 2018

Transitions `libprofiler_builtins` to Rust 2018; cc #58099

r? @Centril
2019-02-07 13:57:52 +08:00
kennytm
c1123aac4b
Rollup merge of #58219 - taiki-e:librustc_asan-2018, r=Centril
librustc_asan => 2018

Transitions `librustc_asan` to Rust 2018; cc #58099

r? @Centril
2019-02-07 13:57:50 +08:00
kennytm
f3908add8c
Rollup merge of #58218 - taiki-e:librustc_msan-2018, r=Centril
librustc_msan => 2018

Transitions `librustc_msan` to Rust 2018; cc #58099

r? @Centril
2019-02-07 13:57:49 +08:00
kennytm
2b99c4eec7
Rollup merge of #58217 - taiki-e:librustc_tsan-2018, r=Centril
librustc_tsan => 2018

Transitions `librustc_tsan` to Rust 2018; cc #58099

r? @Centril
2019-02-07 13:57:48 +08:00
kennytm
fab527f5bb
Rollup merge of #58210 - nnethercote:find_outlives-debug_assert, r=matthewjasper
Make an assert debug-only in `find_constraint_paths_between_regions`.

This reduces instruction counts for NLL builds of `wg-grammar` by over
20%.

r? @nikomatsakis
2019-02-07 13:57:47 +08:00
kennytm
26b157b23c
Rollup merge of #58193 - mark-i-m:rustc-2018, r=Centril
Move librustc to 2018

r? @Centril

Part of #58099

It would be great to get this reviewed quickly to avoid merge conflicts...
2019-02-07 13:57:45 +08:00
kennytm
7168eadafe
Rollup merge of #58192 - dlrobertson:fix_57876, r=oli-obk
Do not ICE in codegen when using a extern_type static

The layout of a extern_type static is unsized, but may pass the
Well-Formed check in typeck (See #55257).  As a result, we
cannot assume that a static is sized when generating the `Place`
for an r-value.

Fixes: #57876

r? @oli-obk
2019-02-07 13:57:44 +08:00
kennytm
4c9bef0cf8
Rollup merge of #58156 - h-michael:update-rust-installer, r=Centril
update submodule: rust-installer from 27dec6c to ccdc47b

Update rust-installer cc: #58099
27dec6c...ccdc47b

r? @Centril
2019-02-07 13:57:43 +08:00
kennytm
2be3ca4427
Rollup merge of #58136 - abonander:doc-win-stdio-unicode, r=dtolnay
Improve error message and docs for non-UTF-8 bytes in stdio on Windows

This should make debugging problems like abonander/multipart#106 significantly more straightforward in the future.

cc #23344, @retep998 @alexcrichton

Not sure who do r? so I'll let rust-highfive pick one.
2019-02-07 13:57:41 +08:00
kennytm
262b241e16
Rollup merge of #58133 - taiki-e:libsyntax_ext-2018, r=Centril
libsyntax_ext => 2018

Transitions `libsyntax_ext` to Rust 2018; cc #58099

r? @Centril
2019-02-07 13:57:40 +08:00
kennytm
281a26bb33
Rollup merge of #58124 - taiki-e:libsyntax_pos-2018, r=Centril
libsyntax_pos => 2018

Transitions `libsyntax_pos` to Rust 2018; cc #58099

r? @Centril
2019-02-07 13:57:39 +08:00
kennytm
8bc05bacbf
Rollup merge of #58123 - lnicola:binary-heap-no-bounds-checks, r=sfackler
Avoid some bounds checks in binary_heap::{PeekMut,Hole}

Fixes #58121.
2019-02-07 13:57:38 +08:00
kennytm
ed500e6cc4
Rollup merge of #58119 - taiki-e:libproc_macro-2018, r=petrochenkov
libproc_macro => 2018

Transitions `libproc_macro` to Rust 2018; cc #58099

r? @Centril
2019-02-07 13:57:37 +08:00
kennytm
9b793702fe
Rollup merge of #58118 - h-michael:libtest-theme-2018, r=Centril
Transition libtest to 2018 edition

Transitions libtest to Rust 2018; cc #58099
r? @Centril
2019-02-07 13:57:35 +08:00
bors
825f355c74 Auto merge of #57998 - niklasf:align-enum, r=nagisa
Allow #[repr(align(x))] on enums (#57996)

Tracking issue: #57996

Implements an extension of [RFC 1358](https://github.com/rust-lang/rfcs/blob/master/text/1358-repr-align.md) behind a feature flag (`repr_align_enum`). Originally introduced here for structs: #39999.

It seems like only HIR-level changes are required, since enums are already aware of their alignment (due to alignment of their limbs).

cc @bitshifter
2019-02-07 04:26:08 +00:00
bors
1efdda10cd Auto merge of #58125 - taiki-e:libsyntax-2018, r=Centril
libsyntax => 2018

Transitions `libsyntax` to Rust 2018; cc #58099

r? @Centril
2019-02-07 01:41:14 +00:00