Random type checker changes
This commit is contained in:
parent
021861aea8
commit
5fc39e0796
13 changed files with 59 additions and 93 deletions
|
|
@ -9,7 +9,7 @@ LL | let c1 : () = c;
|
|||
| expected due to this
|
||||
|
|
||||
= note: expected unit type `()`
|
||||
found closure `{mod1::f<T>::{closure#0} closure_args=(unavailable) args=[T, ?8t, extern "rust-call" fn(()), ?7t]}`
|
||||
found closure `{mod1::f<T>::{closure#0} closure_kind_ty=?8t closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=?7t}`
|
||||
help: use parentheses to call this closure
|
||||
|
|
||||
LL | let c1 : () = c();
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ LL | let c1 : () = c;
|
|||
| expected due to this
|
||||
|
|
||||
= note: expected unit type `()`
|
||||
found closure `{f<T>::{closure#0} closure_args=(unavailable) args=[T, ?8t, extern "rust-call" fn(()), ?7t]}`
|
||||
found closure `{f<T>::{closure#0} closure_kind_ty=?8t closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=?7t}`
|
||||
help: use parentheses to call this closure
|
||||
|
|
||||
LL | let c1 : () = c();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ LL | let foo: fn(u8) -> u8 = |v: u8| { a += v; a };
|
|||
| expected due to this
|
||||
|
|
||||
= note: expected fn pointer `fn(u8) -> u8`
|
||||
found closure `{main::{closure#0} closure_args=(unavailable) args=[i8, extern "rust-call" fn((u8,)) -> u8, ?4t]}`
|
||||
found closure `{main::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn((u8,)) -> u8 upvar_tys=?4t}`
|
||||
note: closures can only be coerced to `fn` types if they do not capture any variables
|
||||
--> $DIR/closure-print-verbose.rs:10:39
|
||||
|
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ error: coroutine cannot be shared between threads safely
|
|||
LL | assert_sync(|| {
|
||||
| ^^^^^^^^^^^ coroutine is not `Sync`
|
||||
|
|
||||
= help: within `{main::{closure#0} upvar_tys=() {main::{closure#0}}}`, the trait `Sync` is not implemented for `NotSync`
|
||||
= help: within `{main::{closure#0} upvar_tys=() witness={main::{closure#0}}}`, the trait `Sync` is not implemented for `NotSync`
|
||||
note: coroutine is not `Sync` as this value is used across a yield
|
||||
--> $DIR/coroutine-print-verbose-2.rs:20:9
|
||||
|
|
||||
|
|
@ -24,7 +24,7 @@ error: coroutine cannot be sent between threads safely
|
|||
LL | assert_send(|| {
|
||||
| ^^^^^^^^^^^ coroutine is not `Send`
|
||||
|
|
||||
= help: within `{main::{closure#1} upvar_tys=() {main::{closure#1}}}`, the trait `Send` is not implemented for `NotSend`
|
||||
= help: within `{main::{closure#1} upvar_tys=() witness={main::{closure#1}}}`, the trait `Send` is not implemented for `NotSend`
|
||||
note: coroutine is not `Send` as this value is used across a yield
|
||||
--> $DIR/coroutine-print-verbose-2.rs:27:9
|
||||
|
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ LL | | };
|
|||
| |_____^ expected `()`, found coroutine
|
||||
|
|
||||
= note: expected unit type `()`
|
||||
found coroutine `{main::{closure#0} upvar_tys=(unavailable)}`
|
||||
found coroutine `{main::{closure#0} upvar_tys=?4t witness=?6t}`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue