fix rebase

This commit is contained in:
Esteban Küber 2019-11-18 11:01:02 -08:00
parent b3517cdee7
commit 468722b33c
3 changed files with 4 additions and 39 deletions

View File

@ -4,10 +4,8 @@ error[E0317]: if may be missing an else clause
LL | / if true {
LL | | return 0;
LL | | }
| |_____^ expected (), found i32
| |_____^ expected `()`, found `i32`
|
= note: expected type `()`
found type `i32`
= note: `if` expressions without `else` evaluate to `()`
= help: consider adding an `else` block that evaluates to the expected type

View File

@ -33,10 +33,7 @@ error[E0308]: mismatched types
LL | extern fn bar() {
| - possibly return type missing here?
LL | 0
| ^ expected (), found integer
|
= note: expected type `()`
found type `{integer}`
| ^ expected `()`, found integer
error[E0308]: mismatched types
--> $DIR/span-preservation.rs:44:5
@ -52,10 +49,7 @@ error[E0308]: mismatched types
LL | extern "Rust" fn rust_abi() {
| - possibly return type missing here?
LL | 0
| ^ expected (), found integer
|
= note: expected type `()`
found type `{integer}`
| ^ expected `()`, found integer
error[E0308]: mismatched types
--> $DIR/span-preservation.rs:54:5
@ -63,10 +57,7 @@ error[E0308]: mismatched types
LL | extern "\x43" fn c_abi_escaped() {
| - possibly return type missing here?
LL | 0
| ^ expected (), found integer
|
= note: expected type `()`
found type `{integer}`
| ^ expected `()`, found integer
error: aborting due to 8 previous errors

View File

@ -1,24 +0,0 @@
error[E0308]: mismatched types
--> $DIR/issue-30904.rs:20:45
|
LL | let _: for<'a> fn(&'a str) -> Str<'a> = Str;
| ^^^ expected concrete lifetime, found bound lifetime parameter 'a
|
= note: expected fn pointer `for<'a> fn(&'a str) -> Str<'a>`
found fn item `fn(&str) -> Str<'_> {Str::<'_>}`
error[E0631]: type mismatch in function arguments
--> $DIR/issue-30904.rs:26:10
|
LL | fn test<F: for<'x> FnOnce<(&'x str,)>>(_: F) {}
| ---- -------------------------- required by this bound in `test`
...
LL | struct Str<'a>(&'a str);
| ------------------------ found signature of `fn(&str) -> _`
...
LL | test(Str);
| ^^^ expected signature of `for<'x> fn(&'x str) -> _`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.