Felix S. Klock II
4124d8e48b
Moved new dropck-eyepatch compile-fail tests to the ui/ subtree.
2016-10-17 18:02:23 +02:00
Felix S. Klock II
0271a9a60a
Fix Subst construction: use subst from adt_def rather than Drop impl's subst.
...
This addresses issue pointed out by niko that prior code would break
if the declaration order for generics does not match how they are fed
into the instantiation of the type itself. (Added some tests
exercising this scenario.)
2016-10-17 16:14:25 +02:00
Felix S. Klock II
fa7f69cdaa
tests for #[may_dangle] attribute.
2016-10-12 18:24:23 +02:00
Felix S. Klock II
e185cd5190
Fix bug in test for E0199 and add test for E0198.
...
In particular, as far as I can tell from the error diagnostics, the
former test for E0199 was actually a test for E0198, and there was no
test for E0198.
(I am assuming that one of my previous changes to the `unsafe impl`
checking fixed a latent bug in how these two cases were
differentiated.)
2016-10-12 18:23:23 +02:00
Felix S. Klock II
9a649c328c
Require destructors using #[may_dangle] to use unsafe impl.
2016-10-12 18:23:20 +02:00
Jonathan Turner
5dcd71f8ab
Rollup merge of #36932 - michaelwoerister:type-alias-dep-graph-test, r=nikomatsakis
...
incr.comp.: Add test case for dependency graph of type aliases.
r? @nikomatsakis
2016-10-06 08:35:42 -07:00
Jonathan Turner
5a199bf3fc
Rollup merge of #36909 - GuillaumeGomez:merge_e0002_e0004, r=arielb1
...
Merge E0002 into E0004
Fixes #36724 .
r? @jonathandturner
2016-10-06 08:35:41 -07:00
Vadim Petrochenkov
c95b280d72
Move pattern resolution checks from typeck to resolve
...
Make error messages more precise
2016-10-04 22:20:38 +03:00
Vadim Petrochenkov
d19c16acfb
Fix cross-crate resolution of half-items created by export shadowing
2016-10-04 22:20:37 +03:00
Manish Goregaokar
0e3cd4ed15
Rollup merge of #36941 - martinhath:issue-21837, r=alexcrichton
...
Add regression test for Issue #21837
This PR adds a regression test for Issue #21837 , as explained in the comments of the issue.
2016-10-04 15:24:04 +05:30
Manish Goregaokar
5a4ecb4a0c
Rollup merge of #36798 - gavinb:fix/36164, r=GuillaumeGomez
...
Improve error message and snippet for "did you mean `x`"
- Fixes #36164
- Part of #35233
Based on the standalone example https://is.gd/8STXMd posted by @nikomatsakis and using the third formatting option mentioned in #36164 and agreed by @jonathandturner.
Note however this does not address the question of [how to handle an empty or unknown suggestion](https://github.com/rust-lang/rust/issues/36164#issuecomment-244460024 ). @nikomatsakis any suggestions on how best to address that part?
2016-10-04 15:24:01 +05:30
Martin Thoresen
d8ddef0de3
Add test for Issue #21837
2016-10-03 23:40:40 +02:00
Michael Woerister
f320004a1b
incr.comp.: Add test case for dependency graph of type aliases.
2016-10-03 12:30:29 -04:00
bors
f3745653e1
Auto merge of #36767 - jseyfried:enforce_rfc_1560_shadowing, r=nrc
...
Enforce the shadowing restrictions from RFC 1560 for today's macros
This PR enforces a weakened version of the shadowing restrictions from RFC 1560. More specifically,
- If a macro expansion contains a `macro_rules!` macro definition that is used outside of the expansion, the defined macro may not shadow an existing macro.
- If a macro expansion contains a `#[macro_use] extern crate` macro import that is used outside of the expansion, the imported macro may not shadow an existing macro.
This is a [breaking-change]. For example,
```rust
macro_rules! m { () => {} }
macro_rules! n { () => {
macro_rules! m { () => {} } //< This shadows an existing macro.
m!(); //< This is inside the expansion that generated `m`'s definition, so it is OK.
} }
n!();
m!(); //< This use of `m` is outside the expansion, so it causes the shadowing to be an error.
```
r? @nrc
2016-10-03 01:30:32 -07:00
Guillaume Gomez
cb22364f32
Merge E0002 into E0004
2016-10-02 15:45:06 +02:00
bors
791fb778cc
Auto merge of #36862 - chamoysvoice:E0220, r=GuillaumeGomez
...
Update E0220 error format
@jonathandturner
Part of #35233 .
Fixes #35385 .
2016-10-02 05:01:57 -07:00
Jeffrey Seyfried
057302bcd9
Fix fallout in tests.
2016-10-02 08:25:28 +00:00
Jeffrey Seyfried
9de6bdc3cf
Add test.
2016-10-02 08:25:28 +00:00
Gavin Baker
99aae9b834
Improve error message and snippet for "did you mean x"
...
- Fixes #36164
- Part of #35233
- handles unknown fields
- uses UI-style tests
- update all related tests (cfail, ui, incremental)
2016-10-02 15:57:39 +11:00
bors
ab38d52df7
Auto merge of #36885 - Manishearth:rollup, r=Manishearth
...
Rollup of 6 pull requests
- Successful merges: #36865 , #36872 , #36873 , #36877 , #36880 , #36882
- Failed merges:
2016-10-01 10:17:20 -07:00
Manish Goregaokar
406fe7e3c2
Rollup merge of #34764 - pnkfelix:attrs-on-generic-formals, r=eddyb
...
First step for #34761
2016-10-01 19:22:39 +05:30
Manish Goregaokar
8457ab61f6
Rollup merge of #36882 - jseyfried:fix_36881, r=eddyb
...
resolve: fix incorrect code in `module_to_string`
Fixes #36881 .
r? @nrc or @eddyb
2016-10-01 16:38:33 +05:30
Manish Goregaokar
e506bfa58e
Rollup merge of #36873 - GuillaumeGomez:e0035_e0036, r=jonathandturner
...
Update E0035, E0036 and E0370 to new error format
Fixes #35634 .
Fixes #35206 .
Fixes #35207 .
r? @jonathandturner
2016-10-01 16:38:32 +05:30
Jeffrey Seyfried
91e1f24f12
Fix module_to_string.
2016-10-01 07:41:53 +00:00
Guillaume Gomez
8ea426a6ce
Update E0370 to new error format
2016-09-30 23:33:24 +02:00
Guillaume Gomez
4d5e81d80d
Update E0036 to new error format
2016-09-30 23:33:20 +02:00
Brian Anderson
37abec06e5
Tidy
2016-09-30 14:02:51 -07:00
Ross Schulman
b2dfeac690
Adding ignore-emscripten to failing tests.
2016-09-30 14:02:44 -07:00
Jesus Garlea
f4fdf814de
Update E0220 error format
...
squash! Update E0220 error format
Update Error E0220 to new format
2016-09-30 15:15:16 -05:00
Guillaume Gomez
d8239e3e59
Update E0035 to new error format
2016-09-30 21:30:05 +02:00
Jonathan Turner
224e882878
Rollup merge of #36757 - KiChjang:E0025-format, r=jonathandturner
...
Update E0025 to new error format
Part of #35233 .
Fixes #35198 .
r? @jonathandturner
2016-09-28 10:33:56 -07:00
Jonathan Turner
475a41bd50
Rollup merge of #36376 - GuillaumeGomez:e0050, r=jonathandturner
...
Update E0050 to new error format
Part of #35233 .
Fixes #35211 .
r? @jonathandturner
2016-09-28 10:33:56 -07:00
Guillaume Gomez
61cbf414d7
Update E0050 to new error format
2016-09-28 11:39:55 +02:00
bors
a059cb2f33
Auto merge of #36601 - jseyfried:build_reduced_graph_in_expansion, r=nrc
...
Assign def ids and build the module graph during expansion
r? @nrc
2016-09-27 14:11:07 -07:00
bors
ea65ab6c7e
Auto merge of #36761 - jonathandturner:E0425_E0446_E0449, r=nrc
...
Update E0425, E0446, E0449
This addresses https://github.com/rust-lang/rust/issues/35343 , https://github.com/rust-lang/rust/issues/35923 , and https://github.com/rust-lang/rust/issues/35924 . Part of https://github.com/rust-lang/rust/issues/35233
Specifically, this adds labels to these error messages following the suggestions in the attached bugs.
r? @nrc
2016-09-27 07:30:34 -07:00
Jeffrey Seyfried
dfa69be38a
Fix fallout in tests.
2016-09-27 06:43:51 +00:00
bors
ec7679b460
Auto merge of #36764 - jonathandturner:rollup, r=jonathandturner
...
Rollup of 14 pull requests
- Successful merges: #36563 , #36574 , #36586 , #36662 , #36663 , #36669 , #36676 , #36721 , #36723 , #36727 , #36729 , #36742 , #36754 , #36756
- Failed merges:
2016-09-26 23:30:19 -07:00
Jonathan Turner
e832762ba6
Rollup merge of #36756 - alygin:e0512-new-format, r=jonathandturner
...
New error format for E0512
Part of #35233 , fixes #36107
r? @jonathandturner
2016-09-26 17:29:50 -07:00
Jonathan Turner
9b72650890
Rollup merge of #36723 - GuillaumeGomez:e0513, r=jonathandturner
...
E0513
Part of #35233
r? @jonathandturner
2016-09-26 17:29:48 -07:00
Jonathan Turner
02cc578676
Rollup merge of #36721 - TimNN:infinite-emptiness, r=nrc
...
reject macros with empty repetitions
Fixes #5067 by checking the lhs of `macro_rules!` for repetitions which could match an empty token tree.
2016-09-26 17:29:48 -07:00
Jonathan Turner
1d9646228d
Rollup merge of #36662 - jseyfried:parse_macro_invoc_paths, r=nrc
...
parser: support paths in bang macro invocations (e.g. `path::to::macro!()`)
r? @nrc
2016-09-26 17:29:47 -07:00
Jonathan Turner
c0f29fdd58
Update E0446 label with improved wording
2016-09-26 17:05:43 -07:00
Keith Yeung
fd7314f534
Update E0025 to new error format
2016-09-26 16:11:05 -07:00
Jonathan Turner
2fa91b23c5
Update E0425, E0446, E0449
2016-09-26 16:05:46 -07:00
bors
388c3f25f9
Auto merge of #36661 - jneem:master, r=nrc
...
Change error message for intrinsic signature.
Makes it so the signature of the intrinsic in the user's code is
"found," while the signature that rustc knows about is "expected."
Before this patch, the code
```
extern "platform-intrinsic" {
fn x86_mm_movemask_ps() -> i32;
}
```
would give the error
```
error[E0444]: platform-specific intrinsic has invalid number of arguments: found 1, expected 0
--> test.rs:4:5
|
4 | fn x86_mm_movemask_ps() -> i32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
```
After this patch, it says "found 0, expected 1".
2016-09-26 14:26:18 -07:00
Andrew Lygin
157208b046
New error format for E0512
2016-09-26 22:49:22 +03:00
Guillaume Gomez
1e4e81c320
Add compile-fail test for E0513
2016-09-26 20:52:01 +02:00
Joe Neeman
159aa0b902
Add a compile-fail test.
2016-09-26 18:48:35 +02:00
bors
b786976a15
Auto merge of #36730 - jseyfried:make_macro_rules_invocations_magic, r=nrc
...
Forbid user-defined macros named "macro_rules"
This is a [breaking-change].
r? @nrc
2016-09-26 01:21:00 -07:00
bors
0a0215ddcd
Auto merge of #36652 - giannicic:issue-36553, r=nrc
...
this commit corrects E0520 error text.
See referenced issue for further info
r? @nrc
2016-09-25 22:03:28 -07:00