about summary refs log tree commit diff
path: root/src/test/compile-fail
AgeCommit message (Collapse)AuthorLines
2017-07-18Prohibit lifetime arguments in path segments with late bound lifetime parametersVadim Petrochenkov-15/+128
2017-07-18Support generic lifetime arguments in method callsVadim Petrochenkov-38/+38
2017-07-17Move resolve diagnostic instability to compile-failOliver Schneider-0/+67
The produced paths aren't stable between builds, since reporting paths inside resolve, before resolve is finished might produce paths resolved to type aliases instead of the concrete type. Compile-fail tests can match just parts of messages, so they don't "suffer" from this issue. This is just a workaround, the instability should be fixed in the future.
2017-07-17Move some tests from compile-fail to uiOliver Schneider-129/+0
2017-07-16Fix checking for missing stability annotationsVadim Petrochenkov-1/+20
Remove couple of unnecessary `#![feature(staged_api)]`.
2017-07-12Rollup merge of #43000 - estebank:on-unimplemented-path, r=arielb1Mark Simulacrum-209/+0
`rustc_on_unimplemented` supports referring to trait Add support to `rustc_on_unimplemented` to reference the full path of the annotated trait. For the following code: ```rust pub mod Bar { #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}` `{Baz}` `{Quux}` in `{Foo}`"] pub trait Foo<Bar, Baz, Quux> {} } ``` the error message will be: ``` test error `std::string::String` with `u8` `_` `u32` in `Bar::Foo` ```
2017-07-11Slew of feature gating tests for issue #43106.Felix S. Klock II-0/+1291
2017-07-11Auto merge of #42913 - kennytm:fix-40569-ident-without-backtrack, r=jseyfriedbors-2/+2
Only match a fragment specifier the if it starts with certain tokens. When trying to match a fragment specifier, we first predict whether the current token can be matched at all. If it cannot be matched, don't bother to push the Earley item to `bb_eis`. This can fix a lot of issues which otherwise requires full backtracking (#42838). In this PR the prediction treatment is not done for `:item`, `:stmt` and `:tt`, but it could be expanded in the future. Fixes #24189. Fixes #26444. Fixes #27832. Fixes #34030. Fixes #35650. Fixes #39964. Fixes the 4th comment in #40569. Fixes the issue blocking #40984.
2017-07-10Auto merge of #43028 - michaelwoerister:dedup-dep-nodes, r=nikomatsakisbors-23/+35
incr.comp.: Deduplicate some DepNodes and introduce anonymous DepNodes This is a parallel PR to the pending https://github.com/rust-lang/rust/pull/42769. It implements most of what is possible in terms of DepNode re-opening without having anonymous DepNodes yet (https://github.com/rust-lang/rust/issues/42298). r? @nikomatsakis
2017-07-10Auto merge of #43109 - pnkfelix:fix-link_args-gate, r=nikomatsakisbors-4/+14
Fix feature gate for `#[link_args(..)]` attribute Fix feature gate for `#[link_args(..)]` attribute so that it will fire regardless of context of attribute. See also #29596 and #43106
2017-07-10Fix feature gate for `#[link_args(..)]` attribute so that it will fireFelix S. Klock II-4/+14
regardless of context of attribute. Extend the gating test to include the attribute in "weird" places.
2017-07-10Split DepNode::ItemSignature into non-overlapping variants.Michael Woerister-23/+35
2017-07-10Store all generic arguments for method calls in ASTVadim Petrochenkov-0/+13
2017-07-08Auto merge of #43097 - PlasmaPower:large-align, r=eddybbors-1/+1
Raise alignment limit from 2^15 to 2^31 - 1 Fixes #42960
2017-07-08Auto merge of #42996 - Boreeas:merge-e0609-e0612, r=GuillaumeGomezbors-18/+6
Fold E0612, E0613 into E0609 As discussed in #42945, with PR 1506 tuple indices are no longer considered a separate case from normal field. This PR folds E06012 ("tuple index out of bounds") and E0613 ("type is not a tuple") into E0609 ("type does not have field with that name") Resolves #42945
2017-07-08Lower alignment limit down to 2^31 - 1 (from LLVM)Lee Bousfield-1/+1
2017-07-08Raised alignment limit from 2^15 to 2^31Lee Bousfield-1/+1
2017-07-08Remove unused Add bounds in iterator for ranges impls.Simon Sapin-1/+0
2017-07-08Auto merge of #42894 - petrochenkov:deny, r=nikomatsakisbors-57/+18
Make sufficiently old or low-impact compatibility lints deny-by-default Needs crater run before proceeding. r? @nikomatsakis
2017-07-08Make `patterns_in_fns_without_body` warn-by-default againVadim Petrochenkov-0/+2
Fix some tests on Linux
2017-07-08Move public reexports of private extern crates into a separate lintVadim Petrochenkov-1/+0
This is going to be a hard error while all private-in-public errors from rustc_privacy will be reclassified into lints.
2017-07-08Make sufficiently old or low-impact compatibility lints deny-by-defaultVadim Petrochenkov-48/+8
2017-07-08Remove more anonymous trait method parametersVadim Petrochenkov-10/+10
2017-07-07Auto merge of #42840 - arielb1:poison-smoke-and-mirrors, r=nikomatsakisbors-0/+60
Replace the global fulfillment cache with the evaluation cache This uses the new "Chalk" ParamEnv refactoring to check "global" predicates in an empty environment, which should be correct because global predicates aren't affected by a consistent environment. Fixes #39970. Fixes #42796. r? @nikomatsakis
2017-07-07Fold E0613 into E0609boreeas-18/+6
Resolves #42945
2017-07-07Auto merge of #42809 - seanmonstar:stable-associated-consts, r=nikomatsakisbors-53/+0
remove associated_consts feature gate Currently struggling to run tests locally (something about jemalloc target missing). cc #29646
2017-07-07use the evaluation cache instead of the global fulfillment cacheAriel Ben-Yehuda-0/+60
The evaluation cache already exists, and it can handle differing parameter environments natively. Fixes #39970. Fixes #42796.
2017-07-07Only match a fragment specifier the if it starts with certain tokens.kennytm-2/+2
Fixes #24189. Fixes #26444. Fixes #27832. Fixes #34030. Fixes #35650. Fixes #39964. Fixes the 4th comment in #40569. Fixes the issue blocking #40984.
2017-07-07Address review commentspetrochenkov-6/+6
Fix regressions after rebase
2017-07-06Check adjustments and node substsVadim Petrochenkov-7/+70
Cleanup checking of inherent static methods and fix checking of inherent associated constants Add more tests
2017-07-06Check types for privacyVadim Petrochenkov-0/+372
2017-07-06remove associated_consts feature gateSean McArthur-53/+0
2017-07-06Disallow `$($v:vis)*`. Fix #42755.kennytm-0/+17
2017-07-06Auto merge of #42727 - alexcrichton:allocators-new, r=eddybbors-191/+94
rustc: Implement the #[global_allocator] attribute This PR is an implementation of [RFC 1974] which specifies a new method of defining a global allocator for a program. This obsoletes the old `#![allocator]` attribute and also removes support for it. [RFC 1974]: https://github.com/rust-lang/rfcs/pull/1974 The new `#[global_allocator]` attribute solves many issues encountered with the `#![allocator]` attribute such as composition and restrictions on the crate graph itself. The compiler now has much more control over the ABI of the allocator and how it's implemented, allowing much more freedom in terms of how this feature is implemented. cc #27389
2017-07-05`rustc_on_unimplemented` supports referring to traitEsteban Küber-209/+0
Add support to `rustc_on_unimplemented` to reference the full path of the annotated trait. For the following code: ```rust pub mod Bar { #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}` `{Baz}` `{Quux}` in `{Foo}`"] pub trait Foo<Bar, Baz, Quux> {} } ``` the error message will be: ``` test error `std::string::String` with `u8` `_` `u32` in `Bar::Foo` ```
2017-07-05rustc: Implement the #[global_allocator] attributeAlex Crichton-191/+94
This PR is an implementation of [RFC 1974] which specifies a new method of defining a global allocator for a program. This obsoletes the old `#![allocator]` attribute and also removes support for it. [RFC 1974]: https://github.com/rust-lang/rfcs/pull/197 The new `#[global_allocator]` attribute solves many issues encountered with the `#![allocator]` attribute such as composition and restrictions on the crate graph itself. The compiler now has much more control over the ABI of the allocator and how it's implemented, allowing much more freedom in terms of how this feature is implemented. cc #27389
2017-07-05Merge remote-tracking branch 'origin/master' into proc_macro_apiAlex Crichton-272/+327
2017-06-30Auto merge of #42995 - GuillaumeGomez:rollup, r=GuillaumeGomezbors-1/+30
Rollup of 6 pull requests - Successful merges: #42669, #42911, #42925, #42957, #42985, #42987 - Failed merges: #42936
2017-06-30Rollup merge of #42957 - GuillaumeGomez:add-e0619, r=nikomatsakisGuillaume Gomez-1/+2
Add E0619 error explanation r? @eddyb
2017-06-30Rollup merge of #42669 - gaurikholkar:master, r=nikomatsakisGuillaume Gomez-0/+28
Adding diagnostic code 0611 for lifetime errors with one named, one anonymous lifetime parameter This is a fix for #42517 Note that this only handles the above case for **function declarations** and **traits**. `impl items` and `closures` will be handled in a later PR. Example ``` fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { if x > y { x } else { y } } ``` now displays the following error message. ui tests have been added for the same. ``` error[E0611]: explicit lifetime required in the type of `x` 11 | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { | ^ consider changing the type of `x` to `&'a i32` 12 | if x > y { x } else { y } | - lifetime `'a` required ``` #42516 r? @nikomatsakis
2017-06-30Fix error codes mixupGuillaume Gomez-6/+25
2017-06-30Add E0619 error explanationGuillaume Gomez-24/+6
2017-06-30Auto merge of #42969 - arielb1:struct-err, r=eddybbors-0/+18
mem_categorization: handle type-based paths in variant patterns These can't be used in correct programs, but must be handled in order to prevent ICEs. Fixes #42880. r? @eddyb
2017-06-30rename compile-fail testgaurikholkar-0/+0
2017-06-30move ERROR lineNiko Matsakis-2/+2
2017-06-29Auto merge of #42902 - petrochenkov:keydcrate, r=jseyfriedbors-0/+68
Make `$crate` a keyword Fixes https://github.com/rust-lang/rust/issues/42898 r? @jseyfried or @nrc
2017-06-29tweak comments in E0495.rsNiko Matsakis-1/+6
2017-06-29adding compile-fail testgaurikholkar-0/+23
2017-06-29mem_categorization: handle type-based paths in variant patternsAriel Ben-Yehuda-0/+18
These can't be used in correct programs, but must be handled in order to prevent ICEs. Fixes #42880.
2017-06-29Auto merge of #42527 - qnighy:unsized-tuple-coercions, r=arielb1bors-0/+134
Unsized tuple coercions Part of #18469. Fixes #32702. #37685 and #34451 might also be related. This PR does the following: - Introduce explicit `Sized` constraints on tuple initializers, similar to that of record-struct initializers. Not much relevant to the main contribution but I noticed this when making tests for unsized tuple coercions. - Implement `(.., T): Unsize<(.., U)>` where `T: Unsize<U>`. - Assume `(.., T)` is MaybeUnsizedUnivariant. - Modify `src/librustc/ty/util.rs` and `src/librustc_trans/glue.rs` so that tuples and structs are uniformly traversed when translating.