Samy Kacimi
7a2a17af09
normalize use of backticks/lowercase in compiler messages for librustc_mir
...
https://github.com/rust-lang/rust/issues/60532
r? @alexreg
2019-07-06 20:40:40 +02:00
Yuki Okushi
c004451a20
Migrate compile-pass annotations to build-pass
2019-07-03 06:30:28 +09:00
bors
e79b2a18a2
Auto merge of #61172 - matthewjasper:cleanup-implied-bounds-lint, r=varkor
...
Improve the explicit_outlives_requirements lint
* Don't use Strings to compare parameters
* Extend the lint to lifetime bounds
* Extend the lint to enums and unions
* Use the correct span for where clauses in tuple structs
* Try to early-out where possible
* Remove unnecessary bounds in rustc crates
2019-06-19 12:41:38 +00:00
Matthew Jasper
63edd2c358
Remove the HirId/NodeId from where clauses
...
Also give them a span in the HIR
2019-06-18 22:54:51 +01:00
bors
605ea9d05c
Auto merge of #59625 - immunant:copy_variadics_typealias, r=eddyb
...
Refactor C FFI variadics to more closely match their C counterparts, and add Clone implementation
We had to make some changes to expose `va_copy` and `va_end` directly to users (mainly for C2Rust, but not exclusively):
- redefine the Rust variadic structures to more closely correspond to C: `VaList` now matches `va_list`, and `VaListImpl` matches `__va_list_tag`
- add `Clone` for `VaListImpl`
- add explicit `as_va_list()` conversion function from `VaListImpl` to `VaList`
- add deref coercion from `VaList` to `VaListImpl`
- add support for the `asmjs` target
All these changes were needed for use cases like:
```Rust
let mut ap2 = va_copy(ap);
vprintf(fmt, ap2);
va_end(&mut ap2);
```
2019-06-18 21:50:46 +00:00
Andrei Homescu
b9ea653aee
Expose VaListImpl as the Rust equivalent of __va_list_tag and implement Clone for it.
2019-06-17 16:04:49 -07:00
Lzu Tao
7d69d4ced2
Make use of ptr::null(_mut) instead of casting zero
2019-06-17 10:52:46 +00:00
Michael Bradshaw
dac1c6a731
Implement RFC 2645 (transparent enums and unions)
...
Tracking issue: #60405
2019-06-10 22:07:24 -07:00
Matthew Jasper
8ffa408059
Update tests for changes to cannot move errors
2019-06-03 14:55:29 +01:00
Mazdak Farrokhzad
83b74f2aad
Rollup merge of #61438 - estebank:generics-span, r=varkor
...
Point at individual type args on arg count mismatch
- Point at individual type arguments on arg count mismatch
- Make generics always have a valid span, even when there are no args
- Explain that `impl Trait` introduces an implicit type argument
Fix #55991 .
2019-06-02 15:23:49 +02:00
varkor
5a2410a07c
Add error for pattern-matching on arrays without a fixed size
2019-06-02 01:55:46 +01:00
Esteban Küber
28859472f7
Point at individual type arguments on arg count mismatch
2019-06-01 10:35:31 -07:00
bors
413790186c
Auto merge of #61203 - memoryruins:bare_trait_objects, r=Centril
...
Warn on bare_trait_objects by default
The `bare_trait_objects` lint is set to `warn` by default.
Most ui tests have been updated to use `dyn` to avoid creating noise in stderr files.
r? @Centril
cc #54910
2019-05-29 21:55:59 +00:00
memoryruins
eb4580a570
Update ui test suite to use dyn
2019-05-29 00:57:31 -04:00
Esteban Küber
609ffa1a89
Reword malformed attribute input diagnostics
...
- Handle empty `cfg_attr` attribute
- Reword empty `derive` attribute error
- Use consistend error message: "malformed `attrname` attribute input"
- Provide suggestions when possible
- Move note/help to label/suggestion
- Use consistent wording "ill-formed" -> "malformed"
- Move diagnostic logic out of parser
2019-05-25 11:55:50 -07:00
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