Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
af21a2700278154bcfc81d61297add21c6870689
rust/src/test/run-fail/alt-bot-fail.rs

12 lines
190 B
Rust
Raw Normal View History

Reformat source tree (minus a couple tests that are still grumpy).
2011-06-15 11:19:50 -07:00
Un-xfail working test cases
2011-06-14 13:58:10 -07:00
// error-pattern:explicit failure
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
use std;
import std::option::*;
Reformat for new syntax
2011-07-27 14:19:39 +02:00
fn foo(s: str) { }
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 for new syntax
2011-07-27 14:19:39 +02:00
let i = alt some[int](3) { none[int]. { fail } some[int](_) { fail } };
Reformat source tree (minus a couple tests that are still grumpy).
2011-06-15 11:19:50 -07:00
foo(i);
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 224ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API