about summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2019-03-14Add `-Z allow_features=...` flagTyler Mandry-0/+50
2019-03-14Auto merge of #59120 - alexreg:move-issue-tests-1, r=varkorbors-75/+55
Moved issue tests to subdirs and normalised names Consistency, decluttering, ease of navigation :-) r? @Centril
2019-03-14Moved issue tests to subdirs and normalised names.Alexander Regueiro-75/+55
2019-03-13test that wildcard type `_` is not duplicated by `type Foo<X> = (X, X);` and ↵Felix S. Klock II-0/+99
potentially instantiated at different types. (Updated to reflect changes in diagnostic output and compiletest infrastructure.)
2019-03-13add suggestions to invalid macro item errorAndy Russell-4/+60
2019-03-13Auto merge of #58349 - petrochenkov:uni201x, r=pnkfelixbors-57/+7
resolve: Simplify import resolution for mixed 2015/2018 edition mode Non-controversial part of https://github.com/rust-lang/rust/pull/57745. Before: | Local edition (per-span) | Global edition (--edition) | Imports (`use foo;`) | Absolute paths (`::foo`) | | ------------- |----------------|-----------------------------------------|------------------------------------------------| | 2018 | Any | Uniform | Extern prelude | | 2015 | 2015 | Crate-relative | Crate-relative | | 2015 | 2018 | Crate-relative with fallback to Uniform (future-proofed to error if the result is not Crate-relative or from Extern prelude) | Crate-relative with fallback to Extern prelude | After: | Local edition (per-span) | Global edition (--edition) | Imports (`use foo;`) | Absolute paths (`::foo`) | | ------------- |----------------|-----------------------------------------|------------------------------------------------| | 2018 | Any | Uniform | Extern prelude | | 2015 | 2015 | Crate-relative | Crate-relative | | 2015 | 2018 | Crate-relative with fallback to Extern prelude | Crate-relative with fallback to Extern prelude | I.e. only the behavior of the mixed local-2015-global-2018 mode is changed. This mixed mode has two goals: - Address regressions from https://github.com/rust-lang/rust/pull/56053#issuecomment-440826397. Both "before" and "after" variants address those regressions. - Be retrofit-able to "full 2015" edition (https://github.com/rust-lang/rust/pull/57745). Any more complex fallback scheme (with more candidates) than "Crate-relative with fallback to Extern prelude" will give more regressions than https://github.com/rust-lang/rust/pull/57745#issuecomment-455855089 and is therefore less retrofit-able while also being, well, more complex. So, we can settle on "Crate-relative with fallback to Extern prelude". (I'll hopefully proceed with https://github.com/rust-lang/rust/pull/57745 after mid-February.) r? @Centril
2019-03-13tidy testSaleem Jaffer-1/+1
2019-03-13adding testSaleem Jaffer-0/+17
2019-03-13Rollup merge of #59132 - nikomatsakis:issue-53548-generator-bound, r=pnkfelixMazdak Farrokhzad-0/+59
ignore higher-ranked object bound conditions created by WF In the `issue-53548` test added in this PR, the `Box<dyn Trait>` type is expanded to `Box<dyn Trait + 'static>`, but the generator "witness" that results is `for<'r> { Box<dyn Trait + 'r> }`. The WF code was encountering an ICE (when debug-assertions were enabled) and an unexpected compilation error (without debug-asserions) when trying to process this `'r` region bound. In particular, to be WF, the region bound must meet the requirements of the trait, and hence we got `for<'r> { 'r: 'static }`. This would ICE because the `Binder` constructor we were using was assering that no higher-ranked regions were involved (because the WF code is supposed to skip those). The error (if debug-asserions were disabled) came because we obviously cannot prove that `'r: 'static` for any region `'r`. Pursuant with our "lazy WF" strategy for higher-ranked regions, the fix is not to require that `for<'r> { 'r: 'static }` holds (this is also analogous to what we would do for higher-ranked regions appearing within the trait in other positions). Fixes #53548 r? @pnkfelix
2019-03-13Rollup merge of #59129 - sanxiyn:visit-impl-trait, r=varkorMazdak Farrokhzad-0/+32
Visit impl Trait for dead_code lint Fix #59085.
2019-03-13Rollup merge of #59083 - kyren:master, r=varkorMazdak Farrokhzad-35/+40
Fix #54822 and associated faulty tests Type checking associated constants can require trait bounds, but an empty parameter environment was provided to the trait solver. Providing an appropriate parameter environment seems to fix #54822 and also make one of the cases in src/test/ui/nll/trait-associated-constant.rs that should compile successfully do so. It also (slightly) improves the error message in src/test/ui/associated-const/associated-const-generic-obligations.rs
2019-03-13Rollup merge of #58876 - estebank:numeric-lifetime, r=petrochenkovMazdak Farrokhzad-0/+32
Parse lifetimes that start with a number and give specific error Fix #58786.
2019-03-12Suggest adding lifetime to struct fieldEsteban Küber-3/+11
2019-03-12review commentsEsteban Küber-2/+2
2019-03-12Rename test struct names to something more sensiblekyren-8/+8
2019-03-12Suggest return lifetime when there's only one named lifetimeEsteban Küber-0/+27
2019-03-12rustc: fix ICE when trait alias has bare SelfSean McArthur-0/+25
2019-03-12Remove compiletest comments from testsvarkor-4/+4
2019-03-12resolve: Simplify import resolution for mixed 2015/2018 edition modeVadim Petrochenkov-57/+7
2019-03-12Add NLL test error outputvarkor-0/+11
2019-03-12Remove invalid ASM testsvarkor-41/+0
These still fail on some architectures.
2019-03-12Ignore WASM on asm testsvarkor-2/+8
2019-03-12Update test for issue #55731varkor-3/+2
2019-03-12Add a test for #27054varkor-0/+6
2019-03-12Add a test for #26577varkor-0/+27
2019-03-12Add a test for #28587varkor-0/+18
2019-03-12Add a test for #22892varkor-0/+17
2019-03-12Add a test for #57781varkor-0/+20
2019-03-12Add a test for #55731varkor-0/+64
2019-03-12Add a test for #46101varkor-0/+18
2019-03-12Add a test for #44255varkor-0/+29
2019-03-12Add a test for #44127varkor-0/+17
2019-03-12Add a test for #26619varkor-0/+36
2019-03-12Add tests for #26448varkor-0/+59
2019-03-12Add a test for #10876varkor-0/+19
2019-03-12Unregress using scalar unions in constants.Oliver Scherer-0/+11
2019-03-12ignore higher-ranked WF requirements for trait objectsNiko Matsakis-0/+59
In the `issue-53548` test added in this commit, the `Box<dyn Trait>` type is expanded to `Box<dyn Trait + 'static>`, but the generator "witness" that results is `for<'r> { Box<dyn Trait + 'r> }`. The WF code was encountering an ICE (when debug-assertions were enabled) and an unexpected compilation error (without debug-asserions) when trying to process this `'r` region bound. In particular, to be WF, the region bound must meet the requirements of the trait, and hence we got `for<'r> { 'r: 'static }`. This would ICE because the `Binder` constructor we were using was assering that no higher-ranked regions were involved (because the WF code is supposed to skip those). The error (if debug-asserions were disabled) came because we obviously cannot prove that `'r: 'static` for any region `'r`. Pursuant with our "lazy WF" strategy for higher-ranked regions, the fix is not to require that `for<'r> { 'r: 'static }` holds (this is also analogous to what we would do for higher-ranked regions appearing within the trait in other positions).
2019-03-12Visit impl Trait for dead_code lintSeo Sanghyeon-0/+32
2019-03-12Auto merge of #58608 - ↵bors-59/+212
pnkfelix:warning-period-for-detecting-nested-impl-trait, r=zoxc Warning period for detecting nested impl trait Here is some proposed code for making a warning period for the new checking of nested impl trait. It undoes some of the corrective effects of PR #57730, by using boolean flags to track parts of the analysis that were previously skipped prior to PRs #57730 and #57981 landing. Cc #57979
2019-03-12syntax: Better recovery for `$ty::AssocItem` and `ty!()::AssocItem`Vadim Petrochenkov-4/+135
2019-03-11Be more discerning on when to attempt suggesting a comma in a macro invocationEsteban Küber-6/+22
2019-03-11Update tests that don't run on my platformVadim Petrochenkov-51/+3
2019-03-11Update NLL testsVadim Petrochenkov-794/+794
2019-03-11Update testsVadim Petrochenkov-6678/+6678
2019-03-11Test illustrating that the nested_impl_trait lint should only catch shallow ↵Felix S. Klock II-0/+72
cases.
2019-03-11Auto merge of #58788 - matthewjasper:compare-children, r=pnkfelixbors-0/+100
Make migrate mode work at item level granularity Migrate mode now works entirely at the item level rather than the body level, ensuring that we don't lose any errors in contained closures. Closes #58776 r? @pnkfelix
2019-03-10Fix #54822 and associated faulty testskyren-27/+32
Type checking associated constants can require trait bounds, but an empty parameter environment was provided to the trait solver. Providing an appropriate parameter environment seems to fix #54822 and also make one of the cases in src/test/ui/nll/trait-associated-constant.rs that should compile successfully do so. It also (slightly) improves the error message in src/test/ui/associated-const/associated-const-generic-obligations.rs
2019-03-11Auto merge of #58784 - oli-obk:accidental_promotion, r=eddybbors-0/+18
Don't promote function calls to nonpromotable things fixes https://github.com/rust-lang/rust/issues/58767 and fixes https://github.com/rust-lang/rust/issues/58634 r? @eddyb should we additionally check the function call return type? It might be a promotable function (or any `const fn` inside a `const fn`), but its return type might contain interior mutability.
2019-03-10Make migrate mode work at item level granularityMatthew Jasper-0/+100
2019-03-10Auto merge of #58498 - euclio:e0432-suggestions, r=estebankbors-48/+96
use structured suggestions for E0432