Skip to content

Instantly share code, notes, and snippets.

  • #![feature] - may be good to show off stable rust?
  • "The problem" - code example uses data.take() while code above uses ptr::read
  • "clears the active thread" - clears the active flag
  • store_and_ref - alignment is a little off in code
diff --git a/Makefile.in b/Makefile.in
index 05b6215..4d2bd0a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -354,7 +354,8 @@ endif
# Prerequisites for using the stageN compiler to build target artifacts
TSREQ$(1)_T_$(2)_H_$(3) = \
$$(HSREQ$(1)_H_$(3)) \
- $$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a
+ $$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a \
#[feature(macro_rules)];
use std::io::MemWriter;
macro_rules! write(
($dst:expr, $($arg:tt)*) => ({
let dst: &mut Writer = $dst;
format_args!(|args| { ::std::fmt::write(dst, args) }, $($arg)*)
})
)
[~/code/libuv[master]] $ source ./android-configure $HOME/code/android/android-ndk-r9c gyp [alex@rhea]
Copying prebuilt binaries...
Copying sysroot headers and libraries...
Copying libstdc++ headers and libraries...
Copying files to: /Users/alex/code/libuv/android-toolchain
Cleaning up...
Done.
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
File "/Users/alex/code/libuv/android-toolchain/lib/python2.7/hashlib.py", line 139, in <module>
[~/rust[master]] $ gdb ./x86_64-unknown-freebsd/stage2/bin/rustc rustc.core [alex@freebsd-vm]
GNU gdb (GDB) 7.6 [GDB v7.6 for FreeBSD]
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd9.1".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
(gdb) $ gdb ./x86_64-unknown-freebsd/stage2/bin/rustc rustc.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)...
Core was generated by `rustc'.
Program terminated with signal 11, Segmentation fault.
pub trait Eq {
fn eq(&self, other: &Self) -> bool;
}
// equality operators are wired to this trait
#[lang = "partial_eq"]
pub trait PartialEq {
fn eq(&self, other: &Self) -> bool;
fn ne(&self, other: &Self) -> bool { !self.eq(other) }
}
#![feature(phase)]
#[phase(syntax)] extern crate green;
use std::io;
#[cfg(green)]
green_start!(main)
fn main() {
println!("------------------ before");
#![no_std]
fn call(f: ||) {
f();
}
fn main() {
let f = || {};
call(|| {
f();