Skip to content

Instantly share code, notes, and snippets.

fn main() {
let x = unsafe {
std::rt::heap::allocate(4, 4)
};
}
fn main() {
let x = Box::new(42u32);
}
pub struct Context<'a> {
pub glfw : Option<::glfw::Glfw>,
pub window : Option<::glfw::Window>,
pub events : Option<Receiver<(f64, ::glfw::WindowEvent)>>,
pub device : Option<::gfx::GlDevice>,
pub graphics : Option<
Box<
::gfx::Graphics<
::gfx::GlDevice,
::gfx::GlCommandBuffer
.needstack:
movabsq $72, %r10
movabsq $0, %r11
callq __morestack
retq
; padding to align...
the_function:
cmpq %fs:112, %rsp
jbe .needstack
; body
eedstack_1:
movabsq $72, %r10
movabsq $0, %r11
int $3
retq
.align 0x20
the_function_1:
cmpq $0, %rsp
jbe needstack_1
.rept 40
float rand(vec2 co){
float k = fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
return texture2D(iChannel0, vec2(k, co.y)).z;
}
float slowrand(vec2 co) {
float a, b;
a = rand(co);
b = rand(vec2(co.x, a));
.text
.def _ZN3lol20h18ff950b148ec5d3eaaE;
.scl 2;
.type 32;
.endef
.globl _ZN3lol20h18ff950b148ec5d3eaaE
.align 16, 0x90
_ZN3lol20h18ff950b148ec5d3eaaE: # @_ZN3lol20h18ff950b148ec5d3eaaE
.Ltmp11:
.seh_proc _ZN3lol20h18ff950b148ec5d3eaaE
diff --git a/include/llvm/Target/TargetLibraryInfo.h b/include/llvm/Target/TargetLibraryInfo.h
index 46f87b9..1863a84 100644
--- a/include/llvm/Target/TargetLibraryInfo.h
+++ b/include/llvm/Target/TargetLibraryInfo.h
@@ -371,6 +371,10 @@ namespace llvm {
isascii,
/// int isdigit(int c);
isdigit,
+ /// void *je_mallocx(size_t size, int flags);
+ je_mallocx,
note: in expansion of #[derive]
ncollide_entities\inspection\repr.rs:6:1: 6:16 note: expansion site
ncollide_entities\shape\base_mesh.rs:17:33: 17:34 error: parameter `E` is never used
ncollide_entities\shape\base_mesh.rs:17 pub struct BaseMesh<N, P, V, I, E> {
^
ncollide_entities\shape\base_mesh.rs:17:33: 17:34 help: consider removing `E` or using a marker such as `core::marker::P
hantomData`
ncollide_entities\shape\base_mesh.rs:17 pub struct BaseMesh<N, P, V, I, E> {
^
ncollide_entities\inspection\repr.rs:59:16: 59:17 error: parameter `N` is never used

so you got some structs, right?

struct Foo<'a> {
    x: &'a String
}
struct Bar<'b> {
    y: &'b String
}