about summary refs log tree commit diff
path: root/src/test/ui/issues
AgeCommit message (Collapse)AuthorLines
2019-08-06review comment: reword test commentEsteban Küber-4/+4
2019-08-06review commentsEsteban Küber-0/+6
2019-08-06Ignore no support targetsYuki Okushi-1/+3
2019-08-06Rollup merge of #63264 - arielb1:revert-private-coherence-errors, r=estebankMazdak Farrokhzad-0/+2
Revert "Rollup merge of #62696 - chocol4te:fix_#62194, r=estebank" This reverts commit df21a6f040a7011d509769a61ac7af9502636b33 (#62696), reversing changes made to cc16d0486933e02237190366de2eb43df2215c11. That PR makes error messages worse than before, and we couldn't come up with a way of actually making them better, so revert it for now. Any idea for making this error message better is welcome! Fixes #63145. r? @estebank
2019-08-06Rollup merge of #63230 - tmandry:disallow-possibly-uninitialized, r=CentrilMazdak Farrokhzad-25/+3
Make use of possibly uninitialized data [E0381] a hard error This is one of the behaviors we no longer allow in NLL. Since it can lead to undefined behavior, I think it's definitely worth making it a hard error without waiting to turn off migration mode (#58781). Closes #60450. My ulterior motive here is making it impossible to leave variables partially initialized across a yield (see #60889, discussion at #63035), so tests are included for that. cc #54987 --- I'm not sure if bypassing the buffer is a good way of doing this. We could also make a `force_errors_buffer` or similar that gets recombined with all the errors as they are emitted. But this is simpler and seems fine to me. r? @Centril cc @cramertj @nikomatsakis @pnkfelix @RalfJung
2019-08-05fix testsEsteban Küber-24/+34
2019-08-05Make use of possibly uninitialized data a hard errorTyler Mandry-25/+3
This is one of the behaviors we no longer allow in NLL. Since it can lead to undefined behavior, I think it's definitely worth making it a hard error without waiting to turn off migration mode (#58781). Closes #60450. My ulterior motive here is making it impossible to leave variables partially initialized across a yield (see discussion at #63035), so tests are included for that.
2019-08-05Don't recommend `extern crate` syntaxKornel-7/+7
2019-08-05Add test for #43398Ilija Tovilo-0/+15
Closes #43398
2019-08-04tweak output and testsEsteban Küber-2/+2
2019-08-04Revert "Rollup merge of #62696 - chocol4te:fix_#62194, r=estebank"Ariel Ben-Yehuda-0/+2
This reverts commit df21a6f040a7011d509769a61ac7af9502636b33, reversing changes made to cc16d0486933e02237190366de2eb43df2215c11.
2019-08-04Add test for issue-37433Yuki Okushi-0/+16
2019-08-04Add test for issue-49544Yuki Okushi-0/+16
2019-08-04Add test for issue-29265Yuki Okushi-0/+19
2019-08-03Point to local place span on "type too big" errorEsteban Küber-0/+4
2019-08-03avoid mutable state and override main messageEsteban Küber-4/+4
2019-08-03Auto merge of #63059 - Centril:sound-bind-by-move, r=matthewjasperbors-3/+1
Make `#![feature(bind_by_move_pattern_guards)]` sound without `#[feature(nll)]` Implements https://github.com/rust-lang/rust/issues/15287#issuecomment-507054617 making `#![feature(bind_by_move_pattern_guards)]]` sound without also having `#![feature(nll)]`. The logic here is that if we see a `match` guard, we will refuse to downgrade NLL errors to warnings. This is in preparation for hopefully stabilizing the former feature in https://github.com/rust-lang/rust/pull/63118. As fall out from the implementation we also: Fixes https://github.com/rust-lang/rust/issues/31287 Fixes https://github.com/rust-lang/rust/issues/27282 r? @matthewjasper
2019-08-03Auto merge of #62946 - RalfJung:miri_type_dispatch_first, r=oli-obkbors-5/+3
Miri: dispatch first on the type Based on the fact that Miri now always has intptrcast available, we can change binops and casts to first check the type of the source operand and then decide based on that what to do, instead of considering the value (pointer vs bits) first.
2019-08-03Auto merge of #63180 - varkor:trait-alias-impl-trait, r=Centrilbors-7/+7
Change opaque type syntax from `existential type` to type alias `impl Trait` This implements a new feature gate `type_alias_impl_trait` (this is slightly different from the originally proposed feature name, but matches what has been used in discussion since), deprecating the old `existential_types` feature. The syntax for opaque types has been changed. In addition, the "existential" terminology has been replaced with "opaque", as per previous discussion and the RFC. This makes partial progress towards implementing https://github.com/rust-lang/rust/issues/63063. r? @Centril
2019-08-02bless all the thingsRalf Jung-5/+3
2019-08-02Nicer labels for type layout errorsEsteban Küber-2/+2
2019-08-02Always error on `SizeOverflow` during mir evaluationEsteban Küber-2/+15
2019-08-02Auto merge of #61393 - gnzlbg:update_libc, r=gnzlbgbors-3/+3
Update Cargo.lock
2019-08-02Address review commentsvarkor-1/+1
2019-08-02Replace "existential" by "opaque"varkor-1/+1
2019-08-02Update syntax in existing testsvarkor-6/+6
2019-08-01Fix test of issue 3656gnzlbg-3/+3
2019-08-01Auto merge of #63194 - pietroalbini:rollup-xgnvb1b, r=pietroalbinibors-1/+4
Rollup of 8 pull requests Successful merges: - #62644 (simplify std::io::Write::write rustdoc) - #62971 (Add keywords item into the sidebar) - #63122 (Account for `maybe_whole_expr` in range patterns) - #63158 (Add test for issue-58951) - #63170 (cleanup StringReader fields) - #63179 (update test cases for vxWorks) - #63188 (Fix typos in release notes.) - #63191 (ci: fix toolstate not pushing data for Linux) Failed merges: r? @ghost
2019-07-31issue-2214.rs: lgamma is lgamma on vxWorksBaoshan Pang-1/+4
ignore process-envs.rs and process-remove-from-env.rs as there is no 'env' on vxWorks
2019-07-31Remove derives `Encodable`/`Decodable` and unstabilize attribute `#[bench]`Vadim Petrochenkov-3/+7
2019-07-30--bless tests due to INCOMPLETE_FEATURES being a lint.Mazdak Farrokhzad-5/+7
2019-07-30Remove 'feature(nll)' from bind_by_move_pattern_guards tests.Mazdak Farrokhzad-3/+1
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-2/+1
rustbuild Remove some random unnecessary lint `allow`s
2019-07-28Rollup merge of #62550 - Centril:rest-patterns, r=petrochenkovMazdak Farrokhzad-28/+12
Implement RFC 2707 + Parser recovery for range patterns Implement https://github.com/rust-lang/rfcs/pull/2707. - Add a new basic syntactic pattern form `ast::PatKind::Rest` (parsed as `..` or `DOTDOT`) and simplify `ast::PatKind::{Slice, Tuple, TupleStruct}` as a result. - Lower `ast::PatKind::Rest` in combination with the aforementioned `PatKind` variants as well as `PatKind::Ident`. The HIR remains unchanged for now (may be advisable to make slight adjustments later). - Refactor `parser.rs` wrt. parsing sequences and lists of things in the process. - Add parser recovery for range patterns of form `X..`, `X..=`, `X...`, `..Y`, `..=Y`, and `...Y`. This should make it easy to actually support these patterns semantically later if we so desire. cc https://github.com/rust-lang/rust/issues/62254 r? @petrochenkov
2019-07-28Intersection patterns 'p1 @ p2' are not supported.Mazdak Farrokhzad-15/+0
2019-07-28--bless tests due to new subslice syntax.Mazdak Farrokhzad-2/+2
2019-07-28Use new 'p @ ..' syntax in tests.Mazdak Farrokhzad-12/+11
2019-07-28Rollup merge of #63038 - eupn:outer-attribute-diag, r=estebankMazdak Farrokhzad-2/+2
Make more informative error on outer attribute after inner Fixes #61218. ?r @estebank
2019-07-27Fix issues with git converting CRLF to CRVadim Petrochenkov-1/+3
UI tests now run on asmjs-unknown-emscripten, ignore tests with inline assembly which is not supported on emscripten targets
2019-07-27tests: Move run-pass tests with naming conflicts to uiVadim Petrochenkov-0/+172
2019-07-27tests: Move run-pass tests without naming conflicts to uiVadim Petrochenkov-0/+20870
2019-07-27Fix failing UI testsEvgenii P-2/+2
2019-07-26Auto merge of #62086 - petrochenkov:builtout, r=eddybbors-4/+6
Define built-in macros through libcore This PR defines built-in macros through libcore using a scheme similar to lang items (attribute `#[rustc_builtin_macro]`). All the macro properties (stability, visibility, etc.) are taken from the source code in libcore, with exception of the expander function transforming input tokens/AST into output tokens/AST, which is still provided by the compiler. The macros are made available to user code through the standard library prelude (`{core,std}::prelude::v1`), so they are still always in scope. As a result **built-in macros now have stable absolute addresses in the library**, like `core::prelude::v1::line!()`, this is an insta-stable change. Right now `prelude::v1` is the only publicly available absolute address for these macros, but eventually they can be moved into more appropriate locations with library team approval (e.g. `Clone` derive -> `core::clone::Clone`). Now when built-in macros have canonical definitions they can be imported or reexported without issues (https://github.com/rust-lang/rust/issues/61687). Other changes: - You can now define a derive macro with a name matching one of the built-in derives (https://github.com/rust-lang/rust/issues/52269). This was an artificial restriction that could be worked around with import renaming anyway. Known regressions: - Empty library crate with a crate-level `#![test]` attribute no longer compiles without `--test`. Previously it didn't compile *with* `--test` or with the bin crate type. Fixes https://github.com/rust-lang/rust/issues/61687 Fixes https://github.com/rust-lang/rust/issues/61804 r? @eddyb
2019-07-26Rollup merge of #63004 - JohnTitor:add-tests-for-54062, r=CentrilMazdak Farrokhzad-0/+29
Add test for issue-54062 The ICE is no longer reproduced. Closes #54062
2019-07-26Rollup merge of #62421 - JohnTitor:U007D-master, r=alexcrichtonMazdak Farrokhzad-72/+144
Introduce `as_deref` to Option This is re-submission for #59628. Renames `deref()` to `as_deref()` and adds `deref_mut()` impls and tests. CC #50264 r? @Kimundi (I picked you as you're the previous reviewer.)
2019-07-26Introduce built-in macros through libcoreVadim Petrochenkov-4/+6
2019-07-26Add test for issue-54062Yuki Okushi-0/+29
2019-07-25Rollup merge of #62921 - iluuu1994:improve-help-for-method-disambiguation, ↵Mazdak Farrokhzad-0/+2
r=estebank Add method disambiguation help for trait implementation Closes #51046 Closes #40471
2019-07-25Rollup merge of #62736 - lqd:polonius_tests3, r=matthewjasperMazdak Farrokhzad-7/+8
Polonius: fix some cases of `killed` fact generation, and most of the `ui` test suite Since basic Polonius functionality was re-enabled by @matthewjasper in #54468, some tests were still failing in the polonius compare-mode. This PR fixes all but one test in the `ui` suite by: - fixing some bugs in the fact generation code, related to the `killed` relation: Polonius would incorrectly reject some NLL-accepted code, because of these missing `killed` facts. - ignoring some tests in the polonius compare-mode: a lot of those manually test the NLL or migrate mode, and the failures were mostly artifacts of the test revisions, e.g. that `-Z polonius` requires full NLLs. Some others were also both failing with NLL and succeeding with Polonius, which we can't encode in tests at the moment. - blessing the output of some tests: whenever Polonius and NLL have basically the same errors, except for diagnostics differences, the Polonius output is blessed. Whenever we've advanced into a less experimental phase, we'll want to revisit these cases (much like we did on the NLL test suite last year) to specifically work on diagnostics. Fact generation changes: - we now kill loans on the destination place of `Call` terminators - we now kill loans on the locals destroyed by `StorageDead` - we now also handle assignments to projections: killing the loans on a either a deref-ed local, or the ones whose `borrowed_place` conflicts with the current place. One failing test remains: an overflow during fact generation, on a case of polymorphic recursion (and which I'll continue investigating later). This adds some tests for the fact generation changes, with some simple Polonius cases similar to the existing smoke tests, but also for some cases encountered in the wild (in the `rand` crate for example). A more detailed write-up is available [here](https://hackmd.io/CjYB0fs4Q9CweyeTdKWyEg?view) with an explanation for each test failure, the steps taken to resolve it (as a commit in the current PR), NLL and Polonius outputs (and diff), etc. Since they've worked on this before, and we've discussed some of these failures together: r? @matthewjasper
2019-07-24Rollup merge of #62772 - estebank:trait-bound, r=matthewjasperMazdak Farrokhzad-3/+5
Suggest trait bound on type parameter when it is unconstrained Given ``` trait Foo { fn method(&self) {} } fn call_method<T>(x: &T) { x.method() } ``` suggest constraining `T` with `Foo`. Fix #21673, fix #41030.