about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-01-25Rebase to the llvm-project monorepoJosh Stone-1/+4
The new git submodule src/llvm-project is a monorepo replacing src/llvm and src/tools/{clang,lld,lldb}. This also serves as a rebase for these projects to the new 8.x branch from trunk. The src/llvm-emscripten fork is unchanged for now.
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-24/+578
[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/+116
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
2019-01-24Add test for #34721Esteban Küber-0/+52
2019-01-24When using value after move, point at span of localEsteban Küber-77/+93
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.
2019-01-24Add a feature gate test for #[optimize]Simonas Kazlauskas-0/+68
2019-01-24Support revisions for codegen testsSimonas Kazlauskas-29/+51
`compile-flags: -Copt-level` will avoid adding -O. Similarly for -g and -Cdebuglevel.
2019-01-24Add an idealistic test for optimize attributeSimonas Kazlauskas-0/+49
Alas it does not currently work, because of limitations in compiletest…
2019-01-24Rollup merge of #57863 - davidtwco:issue-57684, r=estebankMazdak Farrokhzad-0/+92
Add suggestion for incorrect field syntax. Fixes #57684. This commit adds a suggestion when a `=` character is used when specifying the value of a field in a struct constructor incorrectly instead of a `:` character. r? @estebank
2019-01-24Rollup merge of #57846 - QuietMisdreavus:proc-macro-links, r=GuillaumeGomezMazdak Farrokhzad-0/+5
rustdoc: fix ICE from loading proc-macro stubs Fixes https://github.com/rust-lang/rust/issues/55399 When trying to resolve a macro, rustdoc first tries to load it from the resolver to see whether it's a Macros 2.0 macro, so it can return that Def before looking for any other kind of macro. However, this becomes a problem when you try to load proc-macros: since you can't use a proc-macro inside its own crate, this lookup also fails when attempting to link to it. However, we have a hint that this lookup will fail: Macros which are actually `ProcMacroStub`s will fail the lookup, so we can use that information to skip loading the macro. Rustdoc will then happily check `resolve.all_macros`, which will return a usable Def that we can link to.
2019-01-24Rollup merge of #57606 - oli-obk:shrink, r=RalfJungMazdak Farrokhzad-0/+19
Get rid of the fake stack frame for reading from constants r? @RalfJung fixes the ice in https://github.com/rust-lang/rust/issues/53708 but still keeps around the wrong "non-exhaustive match" error cc @varkor
2019-01-24Auto merge of #51285 - Mark-Simulacrum:remove-quote_apis, r=Manishearthbors-1242/+34
Remove quote_*! macros This deletes a considerable amount of test cases, some of which we may want to keep. I'm not entirely certain what the primary intent of many of them was; if we should keep them I can attempt to edit each case to continue compiling without the quote_*! macros involved. Fixes #46849. Fixes #12265. Fixes #12266. Fixes #26994. r? @Manishearth
2019-01-24Remove quote_*! macros and associated APIsMark Simulacrum-1242/+34
2019-01-24Auto merge of #57269 - gnzlbg:simd_bitmask, r=rkruppebors-0/+241
Add intrinsic to create an integer bitmask from a vector mask This PR adds a new simd intrinsic: `simd_bitmask(vector) -> unsigned integer` that creates an integer bitmask from a vector mask by extracting one bit of each vector lane. This is required to implement: https://github.com/rust-lang-nursery/packed_simd/issues/166 . EDIT: the reason we need an intrinsics for this is that we have to truncate the vector lanes to an `<i1 x N>` vector, and then bitcast that to an `iN` integer (while making sure that we only materialize `i8`, ... , `i64` - that is, no `i1`, `i2`, `i4`, types), and we can't do any of that in a Rust library. r? @rkruppe
2019-01-24Rollup merge of #57836 - oli-obk:existential_crisis, r=estebankMazdak Farrokhzad-0/+60
Fix some cross crate existential type ICEs fixes #53443
2019-01-24Rollup merge of #57834 - SimonSapin:type_id, r=CentrilMazdak Farrokhzad-2/+1
Stabilize Any::get_type_id and rename to type_id FCP: https://github.com/rust-lang/rust/issues/27745#issuecomment-373906749 Closes https://github.com/rust-lang/rust/issues/27745.
2019-01-24Rollup merge of #57817 - davidtwco:issue-54521, r=estebankMazdak Farrokhzad-0/+156
Add error for trailing angle brackets. Fixes #54521. This PR adds a error (and accompanying machine applicable suggestion) for trailing angle brackets on function calls with a turbofish. r? @estebank
2019-01-24Rollup merge of #57795 - estebank:did-you-mean, r=zackmdavisMazdak Farrokhzad-36/+22
Use structured suggestion in stead of notes
2019-01-24Rollup merge of #57793 - estebank:impl-trait-resolve, r=oli-obkMazdak Farrokhzad-4/+15
Explain type mismatch cause pointing to return type when it is `impl Trait` Fix #57743.
2019-01-24Rollup merge of #57779 - estebank:recover-struct-fields, r=davidtwcoMazdak Farrokhzad-34/+141
Recover from parse errors in literal struct fields and incorrect float literals Fix #52496.
2019-01-23Add suggestion for incorrect field syntax.David Wood-0/+92
This commit adds a suggestion when a `=` character is used when specifying the value of a field in a struct constructor incorrectly instead of a `:` character.
2019-01-23Remove unused feature gatesOliver Scherer-2/+0
2019-01-23Suggest removing leading left angle brackets.David Wood-0/+138
This commit adds errors and accompanying suggestions as below: ``` bar::<<<<<T as Foo>::Output>(); ^^^ help: remove extra angle brackets ```
2019-01-22Auto merge of #57835 - pnkfelix:issue-57673-remove-leaky-nested-probe, r=arielb1bors-0/+21
typeck: remove leaky nested probe during trait object method resolution addresses #57673 (but not marking with f-x because thats now afflicting beta channel). Fix #57216
2019-01-22add intra-doc link test to proc-macro testQuietMisdreavus-0/+5
2019-01-22Add regression testOliver Scherer-3/+11
2019-01-22Get rid of the fake stack frameOliver Scherer-0/+11
2019-01-22Fix some cross crate existential type ICEsOliver Scherer-0/+62
2019-01-22unit test for issue 57673.Felix S. Klock II-0/+21
2019-01-22Auto merge of #57830 - Centril:rollup, r=Centrilbors-45/+143
Rollup of 9 pull requests Successful merges: - #57537 (Small perf improvement for fmt) - #57552 (Default images) - #57604 (Make `str` indexing generic on `SliceIndex`.) - #57667 (Fix memory leak in P::filter_map) - #57677 (const_eval: Predetermine the layout of all locals when pushing a stack frame) - #57791 (Add regression test for #54582) - #57798 (Corrected spelling inconsistency) - #57809 (Add powerpc64-unknown-freebsd) - #57813 (fix validation range printing when encountering undef) Failed merges: r? @ghost
2019-01-22Stabilize Any::get_type_id and rename to type_idSimon Sapin-2/+1
FCP: https://github.com/rust-lang/rust/issues/27745#issuecomment-373906749
2019-01-22Rollup merge of #57813 - RalfJung:validation-range-printing, r=oli-obkMazdak Farrokhzad-3/+18
fix validation range printing when encountering undef
2019-01-22Rollup merge of #57798 - hellow554:master, r=davidtwcoMazdak Farrokhzad-2/+2
Corrected spelling inconsistency resolves #57773