Last active
December 17, 2015 01:48
-
-
Save alexcrichton/5530606 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/alex/code/rust2/src/libcore/task/spawn.rs:105:26: 105:45 error: multiple applicable methods in scope | |
/Users/alex/code/rust2/src/libcore/task/spawn.rs:105 let didnt_overwrite = tasks.insert(task); | |
^~~~~~~~~~~~~~~~~~~ | |
/Users/alex/code/rust2/src/libcore/container.rs:74:4: 76:5 note: candidate #1 is `container::__extensions__::insert` | |
/Users/alex/code/rust2/src/libcore/container.rs:74 fn insert(&mut self, key: K, value: V) -> bool { | |
/Users/alex/code/rust2/src/libcore/container.rs:75 self.swap(key, value).is_none() | |
/Users/alex/code/rust2/src/libcore/container.rs:76 } | |
/Users/alex/code/rust2/src/libcore/hashmap.rs:562:4: 562:73 note: candidate #2 is `hashmap::__extensions__::insert` | |
/Users/alex/code/rust2/src/libcore/hashmap.rs:562 fn insert(&mut self, value: T) -> bool { self.map.insert(value, ()) } | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type TaskSet = HashSet<*rust_task>; | |
fn taskset_insert(tasks: &mut TaskSet, task: *rust_task) { | |
let didnt_overwrite = tasks.insert(task); | |
assert!(didnt_overwrite); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment