Commit Graph

5 Commits

Author SHA1 Message Date
Ariel Ben-Yehuda
9ee2335bfc Fix test fallout, and add some rather comprehensive tests. 2015-05-19 17:42:14 +03:00
Huon Wilson
0c70ce1424 Update compile fail tests to use isize. 2015-01-08 11:02:24 -05:00
Niko Matsakis
7f6177e646 Fix fallout from changes. In cases where stage0 compiler is needed, we
cannot use an `as` expression to coerce, so I used a one-off function
instead (this is a no-op in stage0, but in stage1+ it triggers
coercion from the fn pointer to the fn item type).
2014-12-22 12:27:07 -05:00
klutzy
9432e2a25d rustc: Update obsolete attribute list 2013-11-26 14:06:52 +09:00
Geoff Hill
e538c95e4d Typeck: Disallow scalar casts to bare_fn.
Bare functions are another example of a scalar but non-numeric
type (like char) that should be handled separately in casts.
This disallows expressions like `0 as extern "Rust" fn() -> int;`.

It might be advantageous to allow casts between bare functions
and raw pointers in unsafe code in the future, to pass function
pointers between Rust and C.

Closes #8728
2013-10-10 01:11:09 +00:00