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
macro_rules! spec_range { ($($t:ty)*) => | |
($( | |
impl Iterator for ops::Range<$t> { | |
#[inline] | |
default fn next(&mut self) -> Option<Self::Item> { | |
if self.start < self.end && self.start < <$t>::max_value() { | |
let temp = self.start; | |
self.start += 1; | |
Some(temp) | |
} else { |
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
#![crate_type = "lib"] | |
#![feature(const_fn)] | |
const fn foo() -> usize { | |
10 | |
} | |
// Ends up as simply return 25 in the mir output. | |
pub fn test1<T>() -> usize { | |
if true { |
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
// clang++ -S -std=c++11 -emit-llvm -vec.cpp -o vec_cpp.ll | |
// lines: 891 | |
// ( wc -l vec_cpp.ll ) | |
// with stripped blank lines and comments: | |
// ( sed '/^\s*;/d;/^\s*$/d' vec_cpp.ll | wc -l ) | |
// 698 | |
#include <cinttypes> | |
#include <vector> |
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
#include <stdint.h> | |
#include <initializer_list> | |
typedef uint64_t u64; | |
typedef uint32_t u32; | |
typedef std::size_t usize; | |
const u32 SHIFT_MASK = (1 << 6) - 1; | |
// Putting these in an anonymous namespace makes them internal to this compilation unit, similar |
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
.text | |
.file "test2.cgu-0.rs" | |
.section .text._ZN5test25clone17h3c4e58d6a2d910d1E,"ax",@progbits | |
.globl _ZN5test25clone17h3c4e58d6a2d910d1E | |
.p2align 4, 0x90 | |
.type _ZN5test25clone17h3c4e58d6a2d910d1E,@function | |
_ZN5test25clone17h3c4e58d6a2d910d1E: | |
.cfi_startproc | |
pushq %rbx | |
.Lcfi0: |
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 inflate v0.1.1 (file:///<removed>/inflate) | |
warning: All variants have the same prefix: `Block`, #[warn(enum_variant_names)] on by default | |
--> src/lib.rs:660:1 | |
| | |
660 | enum BitsNext { | |
| ^ | |
| | |
= help: remove the prefixes and use full paths to the variants instead of glob imports | |
= help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#enum_variant_names |
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
import RTSS/NormalMapping_MultiPass from "RTShaderSystem.material" | |
material Dirt : RTSS/NormalMapping_MultiPass | |
{ | |
technique | |
{ | |
pass lighting | |
{ | |
// Override the normal map. | |
rtshader_system | |
{ |