summary refs log tree commit diff
path: root/src/test/compile-fail
AgeCommit message (Collapse)AuthorLines
2017-06-22remove trailing whitespaceNiko Matsakis-1/+1
2017-06-22explain purpose of testNiko Matsakis-0/+6
2017-06-22Added more testsJohn Kåre Alsaker-0/+13
2017-06-05Auto merge of #42383 - estebank:candidate-newline, r=arielb1bors-239/+1
Use multiline note for trait suggestion
2017-06-04Separate suggestion in a `help` and a `note`Esteban Küber-0/+1
2017-06-04Auto merge of #42265 - Zoxc:for-sugar, r=eddybbors-1/+18
Change for-loop desugar to not borrow the iterator during the loop This is enables the use of suspend points inside for-loops in movable generators. This is illegal in the current desugaring as `iter` is borrowed across the body.
2017-06-03Auto merge of #42391 - photoszzt:master, r=Manishearthbors-15/+18
Better suggestion for unknown method r? @Manishearth fixes #42386
2017-06-03Auto merge of #42387 - GuillaumeGomez:error-codes-next, r=Susurrusbors-0/+17
Add E0603 error code Part of #42229. cc @Susurrus
2017-06-03Auto merge of #42334 - est31:master, r=jseyfriedbors-14/+52
Extend the unused macro lint to macros 2.0 Extends the unused macro lint (added in PR #41907) to macros 2.0 (added in PR #40847). r? @jseyfried
2017-06-03Auto merge of #42396 - venkatagiri:remove_lifetime_extn, r=arielb1bors-3/+1
rustc: remove temporary lifetime extension by borrow hint closes #39283. Thanks to @nikomatsakis for mentoring on this one. r? @arielb1
2017-06-02Better suggestion for unknown methodzzhu-15/+18
Fixes #42386
2017-06-02rustc: remove temporary lifetime extension by borrow hintVenkata Giri Reddy-3/+1
2017-06-02Add E0603 error codeGuillaume Gomez-0/+17
2017-06-02Use multiline note for trait suggestionEsteban Küber-239/+0
2017-06-01remove `layout_cache` and fix `-Z print-type-sizes`Niko Matsakis-20/+0
now we grow the type-sizes info during execution, rather than walking the cache after the fact
2017-06-01Change for-loop desugar to not borrow the iterator during the loopJohn Kåre Alsaker-1/+18
2017-06-01Rollup merge of #42324 - seanmonstar:41323-compare_const_impl, r=nikomatsakisCorey Farwell-0/+57
associated_consts: check trait obligations and regionck for associated consts Closes #41323 r? @nikomatsakis
2017-05-31Fix a test and address review commentest31-0/+2
2017-05-31Extend the unused macro lint to macros 2.0est31-14/+50
2017-05-30associated_consts: check trait obligations and regionck for associated constsSean McArthur-0/+57
Closes #41323
2017-05-30Turn `invalid_type_param_default` into a lint againVadim Petrochenkov-0/+5
2017-05-30Turn public reexporting of private extern crates into a lint againVadim Petrochenkov-0/+4
2017-05-30Turn sufficiently old compatibility lints into hard errorsVadim Petrochenkov-52/+56
2017-05-30Auto merge of #42282 - Mark-Simulacrum:issue-40342, r=arielb1bors-2/+8
Don't warn on lifetime generic no_mangle functions. Fixes #40342.
2017-05-29Auto merge of #42264 - GuillaumeGomez:new-error-codes, r=Susurrusbors-0/+46
New error codes Part of #42229.
2017-05-29Auto merge of #41856 - qnighy:prohibit-parenthesized-params-in-more-types, ↵bors-1/+102
r=arielb1 Prohibit parenthesized params in more types. Prohibit parenthesized parameters in primitive types, type parameters, `Self`, etc. Fixes #32995.
2017-05-29Auto merge of #42262 - Mark-Simulacrum:issue-40350, r=eddybbors-0/+24
Don't ICE with nested enums in missing docs lint. Fixes #40350.
2017-05-28Don't warn on lifetime generic no_mangle functions.Mark Simulacrum-2/+8
2017-05-27Rollup merge of #42249 - Mark-Simulacrum:issue-40244, r=eddybMark Simulacrum-5/+9
Allow variadic functions with cdecl calling convention. Fixes #40244.
2017-05-27Rollup merge of #42217 - venkatagiri:issue_39974, r=Mark-SimulacrumMark Simulacrum-0/+21
regression test for #39974 closes #39974 r? @Mark-Simulacrum
2017-05-27Rollup merge of #42207 - Nashenas88:remove_fragment_info, r=eddybMark Simulacrum-529/+0
Remove all instances of fragment_infos and fragment sets Remove unused fragment structs. This was suggested by @eddyb in IRC: [botbot link](https://botbot.me/mozilla/rustc/2017-05-23/?msg=86016574&page=2).
2017-05-27Auto merge of #42162 - est31:closure-to-fn-coercion, r=aturonbors-47/+0
Stabilize non capturing closure to fn coercion Stabilisation PR for non capturing closure to fn coercion. closes #39817
2017-05-27Add invalid unary operator usage error codeGuillaume Gomez-0/+13
2017-05-27Fix ICE on inner enum in missing docs lint.Mark Simulacrum-0/+24
This also simplifies the lint by not storing variant depth or the struct def stack, because we no longer need them.
2017-05-27Add new error codesGuillaume Gomez-0/+33
2017-05-27Allow variadic functions with cdecl calling convention.Mark Simulacrum-5/+9
2017-05-27Stabilize unions with `Copy` fields and no destructorVadim Petrochenkov-29/+21
2017-05-26Rollup merge of #42230 - venkatagiri:ice_regression_tests, r=Mark-SimulacrumCorey Farwell-0/+129
regression tests for ICEs closes #36379 closes #37550 closes #37665 closes #38160 closes #38954 closes #39362 r? @Mark-Simulacrum
2017-05-26Rollup merge of #42216 - charliesome:associate-type-typo, r=petrochenkovCorey Farwell-3/+3
Fix 'associate type' typo I came across an error message mentioning an 'associate type'. Since this is the only instance of this term in rustc (it's 'associated type' everywhere else), I think this might be a typo.
2017-05-26Add warning cycle #42238.Masaki Hara-3/+35
2017-05-26Auto merge of #42083 - petrochenkov:safeassign, r=nikomatsakisbors-7/+38
Make assignments to `Copy` union fields safe This is an accompanying PR to PR https://github.com/rust-lang/rust/pull/42068 stabilizing FFI unions. This was first proposed in https://github.com/rust-lang/rust/issues/32836#issuecomment-281296416, see subsequent comments as well. Assignments to `Copy` union fields do not read any data from the union and are [equivalent](https://github.com/rust-lang/rust/issues/32836#issuecomment-281660298) to whole union assignments, which are safe, so they should be safe as well. This removes a significant number of "false positive" unsafe blocks, in code dealing with FFI unions in particular. It desirable to make this change now, together with stabilization of FFI unions, because now it affecfts only unstable code, but later it will cause warnings/errors caused by `unused_unsafe` lint in stable code. cc #32836 r? @nikomatsakis
2017-05-26Auto merge of #42058 - froydnj:thiscall-support, r=nikomatsakisbors-0/+8
add thiscall calling convention support This support is needed for bindgen to work well on 32-bit Windows, and also enables people to begin experimenting with C++ FFI support on that platform. Fixes #42044.
2017-05-25regression test for #37550Venkata Giri Reddy-0/+18
2017-05-25regression test for #37665Venkata Giri Reddy-0/+20
regression test for #37550
2017-05-25Auto merge of #40847 - jseyfried:decl_macro, r=nrcbors-0/+193
Initial implementation of declarative macros 2.0 Implement declarative macros 2.0 (rust-lang/rfcs#1584) behind `#![feature(decl_macro)]`. Differences from `macro_rules!` include: - new syntax: `macro m(..) { .. }` instead of `macro_rules! m { (..) => { .. } }` - declarative macros are items: ```rust // crate A: pub mod foo { m!(); // use before definition; declaration order is irrelevant pub macro m() {} // `pub`, `pub(super)`, etc. work } fn main() { foo::m!(); // named like other items { use foo::m as n; n!(); } // imported like other items } pub use foo::m; // re-exported like other items // crate B: extern crate A; // no need for `#[macro_use]` A::foo::m!(); A::m!(); ``` - Racket-like hygiene for items, imports, methods, fields, type parameters, privacy, etc. - Intuitively, names in a macro definition are resolved in the macro definition's scope, not the scope in which the macro is used. - This [explaination](http://beautifulracket.com/explainer/hygiene.html) of hygiene for Racket applies here (except for the "Breaking Hygiene" section). I wrote a similar [explanation](https://github.com/jseyfried/rfcs/blob/hygiene/text/0000-hygiene.md) for Rust. - Generally speaking, if `fn f() { <body> }` resolves, `pub macro m() { <body> } ... m!()` also resolves, even if `m!()` is in a separate crate. - `::foo::bar` in a `macro` behaves like `$crate::foo::bar` in a `macro_rules!`, except it can access everything visible from the `macro` (thus more permissive). - See [`src/test/{run-pass, compile-fail}/hygiene`](https://github.com/rust-lang/rust/pull/40847/commits/afe7d89858fd72b983e24727d6f4058293153c19) for examples. Small example: ```rust mod foo { fn f() { println!("hello world"); } pub macro m() { f(); } } fn main() { foo::m!(); } ``` Limitations: - This does not address planned changes to matchers (`expr`,`ty`, etc.), c.f. #26361. - Lints (including stability and deprecation) and `unsafe` are not hygienic. - adding hygiene here will be mostly or entirely backwards compatible - Nested macro definitions (a `macro` inside another `macro`) don't always work correctly when invoked from external crates. - pending improvements in how we encode macro definitions in crate metadata - There is no way to "escape" hygiene without using a procedural macro. r? @nrc
2017-05-25regression test for #38160Venkata Giri Reddy-0/+31
2017-05-25regression test for #39362Venkata Giri Reddy-0/+28
2017-05-25regression test for #38954Venkata Giri Reddy-0/+16
2017-05-25regression test for #36379Venkata Giri Reddy-0/+16
2017-05-25regression test for #39974Venkata Giri Reddy-0/+21
closes #39974 r? @Mark-Simulacrum