Skip to content

Instantly share code, notes, and snippets.

View XavilPergis's full-sized avatar

Rigel Narcissus XavilPergis

View GitHub Profile
use rendy::command::QueueId;
use rendy::factory::Config;
use rendy::graph::{render::*, NodeBuffer, NodeImage};
use rendy::hal::buffer::Usage;
use rendy::memory::MemoryUsageValue;
use rendy::mesh::{AsVertex, PosColor};
use rendy::shader::{Shader, ShaderKind, SourceLanguage, StaticShaderInfo};
use winit::{ControlFlow, Event, WindowEvent};
use winit::{EventsLoop, WindowBuilder};
@XavilPergis
XavilPergis / original.rs
Created January 2, 2019 16:29
Original code that caused the ICE
use crate::{field::BaseType, Jtf};
// `<T>`, `<T extends A>`, `<T extends B1 & B2 & B3>`
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
pub struct TypeParamater {
pub ident: Jtf,
pub bounds: Option<(ObjectType, Option<Box<[ObjectType]>>)>,
}
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
@XavilPergis
XavilPergis / ice
Created January 2, 2019 16:27
ICE: rustc 1.33.0-nightly (9eac38634 2018-12-31) running on x86_64-unknown-linux-gnu
Compiling class v0.1.0 (/home/xavil/code/rvm/class)
error: internal compiler error: src/librustc/dep_graph/graph.rs:634: try_mark_green() - Forcing the DepNode should have set its color
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:590:9
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
1: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:70
2: std::panicking::default_hook::{{closure}}
macro_rules! attr_tuple {
($($ty:ident: $field:tt),*) => {
unsafe impl<$($ty),*> InterleavedAttribute for ($($ty),*) where $($ty: InterleavedAttribute),* {
fn attribute_format<Func>(mut func: Func)
where
Func: FnMut(AttributeFormat),
{
let stride = mem::size_of::<Self>();
$(
use collision::Ray3;
fn int_bound(ray: Ray3<f64>, axis: usize) -> f64 {
if ray.direction[axis] < 0.0 {
let mut new = ray;
new.origin[axis] *= -1.0;
new.direction[axis] *= -1.0;
int_bound(new, axis)
} else {
(1.0 - ::util::modulo(ray.origin[axis], 1.0)) / ray.direction[axis]