Commit Graph

205 Commits

Author SHA1 Message Date
varkor
e82cd9528c Add regression test for #61422 2019-06-02 01:55:46 +01:00
varkor
c2b663c666 Fix unwrapping usize issue with transparent MaybeUnit array wrapper 2019-06-02 01:50:06 +01:00
varkor
5e3ff4c2f1 Add test for condition in trait const param 2019-05-31 20:49:19 +01:00
Pietro Albini
2106d57c35 Rollup merge of #61344 - varkor:const-failed-to-life-ice, r=Centril
Add regression test for const generics ICE

Closes https://github.com/rust-lang/rust/issues/60879.
2019-05-31 13:33:58 +02:00
varkor
7e92607f5a Fix unwrapping usize issue in HasMutInterior 2019-05-31 01:19:59 +01:00
varkor
0fdd4191ad Add regression test for const generics ICE
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-05-30 19:55:43 +01:00
Mazdak Farrokhzad
528972a28a Rollup merge of #61333 - varkor:apit-const-param-ice, r=estebank
Fix ICE with APIT in a function with a const parameter

Fixes https://github.com/rust-lang/rust/issues/60953.
2019-05-30 10:53:07 +02:00
varkor
998ef688a3 Add a regression test for const parameters with impl Trait 2019-05-30 00:21:04 +01:00
David Wood
41aaf7bc46 Fix ICE with struct ctors and const generics.
This commit fixes a ICE where struct constructors were resulting in an
ICE with const generics. Previously, a `match` in `type_of` did not have
an arm for the `DefKind::Ctor` resolutions and therefore would assume
that the type did not have generics.
2019-05-29 08:30:07 +01:00
varkor
6233d1fee5 Use assert_eq! instead of println! in tests 2019-05-28 21:35:20 +01:00
varkor
f13317ca2e Use Display rather than Debug printing for const mismatch 2019-05-28 21:35:20 +01:00
varkor
f865b7dda4 Update tests after pretty printing 2019-05-28 21:35:20 +01:00
varkor
cfa1f80cd9 Fix test after rebase 2019-05-28 21:35:20 +01:00
varkor
57ff5899d2 Add broken MIR regression tests 2019-05-28 21:35:20 +01:00
varkor
55dcc20f9a Add tests for uninferred consts during codegen 2019-05-28 21:34:42 +01:00
varkor
5a585fe45e Add a test for a function taking a const param array as an argument 2019-05-28 21:34:42 +01:00
Oliver Scherer
fa459a08e1 Fix rebase fallout 2019-05-25 10:07:02 +02:00
Mazdak Farrokhzad
25b5d30163 Rollup merge of #60710 - varkor:delay_span_bug-const-parent, r=matthewjasper
Use `delay_span_bug` for error cases when checking `AnonConst` parent

Fixes #60704.
Fixes #60650.
2019-05-13 21:36:54 +02:00
varkor
b3207d531d Add test for const impl 2019-05-11 00:08:40 +01:00
varkor
0f792abf00 Add a test for failed inference of const types 2019-05-10 20:53:46 +01:00
varkor
5310801062 Add a test for invalid const arguments 2019-05-10 20:53:35 +01:00
Mazdak Farrokhzad
59ff11393d Rollup merge of #60550 - skinny121:concrete_const_tests, r=varkor
Add tests for concrete const types

In response to the request for help in https://github.com/rust-lang/rust/issues/44580#issuecomment-488819344, I have added several ui tests around the use of concrete const types, i.e. A<2>.

r? @varkor
2019-05-09 00:58:25 +02:00
ben
bfa15f3988 Add tests for concrete const types 2019-05-08 20:35:41 +12:00
bors
cfdc84a009 Auto merge of #60612 - Centril:rollup-61drhqt, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #60489 (Remove hamburger button from source code page)
 - #60535 (Correct handling of arguments in async fn)
 - #60579 (Rename `ParamTy::idx` to `ParamTy::index`)
 - #60583 (Fix parsing issue with negative literals as const generic arguments)
 - #60609 (Be a bit more explicit asserting over the vec rather than the len)

Failed merges:

r? @ghost
2019-05-07 19:39:52 +00:00
bors
17dba3b6e4 Auto merge of #60277 - estebank:relate-ice, r=varkor
Don't ICE when relating const type args

Fix #60263.

r? @varkor
2019-05-07 16:45:14 +00:00
varkor
594685b5a2 token::LArrow can begin arguments
`<-` may indicate the start of a negative const argument.
2019-05-06 17:00:01 +01:00
varkor
3e6787cb4c Early error for mixing order of const and type parameters 2019-05-04 22:28:08 +01:00
varkor
47f373128a Add tests 2019-05-04 14:39:43 +01:00
Esteban Küber
750808680a Don't ICE when relating const type args 2019-05-02 16:19:35 -07:00
varkor
1369132afa Add a test for const args that cannot be inferred
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01 23:11:20 +01:00
varkor
a188850ded Add a test for incorrect numbers of const args 2019-05-01 23:11:19 +01:00
varkor
c7deb5bdc2 Add a test for const arguments 2019-05-01 23:11:19 +01:00
varkor
67176f751b Add const-types test 2019-05-01 23:11:19 +01:00
varkor
6d7c7940b5 Add comment explaining restriction 2019-04-25 23:29:58 +01:00
varkor
908a6399bc Add a test for const parameters with type parameters as types 2019-04-25 21:12:17 +01:00
varkor
102f7a8b26 Make sure const params with type params don't cause errors without a feature gate 2019-04-25 21:12:03 +01:00
Andy Russell
b6f148c8bd hide --explain hint if error has no extended info 2019-04-18 13:29:28 -04:00
bors
e577e49b9f Auto merge of #60058 - varkor:const-generics-ty-refactor, r=cramertj
Make const parameters enforce no variance constraints

Fixes https://github.com/rust-lang/rust/issues/60047. Also includes some minor const refactoring for convenience.
2019-04-18 08:58:45 +00:00
varkor
318a10e906 Add a test for unused const parameters 2019-04-18 00:30:50 +01:00
Eduard-Mihai Burtescu
5f7055988b Resolve inconsistency in error messages between "parameter" and "variable". 2019-04-17 13:25:07 +03:00
varkor
f94f85bebd Fix ICE with const generic param in struct 2019-03-22 01:49:42 +00:00
Vadim Petrochenkov
fa72a81bea Update tests 2019-03-11 23:10:26 +03:00
varkor
8bb62d18f3 Add a test for invalid const arguments 2019-03-07 23:39:01 +00:00
varkor
162405f222 Fix negative integer literal test
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05 22:20:01 +00:00
varkor
4c18ee4abd Update const generics tests
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05 22:20:01 +00:00
varkor
727e20410c Add a test for const parameter uppercase lint 2019-02-16 13:04:15 +00:00
varkor
425fb58cac Don't abort early when collecting const generics 2019-02-16 13:03:58 +00:00
varkor
1b933a5ce9 Add a test forbidding the use of const parameters in inner items 2019-02-07 15:03:20 +01:00
varkor
451f128783 Parse negative literals in const generic arguments 2019-02-07 15:03:20 +01:00
varkor
61f35f0641 Adjust generic const param resolution 2019-02-07 15:03:20 +01:00