about summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
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-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 #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-54/+0
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-54/+0
2019-01-24Auto merge of #57269 - gnzlbg:simd_bitmask, r=rkruppebors-0/+123
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 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
2019-01-22Rollup merge of #57791 - estebank:issue-54582, r=zackmdavisMazdak Farrokhzad-0/+16
Add regression test for #54582 Fix #54582.
2019-01-22Rollup merge of #57604 - alercah:str-index, r=sfacklerMazdak Farrokhzad-40/+107
Make `str` indexing generic on `SliceIndex`. Fixes #55603
2019-01-22Auto merge of #56221 - estebank:remove-dummy-checks, r=varkorbors-8/+8
Remove unnecessary dummy span checks The emitter already verifies wether a given span note or span label can be emitted to the output. If it can't, because it is a dummy span, it will be either elided for labels or emitted as an unspanned note/help when applicable.
2019-01-22Add intrinsic to create an integer bitmask from the MSB of integer vectorsgnzlbg-0/+123
2019-01-22Corrected spelling inconsistencyMarcel Hellwig-2/+2
resolves #57773
2019-01-22Auto merge of #57475 - SimonSapin:signed, r=estebankbors-5/+5
Add signed num::NonZeroI* types Multiple people have asked for them in https://github.com/rust-lang/rust/issues/49137. Given that the unsigned ones already exist, they are very easy to add and not an additional maintenance burden.
2019-01-21Accept more invalid code that is close to correct fieldsEsteban Küber-11/+3
2019-01-22Extend trailing `>` detection for paths.David Wood-0/+70
This commit extends the trailing `>` detection to also work for paths such as `Foo::<Bar>>:Baz`. This involves making the existing check take the token that is expected to follow the path being checked as a parameter. Care is taken to ensure that this only happens on the construction of a whole path segment and not a partial path segment (during recursion). Through this enhancement, it was also observed that the ordering of right shift token and greater than tokens was overfitted to the examples being tested. In practice, given a sequence of `>` characters: `>>>>>>>>>` ..then they will be split into `>>` eagerly: `>> >> >> >> >`. ..but when a `<` is prepended, then the first `>>` is split: `<T> > >> >> >> >` ..and then when another `<` is prepended, a right shift is first again: `Vec<<T>> >> >> >> >` In the previous commits, a example that had two `<<` characters was always used and therefore it was incorrectly assumed that `>>` would always be first - but when there is a single `<`, this is not the case.
2019-01-21Auto merge of #55009 - oli-obk:const_safety, r=RalfJungbors-78/+110
Make raw ptr ops unsafe in const contexts r? @RalfJung cc @Centril
2019-01-21Pluralize error messages.David Wood-6/+6
This commit pluralizes error messages when more than a single trailing `>` character is present.
2019-01-21Add error for trailing angle brackets.David Wood-0/+86
This commit adds a error (and accompanying machine applicable suggestion) for trailing angle brackets on function calls with a turbofish.
2019-01-21fix validation range printing when encountering undefRalf Jung-3/+18
2019-01-21Fix some non-determinism in help messages for E0277 errors.Simon Sapin-4/+4
The diagnostic for this error prints `the following implementations were found` followed by the first N relevant impls, sorted. This commit makes the sort happen before slicing, so that the set of impls being printed is deterministic when the input is not.
2019-01-21Declare some unconst operations as unsafe in const fnOliver Scherer-78/+110
2019-01-21Auto merge of #55045 - kleimkuhler:add-std-is_sorted, r=KodrAusbors-0/+48
Add `is_sorted` to `Iterator` and `[T]` This is an initial implementation for the first step of [RFC 2351](https://github.com/rust-lang/rfcs/blob/master/text/2351-is-sorted.md) Tracking issue: https://github.com/rust-lang/rust/issues/53485
2019-01-21Print visible name for types as well as modules.David Wood-0/+23
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.
2019-01-20Use structured suggestion in stead of notesEsteban Küber-36/+22
2019-01-20Explain type mismatch cause pointing to return type when it is `impl Trait`Esteban Küber-4/+15
2019-01-21Rollup merge of #57784 - JohnTitor:improve-error-message, r=estebankMazdak Farrokhzad-3/+3
Add span for bad doc comment Fixes #57382 r? @estebank
2019-01-21Rollup merge of #57783 - davidtwco:issue-57741, r=estebankMazdak Farrokhzad-0/+164
Add "dereference boxed value" suggestion. Contributes to #57741. This PR adds a `help: consider dereferencing the boxed value` suggestion to discriminants of match statements when the match arms have type `T` and the discriminant has type `Box<T>`. r? @estebank
2019-01-21Rollup merge of #57769 - estebank:cast-suggestion-struct-field, r=matthewjasperMazdak Farrokhzad-0/+96
Suggest correct cast for struct fields with shorthand syntax ``` error[E0308]: mismatched types --> $DIR/type-mismatch-struct-field-shorthand.rs:8:19 | LL | let _ = RGB { r, g, b }; | ^ expected f64, found f32 help: you can cast an `f32` to `f64` in a lossless way | LL | let _ = RGB { r: r.into(), g, b }; | ^^^^^^^^^^^ ``` Fix #52497.
2019-01-21Rollup merge of #57768 - estebank:type-args-sugg, r=zackmdavisMazdak Farrokhzad-58/+86
Continue parsing after parent type args and suggest using angle brackets ``` error[E0214]: parenthesized parameters may only be used with a trait --> $DIR/E0214.rs:2:15 | LL | let v: Vec(&str) = vec!["foo"]; | ^^^^^^ | | | only traits may use parentheses | help: use angle brackets instead: `<&str>` ``` r? @zackmdavis
2019-01-21Rollup merge of #56796 - KrishnaSannasi:try_from_impl_change, r=shepmasterMazdak Farrokhzad-1/+1
Change bounds on `TryFrom` blanket impl to use `Into` instead of `From` This is from this [comment](https://github.com/rust-lang/rust/issues/33417#issuecomment-447111156) I made. This will expand the impls available for `TryFrom` and `TryInto`, without losing anything in the process.
2019-01-20Add regression test for #54582Esteban Küber-0/+16