about summary refs log tree commit diff
path: root/src/test/ui/coercion
AgeCommit message (Collapse)AuthorLines
2019-04-22update tests for migrate mode by defaultMatthew Jasper-150/+10
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-4/+4
2019-03-11Update testsVadim Petrochenkov-22/+22
2019-01-05Auto merge of #57230 - estebank:return-mismatch, r=varkorbors-14/+14
Modify mismatched type error for functions with no return Fix #50009. ``` error[E0308]: mismatched types --> $DIR/coercion-missing-tail-expected-type.rs:3:24 | LL | fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types | -------- ^^^ expected i32, found () | | | this function's body doesn't return LL | x + 1; | - help: consider removing this semicolon | = note: expected type `i32` found type `()` ``` instead of ``` error[E0308]: mismatched types --> $DIR/coercion-missing-tail-expected-type.rs:3:28 | LL | fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types | ____________________________^ LL | | x + 1; | | - help: consider removing this semicolon LL | | } | |_^ expected i32, found () | = note: expected type `i32` found type `()` ```
2018-12-31Improve type mismatch error messagesYuning Zhang-10/+10
Replace "integral variable" with "integer" and replace "floating-point variable" with "floating-point number" to make the message less confusing.
2018-12-30Tweak E0308 error for clarityEsteban Küber-2/+2
2018-12-30Point at function name spanEsteban Küber-2/+6
2018-12-30Point at the return type span on type mismatch due to missing returnEsteban Küber-14/+10
Do not point at the entire block span on fn return type mismatches caused by missing return.
2018-12-25Remove licensesMark Rousskov-129/+49
2018-12-17fix review comments, round 2Ariel Ben-Yehuda-1/+1
2018-12-17address review commentsAriel Ben-Yehuda-7/+11
2018-12-17trigger unsized coercions keyed on Sized boundsAriel Ben-Yehuda-0/+58
This PR causes unsized coercions to not be disabled by `$0: Unsize<dyn Object>` coercion obligations when we have an `$0: Sized` obligation somewhere. Note that `X: Unsize<dyn Object>` obligations can't fail *as obligations* if `X: Sized` holds, so this still maintains some version of monotonicity (I think that an unsized coercion can't be converted to no coercion by unifying type variables). Fixes #49593 (unblocking never_type).
2018-10-03Clearer later use messages for callsMatthew Jasper-23/+19
Give a special message when the later use is from a call. Use the span of the callee instead of the whole expression. For conflicting borrow messages say that the later use is of the first borrow.
2018-08-14Moved tests back to compile-test if they don't work on ui.David Wood-23/+0
2018-08-14Merged migrated compile-fail tests and ui tests. Fixes #46841.David Wood-0/+769