about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-03-13Merge remote-tracking branch 'upstream/master' into asm-compile-testsDenys Zariaiev-8166/+11042
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-13Fix generic argument lookup for SelfAngelos Oikonomopoulos-0/+9
Rewrite the SelfCtor early and use the replacement Def when calculating the path_segs. Note that this also changes which def is seen by the code that computes user_self_ty and is_alias_variant_ctor; I don't see a immediate issue with that, but I'm not 100% clear on the implications. Fixes #57924
2019-03-13Add test for #55809.David Wood-0/+30
This commit adds a regression test for #55809 which checks that a overflow does not occur when evaluating a requirement for async functions and `&mut` arguments in some specific circumstances.
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-12Auto merge of #58743 - varkor:bulk-needstest-1, r=alexcrichtonbors-0/+305
Add tests for several E-needstest issues This PR adds a number of tests for various `E-needstest` errors. These tend to have been left open for a long time and seem unlikely to be closed otherwise. Closes https://github.com/rust-lang/rust/issues/10876. Closes https://github.com/rust-lang/rust/issues/26448. Closes https://github.com/rust-lang/rust/issues/26577. Closes https://github.com/rust-lang/rust/issues/26619. Closes https://github.com/rust-lang/rust/issues/27054. Closes https://github.com/rust-lang/rust/issues/44127. Closes https://github.com/rust-lang/rust/issues/44255. Closes https://github.com/rust-lang/rust/issues/55731. Closes https://github.com/rust-lang/rust/issues/57781.
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-12Move comment describing test caseDouglas Creager-9/+10
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-12Auto merge of #58330 - GuillaumeGomez:rustdoc-js-non-std, ↵bors-10/+19
r=QuietMisdreavus,Mark-Simulacrum Add rustdoc JS non-std tests @QuietMisdreavus: You asked it, here it is! r? @QuietMisdreavus
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-11Add run-make-fulldeps test caseDouglas Creager-0/+82
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-6703/+6703
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