about summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2019-01-30Add suggestions to deprecation lintsOliver Scherer-0/+34
2019-01-30Add MOVBE featureJethro Beekman-1/+2
2019-01-30Allow #[repr(align(x))] on enums (#57996)Niklas Fiekas-14/+28
2019-01-30Suggest to add each of `|` and `()` when unexpected `,` is found in patternKnium_-6/+54
2019-01-29Fix testsJohn Kåre Alsaker-10/+3
2019-01-29Auto merge of #57901 - lqd:issue_57362, r=nikomatsakisbors-45/+115
Add information to higher-ranked lifetimes conflicts error messages Make these errors go through the new "placeholder error" code path, to have self tys displayed and make them hopefully less confusing. Should fix #57362. r? @nikomatsakis — so we can iterate on the specific wording you wanted.
2019-01-29add tests to a few edge cases in method lookupAriel Ben-Yehuda-0/+290
These aren't fixed by this PR, but were broken in a few older attempts at it. Make sure they don't regress.
2019-01-28Refer to synthetically named lifetimes as "some specific lifetime" rather ↵Rémy Rakic-19/+19
than "the specific lifetime"
2019-01-28Rollup merge of #57904 - euclio:attribute-typos, r=davidtwcoMazdak Farrokhzad-3/+43
add typo suggestion to unknown attribute error Provides a suggestion using Levenshtein distance to suggest built-in attributes and attribute macros. Fixes #49270.
2019-01-28Auto merge of #55704 - Nemo157:pinned-generators, r=Zoxcbors-74/+108
Use pinning for generators to make trait safe I'm unsure whether there needs to be any changes to the actual generator transform. Tests are passing so the fact that `Pin<&mut T>` is fundamentally the same as `&mut T` seems to allow it to still work, but maybe there's something subtle here that could go wrong. This is specified in [RFC 2349 § Immovable generators](https://github.com/rust-lang/rfcs/blob/master/text/2349-pin.md#immovable-generators) (although, since that RFC it has become safe to create an immovable generator, and instead it's unsafe to resume any generator; with these changes both are now safe and instead the unsafety is moved to creating a `Pin<&mut [static generator]>` which there are safe APIs for). CC #43122
2019-01-28Unused variable suggestions on all patterns.David Wood-25/+129
This commit extends existing suggestions to prefix unused variable bindings in match arms with an underscore so that it applies to all patterns in a match arm.
2019-01-28Auto merge of #57910 - Mark-Simulacrum:delete-test, r=petrochenkovbors-4/+2
Delete long-ignored and useless test cc @pnkfelix (https://github.com/rust-lang/rust/issues/13745#issuecomment-457599109) r? @petrochenkov as you re-enabled this test in 21d67c45a3d032b3f0d421e6f882f11ea43d1f9c, https://github.com/rust-lang/rust/pull/55236
2019-01-27add typo suggestion to unknown attribute errorAndy Russell-3/+43
2019-01-27Temporary workaround for travis diagnostic differenceWim Looman-4/+6
2019-01-27Mark static generators as !UnpinWim Looman-0/+28
2019-01-27Change generator trait to use pinningWim Looman-74/+78
2019-01-27Auto merge of #57765 - Mark-Simulacrum:bootstrap-bump, r=alexcrichtonbors-3/+3
Bump bootstrap compiler to 1.33 beta r? @alexcrichton or @pietroalbini cc @rust-lang/release
2019-01-27Update comment in test which has changed its purposeMark Rousskov-4/+2
2019-01-27When mentioning lifetimes, put either the trait ref or the self type closer ↵Rémy Rakic-18/+18
to the lifetimes When mentioning lifetimes, only invert wording between the expected trait and the self type when the self type has the vid. This way, the lifetimes always stay close to the self type or trait ref that actually contains them.
2019-01-27Fix issue-57362-1.rs attributesRémy Rakic-0/+0
2019-01-27identify when implemented for "some specific lifetime"Niko Matsakis-12/+14
2019-01-27break apart testsNiko Matsakis-17/+24
2019-01-27Test new placeholder error messages in previously untested combinationsRemy Rakic-0/+61
2019-01-27Update test expectations for new placeholder error messagesRemy Rakic-44/+44
2019-01-27Update two E308 tests to the new placeholder errorlqd-2/+2
2019-01-26Replace deprecated ATOMIC_INIT constsMark Rousskov-3/+3
2019-01-26Auto merge of #57918 - Centril:rollup, r=Centrilbors-20/+99
Rollup of 7 pull requests Successful merges: - #57407 (Stabilize extern_crate_self) - #57703 (Make MutexGuard's Debug implementation more useful.) - #57764 (Fix some minor warnings) - #57825 (un-deprecate mem::zeroed) - #57827 (Ignore aarch64 in simd-intrinsic-generic-reduction) - #57908 (resolve: Fix span arithmetics in the import conflict error) - #57913 (Change crate-visibility-modifier issue number in The Unstable Book) Failed merges: r? @ghost
2019-01-26Rollup merge of #57908 - petrochenkov:errepice, r=estebankMazdak Farrokhzad-0/+53
resolve: Fix span arithmetics in the import conflict error https://github.com/rust-lang/rust/pull/56937 rebased and fixed Fixes https://github.com/rust-lang/rust/issues/56411 Fixes https://github.com/rust-lang/rust/issues/57071 Fixes https://github.com/rust-lang/rust/issues/57787 r? @estebank
2019-01-26Rollup merge of #57407 - mehcode:stabilize-extern-crate-self, r=CentrilMazdak Farrokhzad-20/+46
Stabilize extern_crate_self Fixes #56409
2019-01-26Auto merge of #57852 - davidtwco:issue-57819, r=estebankbors-0/+138
Suggest removing leading left angle brackets. Fixes #57819. This PR adds errors and accompanying suggestions as below: ``` bar::<<<<<T as Foo>::Output>(); ^^^ help: remove extra angle brackets ``` r? @estebank
2019-01-26Auto merge of #55641 - nagisa:optimize-attr, r=pnkfelixbors-0/+68
Implement optimize(size) and optimize(speed) attributes This PR implements both `optimize(size)` and `optimize(speed)` attributes. While the functionality itself works fine now, this PR is not yet complete: the code might be messy in places and, most importantly, the compiletest must be improved with functionality to run tests with custom optimization levels. Otherwise the new attribute cannot be tested properly. Oh, and not all of the RFC is implemented – attribute propagation is not implemented for example. # TODO * [x] Improve compiletest so that tests can be written; * [x] Assign a proper error number (E9999 currently, no idea how to allocate a number properly); * [ ] Perhaps reduce the duplication in LLVM attribute assignment code…
2019-01-25Auto merge of #57898 - Centril:rollup, r=Centrilbors-2/+519
Rollup of 5 pull requests Successful merges: - #56233 (Miri and miri-related code contains repetitions of `(n << amt) >> amt`) - #57645 (distinguish "no data" from "heterogeneous" in ABI) - #57734 (Fix evaluating trivial drop glue in constants) - #57886 (Add suggestion for moving type declaration before associated type bindings in generic arguments.) - #57890 (Fix wording in diagnostics page) Failed merges: r? @ghost
2019-01-26Address review comments and cleanup codeVadim Petrochenkov-14/+14
2019-01-25#56411 do not suggest a fix for a import conflict in a macroFrançois Mockers-0/+53
2019-01-25Resolve breakageSimonas Kazlauskas-18/+18
2019-01-25Rollup merge of #57886 - davidtwco:issue-57385, r=estebankMazdak Farrokhzad-0/+196
Add suggestion for moving type declaration before associated type bindings in generic arguments. Fixes #57385. r? @estebank
2019-01-25Rollup merge of #57734 - oli-obk:fixes_and_cleanups, r=pnkfelixMazdak Farrokhzad-2/+47
Fix evaluating trivial drop glue in constants ```rust struct A; impl Drop for A { fn drop(&mut self) {} } const FOO: Option<A> = None; const BAR: () = (FOO, ()).1; ``` was erroring with ``` error: any use of this value will cause an error --> src/lib.rs:9:1 | 9 | const BAR: () = (FOO, ()).1; | ^^^^^^^^^^^^^^^^^^^^^^^^^^-^ | | | calling non-const function `std::ptr::real_drop_in_place::<(std::option::Option<A>, ())> - shim(Some((std::option::Option<A>, ())))` | = note: #[deny(const_err)] on by default error: aborting due to previous error ``` before this PR. According to godbolt this last compiled successfully in 1.27
2019-01-25Rollup merge of #57645 - nikomatsakis:issue-56877-abi-aggregates, r=eddybMazdak Farrokhzad-0/+276
distinguish "no data" from "heterogeneous" in ABI Ignore zero-sized types when computing whether something is a homogeneous aggregate, except be careful of VLA. cc #56877 r? @arielb1 cc @eddyb
2019-01-25distinguish "no data" from "heterogeneous" for ABI purposesNiko Matsakis-0/+276
Also, add a testing infrastructure and tests that lets us dump layout.
2019-01-25Auto merge of #57714 - matthewjasper:wellformed-unreachable, r=pnkfelixbors-16/+570
[NLL] Clean up handling of type annotations * Renames (Canonical)?UserTypeAnnotation -> (Canonical)?UserType so that the name CanonicalUserTypeAnnotation is free. * Keep the inferred type associated to user type annotations in the MIR, so that it can be compared against the annotated type, even when the annotated expression gets removed from the MIR. (#54943) * Use the inferred type to allow infallible handling of user type projections (#57531) * Uses revisions for the tests in #56993 * Check the types of `Unevaluated` constants with no annotations (#46702) * Some drive-by cleanup Closes #46702 Closes #54943 Closes #57531 Closes #57731 cc #56993 leaving this open to track the underlying issue: we are not running tests with full NLL enabled on CI at the moment r? @nikomatsakis
2019-01-25Unit test from #57866.Felix S. Klock II-0/+26
2019-01-25Combining move lifetime and type suggestions.David Wood-5/+106
This commit combines the move lifetime and move type suggestions so that when rustfix applies them they don't conflict with each other.
2019-01-25Suggestion moving types before associated types.David Wood-0/+95
This commit extends existing suggestions to move lifetimes before types in generic arguments to also suggest moving types behind associated type bindings.
2019-01-25Add a compile-fail test for `Drop` in constants in the presence of `Option`sOliver Scherer-2/+34
2019-01-25Rollup merge of #57802 - davidtwco:issue-56943, r=estebankMazdak Farrokhzad-0/+23
Print visible name for types as well as modules. Fixes #56943 and fixes #57713. This commit extends previous work in #55007 where the name from the visible parent was used for modules. Now, we also print the name from the visible parent for types. r? @estebank
2019-01-25Rollup merge of #57294 - estebank:point-copy-less, r=nikomatsakisMazdak Farrokhzad-215/+638
When using value after move, point at span of local When trying to use a value after move, instead of using a note, point at the local declaration that has a type that doesn't implement `Copy` trait. ``` error[E0382]: use of moved value: `x` --> $DIR/issue-34721.rs:27:9 | LL | pub fn baz<T: Foo>(x: T) -> T { | - - move occurs because `x` has type `T`, which does not implement the `Copy` trait | | | consider adding a `Copy` constraint to this type argument LL | if 0 == 1 { LL | bar::bar(x.zero()) | - value moved here LL | } else { LL | x.zero() | - value moved here LL | }; LL | x.zero() | ^ value used here after move ``` Fix #34721.
2019-01-24Auto merge of #57879 - Centril:rollup, r=Centrilbors-0/+111
Rollup of 9 pull requests Successful merges: - #57380 (Fix Instant/Duration math precision & associativity on Windows) - #57606 (Get rid of the fake stack frame for reading from constants) - #57803 (Several changes to libunwind for SGX target) - #57846 (rustdoc: fix ICE from loading proc-macro stubs) - #57860 (Add os::fortanix_sgx::ffi module) - #57861 (Don't export table by default in wasm) - #57863 (Add suggestion for incorrect field syntax.) - #57867 (Fix std::future::from_generator documentation) - #57873 (Stabilize no_panic_pow) Failed merges: r? @ghost
2019-01-24Fix --compare-mode=nll testsEsteban Küber-139/+493
2019-01-24review commentsEsteban Küber-4/+1
2019-01-24Point at type argument suggesting adding `Copy` constraintEsteban Küber-1/+5