summary refs log tree commit diff
path: root/src/test/ui/issues
AgeCommit message (Collapse)AuthorLines
2019-01-11use the correct supertrait substitution in `object_ty_for_trait`Ariel Ben-Yehuda-0/+23
Fixes #57156.
2018-12-31Corrected expected test err messages.Alexander Regueiro-10/+10
2018-12-31Added test for issue #56835.Alexander Regueiro-0/+25
2018-12-31Fixed issue #56199.Alexander Regueiro-0/+53
2018-12-04Update testsOliver Scherer-14/+47
2018-12-03Rollup merge of #56366 - alexreg:stabilise-self_in_typedefs, r=Centrilkennytm-2/+12
Stabilize self_in_typedefs feature [**Tracking Issue**](https://github.com/rust-lang/rust/issues/49303) r? @centril
2018-12-02Auto merge of #56110 - varkor:inhabitedness-union-enum, r=cramertjbors-1/+4
Consider references and unions potentially inhabited during privacy-respecting inhabitedness checks It isn't settled exactly how references to uninhabited types and unions of uninhabited types should act, but we should be more conservative here, as it's likely it will be permitted to soundly have values of such types. This will also be more important in light of the changes at https://github.com/rust-lang/rust/pull/54125. cc @RalfJung
2018-11-30Updated ui tests.Alexander Regueiro-2/+12
2018-11-30Removed feature gate.Alexander Regueiro-2/+0
2018-11-30Changed test for issue 56202 to compile-pass.Alexander Regueiro-7/+4
2018-11-30Fix ICE with feature self_struct_ctorEsteban Küber-0/+22
2018-11-29Fix broken testsvarkor-1/+4
2018-11-29Rollup merge of #56330 - estebank:cleanup-span, r=zackmdavisGuillaume Gomez-4/+4
Clean up span in non-trailing `..` suggestion
2018-11-29Rollup merge of #56114 - varkor:nonexhaustive-backticks, r=nikomatsakisGuillaume Gomez-4/+4
Enclose type in backticks for "non-exhaustive patterns" error This makes the error style consistent with the convention in error messages.
2018-11-28Clean up span in non-trailing `..` suggestionEsteban Küber-4/+4
2018-11-27Auto merge of #55402 - estebank:macro-eof-2, r=nikomatsakisbors-2/+2
Point at end of macro arm when encountering EOF Fix #52866.
2018-11-25Rollup merge of #56211 - petrochenkov:fwd, r=petrochenkovPietro Albini-3/+20
[master] Forward-ports from beta https://github.com/rust-lang/rust/pull/56206 + one commit from https://github.com/rust-lang/rust/pull/55884 that was accidentally missing in https://github.com/rust-lang/rust/pull/56042 due to an off-by-one mistake in commit ranges r? @ghost
2018-11-25Rollup merge of #56204 - estebank:suggest-variant, r=zackmdavisPietro Albini-6/+5
Suggest correct enum variant on typo Fix #37992.
2018-11-25Rollup merge of #56045 - qnighy:additional-sizedness, r=cramertjPietro Albini-41/+9
Check arg/ret sizedness at ExprKind::Path This PR solves three problems: - #50940: ICE on casting unsized tuple struct constructors - Unsized tuple struct constructors were callable in presence of `unsized_locals`. - https://github.com/rust-lang/rust/issues/48055#issuecomment-437178966: we cannot relax `Sized` bounds on stable functions because of fn ptr casting These are caused by lack of `Sized`ness checks for arguments/retvals at **reference sites of `FnDef` items** (not call sites of the functions). Therefore we can basically add more `Sized` obligations on typeck. However, adding `Sized` obligations arbitrarily breaks type inference; to prevent that I added a new method `require_type_is_sized_deferred` which doesn't interfere usual type inference.
2018-11-25resolve: Fix bad span arithmetics in import conflict diagnosticsVadim Petrochenkov-3/+20
2018-11-25Auto merge of #55959 - matthewjasper:remove-end-region, r=nikomatsakisbors-6/+6
Cleanup from lexical MIR borrowck removal Lexical MIR borrowck was removed months ago now, and `EndRegion`s are no longer used for MIRI verification. * Remove `rustc::mir::StatementKind::EndRegion` and the `-Zemit_end_regions` flag * Use `RegionVid` instead of `Region` in BorrowSet * Rewrite drop generation to create fewer goto terminators. r? @nikomatsakis
2018-11-24Suggest correct enum variant on typoEsteban Küber-6/+5
2018-11-23Reword incorrect macro invocation primary labelEsteban Küber-2/+2
2018-11-23Auto merge of #55808 - estebank:type-arguments, r=petrochenkovbors-7/+13
Suggest correct syntax when writing type arg instead of assoc type - When confusing an associated type with a type argument, suggest the appropriate syntax. Given `Iterator<isize>`, suggest `Iterator<Item = isize>`. - When encountering multiple missing associated types, emit only one diagnostic. - Point at associated type def span for context. - Point at each extra type argument. Follow up to #48288, fix #20977.
2018-11-22Do not point at associated types from other cratesEsteban Küber-25/+0
This is a somewhat arbitrary restriction in order to be consistent in the output of the tests regardless of target platform.
2018-11-22Reword and fix testEsteban Küber-7/+7
2018-11-22Point at the associated type's def spanEsteban Küber-0/+31
2018-11-21add compile-pass annotationNiko Matsakis-0/+2
2018-11-21add regression testNiko Matsakis-0/+13
2018-11-21Enclose type in backticks for "reached the recursion limit while ↵varkor-2/+2
auto-dereferencing" error
2018-11-21Check arg/ret sizedness at ExprKind::Path.Masaki Hara-41/+9
2018-11-20Enclose type in backticks for "non-exhaustive patterns" errorvarkor-2/+2
This makes the error style consistent with the convention in error messages.
2018-11-19Auto merge of #56051 - pietroalbini:rollup, r=pietroalbinibors-21/+71
Rollup of 25 pull requests Successful merges: - #55562 (Add powerpc- and powerpc64-unknown-linux-musl targets) - #55564 (test/linkage-visibility: Ignore on musl targets) - #55827 (A few tweaks to iterations/collecting) - #55834 (Forward the ABI of the non-zero sized fields of an union if they have the same ABI) - #55857 (remove unused dependency) - #55862 (in which the E0618 "expected function" diagnostic gets a makeover) - #55867 (do not panic just because cargo failed) - #55894 (miri enum discriminant handling: Fix treatment of pointers, better error when it is undef) - #55916 (Make miri value visitor useful for mutation) - #55919 (core/tests/num: Simplify `test_int_from_str_overflow()` test code) - #55923 (reword #[test] attribute error on fn items) - #55949 (ty: return impl Iterator from Predicate::walk_tys) - #55952 (Update to Clang 7 on CI.) - #55953 (#53488 Refactoring UpvarId) - #55962 (rustdoc: properly calculate spans for intra-doc link resolution errors) - #55963 (Stress test for MPSC) - #55968 (Clean up some non-mod-rs stuff.) - #55970 (Miri backtrace improvements) - #56007 (CTFE: dynamically make sure we do not call non-const-fn) - #56011 (Replace data.clone() by Arc::clone(&data) in mutex doc.) - #56012 (avoid shared ref in UnsafeCell::get) - #56016 (Add VecDeque::resize_with) - #56027 (docs: Add missing backtick in object_safety.rs docs) - #56043 (remove "approx env bounds" if we already know from trait) - #56059 (Increase `Duration` approximate equal threshold to 1us)
2018-11-19Rollup merge of #56007 - RalfJung:non-const-call, r=oli-obkPietro Albini-4/+37
CTFE: dynamically make sure we do not call non-const-fn I'd love to have a test case for this, but I don't know how. I am also really surprised by this test case that changed behavior: Why did it even start execution if it already determined that it shouldn't?!? r? @oli-obk
2018-11-18Rollup merge of #55894 - RalfJung:validation-enums, r=oli-obkPietro Albini-1/+1
miri enum discriminant handling: Fix treatment of pointers, better error when it is undef r? @oli-obk
2018-11-18Rollup merge of #55862 - zackmdavis:but_will_they_come_when_you_call_them, ↵Pietro Albini-16/+33
r=estebank in which the E0618 "expected function" diagnostic gets a makeover A woman of wisdom once told me, "Better late than never." (Can't reopen the previously-closed pull request from six months ago [due to GitHub limitations](https://github.com/rust-lang/rust/pull/51098#issuecomment-437647157).) Now the main span focuses on the erroneous not-a-function callee, while showing the entire call expression is relegated to a secondary span. In the case where the erroneous callee is itself a call, we point out the definition, and, if the call expression spans multiple lines, tentatively suggest a semicolon (because we suspect that the "outer" call is actually supposed to be a tuple). ![not_a_fn_1](https://user-images.githubusercontent.com/1076988/48309935-96755000-e538-11e8-9390-02a048abb0c2.png) ![not_a_fn_2](https://user-images.githubusercontent.com/1076988/48309936-98d7aa00-e538-11e8-8b9b-257bc77d6261.png) The new `bug!` assertion is, in fact, safe (`confirm_builtin_call` is only called by `check_call`, which is only called with a first arg of kind `ExprKind::Call` in `check_expr_kind`). Resolves #51055. r? @estebank
2018-11-18Remove mir::StatementKind::EndRegionMatthew Jasper-6/+6
Since lexical MIR borrow check is gone, and validation no longer uses these, they can be removed.
2018-11-18resolve: Avoid sentence breaks in diagnosticsVadim Petrochenkov-17/+17
2018-11-18resolve: Tweak some articles in ambiguity diagnosticsVadim Petrochenkov-7/+7
2018-11-16adjust remaining testsRalf Jung-4/+37
2018-11-15fix other affected testsRalf Jung-1/+1
2018-11-14add test for issue #54348Andy Russell-0/+21
2018-11-14add test for issue #55587Andy Russell-0/+14
2018-11-10in which the E0618 "expected function" diagnostic gets a makeoverZack M. Davis-16/+33
Now the main span focuses on the erroneous not-a-function callee, while showing the entire call expression is relegated to a secondary span. In the case where the erroneous callee is itself a call, we point out the definition, and, if the call expression spans multiple lines, tentatively suggest a semicolon (because we suspect that the "outer" call is actually supposed to be a tuple). The new `bug!` assertion is, in fact, safe (`confirm_builtin_call` is only called by `check_call`, which is only called with a first arg of kind `ExprKind::Call` in `check_expr_kind`). Resolves #51055.
2018-11-11Rollup merge of #55800 - estebank:abolish-ice-for-lifetime, r=oli-obkPietro Albini-0/+72
Fix ICE in `return_type_impl_trait` Fix #55796.
2018-11-11Rollup merge of #55687 - alexreg:fix-24010, r=scalexmPietro Albini-0/+27
Take supertraits into account when calculating associated types Fixes #24010 and #23856. Applies to trait aliases too. As a by-product, this PR also makes repeated bindings of the same associated item in the same definition a hard error. This was previously a warning with a note about it becoming a hard error in the future. See #50589 for more info. I talked about this with @nikomatsakis recently, but only very superficially, so this shouldn't stop anyone from assigning it to themself to review and r+. N.B. The "WIP" commits represent imperfect attempts to solve the problem just for trait objects, but I've left them in for reference for the sake of whomever is reviewing this. CC @carllerche @theemathas @durka @mbrubeck
2018-11-10Auto merge of #55717 - oli-obk:rustdoc_overflow, r=pnkfelixbors-1/+2
Bubble up an overflow error so that rustdoc can ignore it fixes #54524 Idk how to write a test for this, other than trying to minimize the entire diesel crate. If desirable I will do that. Note that there are many other such overflow errors hiding out there. Should we try to proactively eliminate them or do we just whack-a-mole them? cc @GuillaumeGomez r? @nikomatsakis
2018-11-10Auto merge of #55626 - nikic:update-emscripten, r=alexcrichtonbors-1/+1
Update emscripten This updates emscripten to 1.38.15, which is based on LLVM 6.0.1 and would allow us to drop code for handling LLVM 4. The main issue I ran into is that exporting statics through `EXPORTED_FUNCTIONS` no longer works. As far as I understand exporting non-functions doesn't really make sense under emscripten anyway, so I've modified the symbol export code to not even try. Closes #52323.
2018-11-08Sidestep ICE in `type_of_def_id()` when called from `return_type_impl_trait`Esteban Küber-0/+72
2018-11-08Auto merge of #55532 - pnkfelix:rustc_error-survey, r=nikomatsakisbors-480/+142
#[rustc_error] survey Fix #55505