This website requires JavaScript.
Explore
Help
Register
Sign In
mikros
/
rust
Watch
1
Star
0
Fork
0
You've already forked rust
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
rust
/
src
/
test
/
run-pass
/
alt-bot.rs
7 lines
118 B
Rust
Raw
Normal View
History
Unescape
Escape
Make _|_ unify with anything The typechecker had a number of special cases for unifying types with _|_ (as with checking if and alt). But, a value of type _|_ should be usable in any context, as such a value always diverges, and will never be used by its immediate context. Changed unify accordingly, removed special cases.
2011-05-26 20:14:00 -07:00
fn
main
(
)
{
Reformat This changes the indexing syntax from .() to [], the vector syntax from ~[] to [] and the extension syntax from #fmt() to #fmt[]
2011-08-19 15:16:48 -07:00
let
i
:
int
=
alt
some
::
<
int
>
(
3
)
{
none
::
<
int
>
.
{
fail
}
some
::
<
int
>
(
_
)
{
5
}
}
;
Reformat source tree (minus a couple tests that are still grumpy).
2011-06-15 11:19:50 -07:00
log
i
;
Port the tests to the expr foo::<T> syntax.
2011-08-13 00:10:18 -07:00
}
Reference in New Issue
Copy Permalink