Skip to content

Instantly share code, notes, and snippets.

@jamorton
Created April 5, 2012 18:35
Show Gist options
  • Save jamorton/2313120 to your computer and use it in GitHub Desktop.
Save jamorton/2313120 to your computer and use it in GitHub Desktop.
fn main(args: [str]) {
let thing = "{{ f }}";
let f = str::find_str(thing, "{{");
if f.is_none() {
io::println("None!");
}
}
/*
error:
test.rs:7:7: 7:16 error: attempted access of field is_none on type core::option::option<uint>, but no public field or method with that name was found
test.rs:7 if f.is_none() {
^~~~~~~~~
test.rs:7:7: 7:18 error: mismatched types: expected function or native function but found <T5>
test.rs:7 if f.is_none() {
^~~~~~~~~~~
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment