varkor
aea04009e4
Move error code tests to error code folder
2019-05-24 22:07:35 +01:00
Alexander Regueiro
783b713b5d
Addressed more points raised in review.
2019-05-20 16:12:49 +01:00
Alexander Regueiro
20096628c6
Addressed points raised in review.
2019-05-20 16:12:49 +01:00
Alexander Regueiro
fd7c253acc
Update tests.
2019-05-20 16:12:49 +01:00
Alexander Regueiro
72e5e8bfa7
Update tests.
2019-05-20 16:12:49 +01:00
Matthew Jasper
ff71b80a85
Change compare mode to use -Zborrowck=mir
2019-05-12 18:46:43 +01:00
Esteban Küber
e0cef5cf40
fix typo
2019-05-02 15:53:09 -07:00
Mazdak Farrokhzad
d1b2d6d64d
Rollup merge of #60169 - varkor:tidy-unnecessary-ignore-newline, r=kennytm
...
Warn when ignore-tidy-linelength is present, but no lines are too long
It's easy for a `// ignore-tidy-linelength` to be added when there is a genuine need to ignore a file's line length, but then after refactoring the need is gone, but the tidy directive is not removed. This means that in the future, further editing may accidentally add unnecessarily long lines. This change forces `// ignore-tidy-linelength` to be used exactly when necessary, to make sure such changes are intentional.
2019-04-23 21:50:57 +02:00
varkor
497dcfa221
Update ui tests
2019-04-23 11:42:14 +01:00
varkor
62838975d0
Remove unnecessary ignore-tidy-linelength
2019-04-23 11:42:14 +01:00
Esteban Küber
6e723c24a8
Never stop due to errors before borrow checking
2019-04-22 13:11:53 -07:00
Matthew Jasper
8eef102270
update tests for migrate mode by default
2019-04-22 08:40:08 +01:00
Esteban Küber
2f36b54f0f
Emit specific error for struct literal in conditions
2019-04-19 10:13:44 -07:00
Mazdak Farrokhzad
2d6150a762
Rollup merge of #60052 - varkor:unused-parameter-diagnostic, r=estebank
...
Correct unused parameter diagnostic
The message was incorrect for unused lifetime parameters. There's no need to be specific.
2019-04-19 06:03:17 +02:00
varkor
048ba28ad1
Update tests
2019-04-18 18:35:18 +01:00
Andy Russell
b6f148c8bd
hide --explain hint if error has no extended info
2019-04-18 13:29:28 -04:00
Eduard-Mihai Burtescu
5f7055988b
Resolve inconsistency in error messages between "parameter" and "variable".
2019-04-17 13:25:07 +03:00
Mazdak Farrokhzad
bdb264ff5f
Rollup merge of #59675 - SimonSapin:stable-alloc, r=alexcrichton
...
Stabilize the `alloc` crate.
This implements RFC 2480:
* https://github.com/rust-lang/rfcs/pull/2480
* https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md
Closes https://github.com/rust-lang/rust/issues/27783
2019-04-14 00:23:25 +02:00
Simon Sapin
fc928a18ba
Stabilize the alloc crate.
...
This implements RFC 2480:
* https://github.com/rust-lang/rfcs/pull/2480
* https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md
Closes https://github.com/rust-lang/rust/issues/27783
2019-04-12 20:07:30 +02:00
Esteban Küber
146d040f0b
Reword tracking issue note
2019-04-11 11:42:06 -07:00
Esteban Küber
3ab97062cf
Tweak unstable diagnostic output
2019-04-10 18:10:30 -07:00
Mazdak Farrokhzad
06a9196055
Rollup merge of #59408 - euclio:compiletest-normalization, r=oli-obk
...
compiletest: make path normalization smarter
Fixes #59109 .
2019-03-28 13:35:43 +01:00
Mazdak Farrokhzad
b316514dbd
Rollup merge of #59150 - estebank:type-ascription, r=varkor
...
Expand suggestions for type ascription parse errors
Fix #51222 . CC #48016 , #47666 , #54516 , #34255 .
2019-03-26 09:05:39 +01:00
Andy Russell
695dfe7dff
compiletest: make path normalization smarter
2019-03-25 01:06:45 -04:00
Esteban Küber
44730271f7
Hide obvious suggestion from cli output
2019-03-23 13:05:30 -07:00
Esteban Küber
e1be8b0318
Swap primary/secondary spans for E0458
2019-03-23 13:05:30 -07:00
Esteban Küber
8e043950c8
Swap const evaluation lint spans to point at problem in primary span
2019-03-23 13:05:30 -07:00
Esteban Küber
1b0ab0b8a9
Tweak spans for E0599
2019-03-23 13:05:29 -07:00
Esteban Küber
d72ef21ddd
Reword type ascription note to reduce verbosity
2019-03-22 20:14:20 -07:00
Esteban Küber
44a086ef39
Review comment
2019-03-22 19:50:18 -07:00
Esteban Küber
8ba1a97e37
Expand suggestions for type ascription parse errors
2019-03-22 19:50:18 -07:00
varkor
aff175b328
Update tests
2019-03-20 18:32:52 +00:00
Vadim Petrochenkov
07f99b9fec
Update tests that don't run on my platform
2019-03-11 23:30:10 +03:00
Vadim Petrochenkov
c1cfacfb13
Update NLL tests
2019-03-11 23:18:35 +03:00
Vadim Petrochenkov
fa72a81bea
Update tests
2019-03-11 23:10:26 +03:00
Esteban Küber
d651281a71
Reword error message
2019-03-02 17:50:13 -08:00
Esteban Küber
0081ef2548
Point at enum definition when match patterns are not exhaustive
...
```
error[E0004]: non-exhaustive patterns: type `X` is non-empty
--> file.rs:9:11
|
1 | / enum X {
2 | | A,
| | - variant not covered
3 | | B,
| | - variant not covered
4 | | C,
| | - variant not covered
5 | | }
| |_- `X` defined here
...
9 | match x {
| ^
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
error[E0004]: non-exhaustive patterns: `B` and `C` not covered
--> file.rs:11:11
|
1 | / enum X {
2 | | A,
3 | | B,
4 | | C,
| | - not covered
5 | | }
| |_- `X` defined here
...
11 | match x {
| ^ patterns `C` not covered
```
When a match expression doesn't have patterns covering every variant,
point at the enum's definition span. On a best effort basis, point at the
variant(s) that are missing. This does not handle the case when the missing
pattern is due to a field's enum variants:
```
enum E1 {
A,
B,
C,
}
enum E2 {
A(E1),
B,
}
fn foo() {
match E2::A(E1::A) {
E2::A(E1::B) => {}
E2::B => {}
}
//~^ ERROR `E2::A(E1::A)` and `E2::A(E1::C)` not handled
}
```
Unify look between match with no arms and match with some missing patterns.
Fix #37518 .
2019-03-02 16:45:23 -08:00
Dan Robertson
08bd4ff998
Rename variadic to c_variadic
...
Function signatures with the `variadic` member set are actually
C-variadic functions. Make this a little more explicit by renaming the
`variadic` boolean value, `c_variadic`.
2019-02-27 10:21:54 -05:00
Dan Robertson
58147d486b
Support defining C compatible variadic functions
...
Add support for defining C compatible variadic functions in unsafe rust
with extern "C".
2019-02-27 10:21:35 -05:00
Eduard-Mihai Burtescu
f6d1e9790c
rustc_mir: split qualify_consts' checking and value qualification.
2019-02-14 13:36:51 +02:00
varkor
4e0e188999
Make name resolution handle consts in GenericParamsFromOuterFunction properly
2019-02-07 15:03:20 +01:00
varkor
455d659e91
Update tests
...
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07 15:02:17 +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
David Wood
1595163356
Add suggestion for duplicated import.
...
This commit adds a suggestion when a import is duplicated (ie. the same name
is used twice trying to import the same thing) to remove the second
import.
2019-01-31 12:01:28 +01:00
John Kåre Alsaker
38bcd4b42a
Move privacy checking later in the pipeline and make some passes run in parallel
2019-01-30 21:19:02 +01:00
Mark Rousskov
7a58c6d1de
Replace deprecated ATOMIC_INIT consts
2019-01-26 15:27:38 -07:00
bors
51cc3cdcf0
Auto merge of #55009 - oli-obk:const_safety, r=RalfJung
...
Make raw ptr ops unsafe in const contexts
r? @RalfJung
cc @Centril
2019-01-21 23:10:11 +00:00
Oliver Scherer
aedc3a51df
Declare some unconst operations as unsafe in const fn
2019-01-21 16:01:57 +01:00
Esteban Küber
2ab6cefccf
Do not suggest angle brackets when there are no type arguments
2019-01-20 02:47:51 -08:00
Esteban Küber
d37a6d83e1
Suggest usage of angle brackets
2019-01-19 19:39:58 -08:00