about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-03-16Rollup merge of #59206 - sntdevco:master, r=dtolnaykennytm-4/+4
Improved test output
2019-03-16Rollup merge of #59201 - lambda:remove-repr-simd-isize-usize-restriction, ↵kennytm-11/+34
r=alexcrichton Remove restriction on isize/usize in repr(simd) As discussed in #55078, there's no known reason for this restriction. It's unlikely that repr(simd) will be stabilized in its current form, but might as well remove some restrictions on it. This removes the branch in `is_machine` which returns false for these types. `is_machine` is only used for the repr(simd) type validation check.
2019-03-16Rollup merge of #59169 - tmandry:allow-features-flag, r=cramertjkennytm-0/+50
Add `-Z allow_features=...` flag Adds a compiler option to allow only whitelisted features. For projects on nightly that want to prevent feature-creep (and maybe, someday, move off of nightly). Not being able to enforce this has been a problem on Fuchsia and at other big companies. This doesn't support filtering edition feature flags, but someone is welcome to add that if they need it.
2019-03-16Rollup merge of #59156 - davidtwco:issue-55809, r=nikomatsakiskennytm-0/+30
[wg-async-await] Add regression test for #55809. Fixes #55809. This PR 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-16Rollup merge of #59146 - estebank:suggest-return-lt, r=varkorkennytm-0/+35
Suggest return lifetime when there's only one named lifetime Fix #29094.
2019-03-16Rollup merge of #59139 - oli-obk:unions_are_a_good_thing, r=RalfJungkennytm-0/+11
Unregress using scalar unions in constants. fixes https://github.com/rust-lang/rust/issues/59126 r? @RalfJung I also made a bunch of these invariants panic instead of report an error.
2019-03-16Rollup merge of #59118 - seanmonstar:alias-where-self-ice, r=alexregkennytm-0/+25
rustc: fix ICE when trait alias has bare Self Fixes https://github.com/rust-lang/rust/issues/59029
2019-03-16Rollup merge of #59079 - euclio:macro-semi, r=estebankkennytm-4/+60
add suggestions to invalid macro item error r? @estebank
2019-03-16Rollup merge of #59036 - dlrobertson:fix_59021, r=estebankkennytm-0/+18
Fix ICE in MIR pretty printing A `Def::Variant` should be considered as a function in mir pretty printing. Each variant has a constructor that we must print. Given the following enum definition: ```rust pub enum TestMe { X(usize), } ``` We will need to generate a constructor for the variant `X` with a signature that looks something like the following: ``` fn TestMe::X(_1: usize) -> TestMe; ``` Fixes: #59021
2019-03-16Rollup merge of #59025 - aoikonomopoulos:issue-57924, r=varkorkennytm-0/+9
Fix generic argument lookup for Self 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 r? @eddyb
2019-03-15Auto merge of #58556 - oli-obk:imperative_recursion, r=pnkfelixbors-0/+26
Optimize copying large ranges of undefmask blocks Hopefully fixes #58523
2019-03-15Remove restriction on isize/usize in repr(simd)Brian Campbell-11/+34
As discussed in #55078, there's no known reason for this restriction. It's unlikely that repr(simd) will be stabilized in its current form, but might as well remove some restrictions on it. This removes the branch in `is_machine` which returns false for these types. `is_machine` is only used for the repr(simd) type validation check.
2019-03-15rustc: print ExistentialProjection with spaces around `=`, e.g. `dyn Foo<A = ↵Eduard-Mihai Burtescu-20/+20
X>`.
2019-03-15rustc: provide DisambiguatedDefPathData in ty::print.Eduard-Mihai Burtescu-27/+27
2019-03-15rustc: slice substs in ty::print instead of passing the full ones.Eduard-Mihai Burtescu-2/+2
2019-03-15rustc: print elided regions as '_ instead of nothing, and use a separate ↵Eduard-Mihai Burtescu-4/+4
check when optional.
2019-03-15rustc: always hide defaulted generic args, even in verbose mode.Eduard-Mihai Burtescu-2/+2
2019-03-15rustc: merge PrintCx::parameterized and def_path printing.Eduard-Mihai Burtescu-2/+2
2019-03-15rustc: rename item_path to def_path (except the module in ty).Eduard-Mihai Burtescu-13/+13
2019-03-15rustc_mir: adjust the type_length_limit diagnostic to be more useful.Eduard-Mihai Burtescu-5/+11
2019-03-15rustc: pass Option<&Substs> and Namespace around in ty::item_path.Eduard-Mihai Burtescu-43/+43
2019-03-15Improved test output for estr-slicesntdevco-4/+4
2019-03-15rustc: explicitly pass the namespace to PrintCx::parameterized.Eduard-Mihai Burtescu-5/+5
2019-03-15rustc: always rely on '_ to be not printed by ty::Region itself.Eduard-Mihai Burtescu-9/+9
2019-03-15rustc: support impl's in PrintCx::parameterized.Eduard-Mihai Burtescu-16/+16
2019-03-14Add `-Z allow_features=...` flagTyler Mandry-0/+50
2019-03-14Auto merge of #59120 - alexreg:move-issue-tests-1, r=varkorbors-188/+177
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-188/+177
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-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-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