about summary refs log tree commit diff
path: root/src/test/ui/issues
AgeCommit message (Collapse)AuthorLines
2019-09-22On obligation errors point at the unfulfilled binding when possibleEsteban Küber-55/+55
2019-09-22Point at definition when misusing ADTEsteban Küber-2/+14
When given `struct Foo(usize)` and using it as `Foo {}` or `Foo`, point at `Foo`'s definition in the error.
2019-09-22Auto merge of #64669 - estebank:unreachable, r=Centrilbors-12/+6
Use span label instead of note in unreachable lint Fix #64636.
2019-09-21review commentsEsteban Küber-1/+1
2019-09-21Propagate `types.err` in locals further to avoid spurious knock-down errorsEsteban Küber-0/+13
2019-09-21Do not trigger unreachable lint in async body and Use span labelsEsteban Küber-12/+6
2019-09-21Rollup merge of #64660 - guanqun:unify-errors-for-tuple-struct, r=estebankMazdak Farrokhzad-2/+33
unify errors for tuple/struct variants fix #63983
2019-09-21Rollup merge of #63907 - estebank:assoc-type-mismatch, r=oli-obkMazdak Farrokhzad-0/+13
Add explanation to type mismatch involving type params and assoc types CC #63711
2019-09-21unify errors for tuple/struct variantsGuanqun Lu-2/+33
fix #63983
2019-09-21Rollup merge of #64642 - cuviper:move-for-loop-snippet, r=varkorMazdak Farrokhzad-0/+24
Fix the span used to suggest avoiding for-loop moves It was using the snippet from the "use" span, which often renders the same, but with closures that snippet is on the start of the closure where the value is captured. We should be using the snippet from the span where it was moved into the `for` loop, which is `move_span`. Fixes #64559.
2019-09-21Rollup merge of #64641 - cuviper:extern-rust-ctypes, r=estebankMazdak Farrokhzad-0/+12
Exempt extern "Rust" from improper_ctypes It should be fine for Rust ABIs to involve any Rust type. Fixes #64593.
2019-09-21Rollup merge of #64347 - GuillaumeGomez:E0312, r=oli-obkMazdak Farrokhzad-0/+2
Add long error explanation for E0312 Part of #61137.
2019-09-20Fix the span used to suggest avoiding for-loop movesJosh Stone-0/+24
It was using the snippet from the "use" span, which often renders the same, but with closures that snippet is on the start of the closure where the value is captured. We should be using the snippet from the span where it was moved into the `for` loop, which is `move_span`.
2019-09-20Exempt extern "Rust" from improper_ctypesJosh Stone-0/+12
It should be fine for Rust ABIs to involve any Rust type.
2019-09-20Auto merge of #64498 - estebank:point-at-arg, r=Centrilbors-27/+57
When possible point at argument causing item obligation failure Fix https://github.com/rust-lang/rust/issues/41781, fix https://github.com/rust-lang/rust/issues/42855, fix https://github.com/rust-lang/rust/issues/46658, fix https://github.com/rust-lang/rust/issues/48099, fix https://github.com/rust-lang/rust/issues/63143.
2019-09-19When possible point at argument causing item obligation failureEsteban Küber-27/+57
2019-09-19Rollup merge of #64592 - Aaron1011:feature/unreachable-span, r=CentrilMazdak Farrokhzad-0/+11
Point at original span when emitting unreachable lint Fixes #64590 When we emit an 'unreachable' lint, we now add a note pointing at the expression that actually causes the code to be unreachable (e.g. `return`, `break`, `panic`). This is especially useful when macros are involved, since a diverging expression might be hidden inside of a macro invocation.
2019-09-18Add explanation to type mismatch involving type params and assoc typesEsteban Küber-0/+13
2019-09-18Point at original span when emitting unreachable lintAaron Hill-0/+11
Fixes #64590 When we emit an 'unreachable' lint, we now add a note pointing at the expression that actually causes the code to be unreachable (e.g. `return`, `break`, `panic`). This is especially useful when macros are involved, since a diverging expression might be hidden inside of a macro invocation.
2019-09-19Fix a minor grammar nit, update UI testsJames Munns-1/+1
2019-09-17Get rid of special const intrinsic query in favour of `const_eval`Oliver Scherer-39/+0
2019-09-16Tweak unsatisfied HRTB errorsEsteban Küber-24/+52
2019-09-15resolve: Remove `!` from "cannot find" diagnostics for macrosVadim Petrochenkov-12/+12
2019-09-15resolve: Tweak "cannot find" wording for attributesVadim Petrochenkov-6/+6
2019-09-15Rollup merge of #64471 - Mark-Simulacrum:warn-depr-attr, r=CentrilMazdak Farrokhzad-3/+0
Warn on no_start, crate_id attribute use These attributes are now deprecated; they don't have any use anymore. `no_start` stopped being applicable in 3ee916e50bd86768cb2a9141f9b2c52d2601b412 as part of #18967. Ideally we would've removed it pre-1.0, but since that didn't happen let's at least mark it deprecated. `crate_id` was renamed to `crate_name` in 50ee1ec1b4f107122d8037ac7b0b312afa6eb0ac as part of #15319. Ideally we would've followed that up with a removal of crate_id itself as well, but that didn't happen; this PR finally marks it as deprecated at least. Fixes https://github.com/rust-lang/rust/issues/43142 and resolves https://github.com/rust-lang/rust/issues/43144.
2019-09-15Rollup merge of #64463 - petrochenkov:expectattr, r=CentrilMazdak Farrokhzad-4/+4
resolve: Tweak some expected/found wording
2019-09-14Warn on no_start, crate_id attribute useMark Rousskov-3/+0
These attributes are now deprecated; they don't have any use anymore.
2019-09-14Rollup merge of #64290 - Mark-Simulacrum:span-no-main, r=estebankMazdak Farrokhzad-15/+14
Provide a span if main function is not present in crate Unfortunately, the diagnostic machinery does not cope well with an empty span which can happen if the crate is empty, in which case we merely set a spanless note. Tests are already updated for this change, so a dedicated test is not added. Resolves #36561.
2019-09-14resolve: Tweak some expected/found wordingVadim Petrochenkov-4/+4
2019-09-14Provide a span if main function is not present in crateMark Rousskov-15/+14
Unfortunately, the diagnotic machinery does not cope well with an empty span which can happen if the crate is empty, in which case we merely set a spanless note.
2019-09-14Rollup merge of #64439 - 12101111:fix-owned-box, r=CentrilMazdak Farrokhzad-0/+26
fix #64430, confusing `owned_box` error message in no_std build Fixes #64430
2019-09-14add trailing newline12101111-1/+1
2019-09-14add ui test for #6443012101111-0/+26
2019-09-12Auto merge of #64359 - varkor:opaque-ty-in-extern, r=estebankbors-14/+20
Forbid opaque types in `extern "C"` blocks Fixes #64338.
2019-09-12update ui testsGuillaume Gomez-0/+2
2019-09-11Auto merge of #64271 - Centril:non-exhaustive-peel-refs, r=estebankbors-6/+8
check_match: refactor + improve non-exhaustive diagnostics for default binding modes Refactor `check_match` a bit with more code-reuse and improve the diagnostics for a non-exhaustive pattern match by peeling off any references from the scrutinee type so that the "defined here" label is added in more cases. For example: ```rust error[E0004]: non-exhaustive patterns: `&mut &B` not covered --> foo.rs:4:11 | 1 | enum E { A, B } | --------------- | | | | | not covered | `E` defined here ... 4 | match x { | ^ pattern `&mut &B` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms ``` Moreover, wrt. "defined here", we give irrefutable pattern matching (i.e. in `let`, `for`, and `fn` parameters) a more consistent treatment in line with `match`. r? @estebank
2019-09-10Refactor "not FFI-safe" diagnosticvarkor-14/+20
2019-09-09Auto merge of #64313 - Centril:rollup-7w8b67g, r=Centrilbors-27/+47
Rollup of 5 pull requests Successful merges: - #63468 (Resolve attributes in several places) - #64121 (Override `StepBy::{try_fold, try_rfold}`) - #64278 (check git in bootstrap.py) - #64306 (Fix typo in config.toml.example) - #64312 (Unify escape usage) Failed merges: r? @ghost
2019-09-09Rollup merge of #63468 - c410-f3r:attrs, r=petrochenkovMazdak Farrokhzad-27/+47
Resolve attributes in several places Resolve attributes for Arm, Field, FieldPat, GenericParam, Param, StructField and Variant. This PR is based on @petrochenkov work located at https://github.com/petrochenkov/rust/commit/83fdb8d598c1a871d40b21faed64ee698b74f814.
2019-09-09check_match: unify check_irrefutable & check_exhaustive more.Mazdak Farrokhzad-6/+8
2019-09-09Auto merge of #63118 - Centril:stabilize-bind-by-move, r=matthewjasperbors-5/+1
Stabilize `bind_by_move_pattern_guards` in Rust 1.39.0 Closes https://github.com/rust-lang/rust/issues/15287. After stabilizing `#![feature(bind_by_move_pattern_guards)]`, you can now use bind-by-move bindings in patterns and take references to those bindings in `if` guards of `match` expressions. For example, the following now becomes legal: ```rust fn main() { let array: Box<[u8; 4]> = Box::new([1, 2, 3, 4]); match array { nums // ---- `nums` is bound by move. if nums.iter().sum::<u8>() == 10 // ^------ `.iter()` implicitly takes a reference to `nums`. => { drop(nums); // --------- Legal as `nums` was bound by move and so we have ownership. } _ => unreachable!(), } } ``` r? @matthewjasper
2019-09-09Resolve attributes in several placesCaio-27/+47
Arm, Field, FieldPat, GenericParam, Param, StructField and Variant
2019-09-09Auto merge of #64237 - estebank:tweak-method-not-found, r=Centrilbors-24/+24
Give method not found a primary span label
2019-09-08Give method not found a primary span labelEsteban Küber-24/+24
2019-09-09Auto merge of #64108 - estebank:issue-36836, r=Centrilbors-0/+24
Do not complain about unconstrained params when Self is Ty Error Fix #36836.
2019-09-08Update test stderr with results of enabling unused lintsMark Rousskov-7/+9
2019-09-08Update tests wrt. bind_by_by_move_pattern_guards stabilization.Mazdak Farrokhzad-5/+1
2019-09-07Rollup merge of #64233 - varkor:correct-pluralisation, r=estebankMazdak Farrokhzad-5/+5
Correct pluralisation of various diagnostic messages
2019-09-06Update ui testsvarkor-5/+5
2019-09-06Fixed grammar/style in error messages and reblessed tests.Alexander Regueiro-9/+9