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
use std::default::Default; | |
struct Fifo<T> { | |
buffer: [T; BUFFER_SIZE], | |
windex: Index, | |
rindex: Index, | |
} | |
impl<T: Default + Copy> Fifo<T> { | |
fn new() -> Fifo<T> { |
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
src/main.rs:126:23: 126:86 error: mismatched types: | |
expected `*const libc::types::common::c95::c_void`, | |
found `*const libc::types::common::c95::c_void` | |
(expected enum `libc::types::common::c95::c_void`, | |
found a different enum `libc::types::common::c95::c_void`) [E0308] |
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
int foo() { | |
return 0; | |
} | |
int bar(void) { | |
return 0; | |
} | |
int main() { | |
foo(42); |
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
Compiling rustbook v0.3.0 (file:///home/simias/src/rustbook) | |
src/main.rs:13:1: 13:18 error: unstable feature | |
src/main.rs:13 #![feature(core)] | |
^~~~~~~~~~~~~~~~~ | |
note: this feature may not be used in the beta release channel | |
src/main.rs:14:1: 14:25 error: unstable feature | |
src/main.rs:14 #![feature(exit_status)] | |
^~~~~~~~~~~~~~~~~~~~~~~~ | |
note: this feature may not be used in the beta release channel | |
src/main.rs:15:1: 15:21 error: unstable feature |
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
src/main.rs:22:31: 22:35 error: cannot borrow `*self` as mutable more than once at a time | |
src/main.rs:22 while let Some(msg) = self.next_packet() { | |
^~~~ | |
src/main.rs:22:31: 22:35 note: previous borrow of `*self` occurs here; the mutable borrow prevents subsequent moves, borrows, or modification of `*self` until the borrow ends | |
src/main.rs:22 while let Some(msg) = self.next_packet() { | |
^~~~ |
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
#![feature(no_std,core)] | |
#![no_std] | |
#![crate_type = "staticlib"] | |
#![feature(lang_items)] | |
extern crate core; | |
fn main() { | |
} |
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
#![feature(lang_items)] | |
#![feature(no_std,core)] | |
#![no_std] | |
#![crate_type = "staticlib"] | |
extern crate core; | |
// Various lang items required by rustc | |
#[lang = "stack_exhausted"] | |
extern fn stack_exhausted() {} |
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
OBJS = genplus-ntsc-md.o md_ntsc.o | |
NTSC_VARIANT = NTSC_COMPOSITE | |
CFLAGS = -fPIC -O2 -D$(NTSC_VARIANT) | |
all: genplus-ntsc.so genplus-ntsc.a | |
genplus-ntsc.so: $(OBJS) | |
$(CC) -shared -o $@ $(OBJS) |
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
impl GdbRemote { | |
fn send_reply(&mut self, reply: Reply) -> Result<(), ()> { | |
match self.remote.write(&reply.into_packet()) { | |
//... | |
} | |
} | |
} | |
impl Reply { | |
pub fn into_packet(mut self) -> Vec<u8> { |
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
asm!("j 0xa0\n\t\ | |
nop" | |
: | |
: "{a0}"(c) | |
: | |
: ); | |
// Gives: rustc: [...]/MipsISelLowering.cpp:3309: std::pair<unsigned int, const llvm::TargetRegisterClass*> llvm::MipsTargetLowering::parseRegForInlineAsmConstraint(llvm::StringRef, llvm::MVT) const: | |
// Assertion `Prefix == "$"' failed. |
OlderNewer