Skip to content

Instantly share code, notes, and snippets.

View bvssvni's full-sized avatar

Sven Nilsen bvssvni

View GitHub Profile
src/gen/main.rs:324:17: 324:80 error: invalid format string: expected `}` but found `{`
src/gen/main.rs:324 "\\#[inline] pub {}fn {}({}){} \\{ {}(storage::{}.f)({}){} \\}",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/// Updates the cursor that tracks an event.
///
/// Returns `None` if the action did not terminate.
/// or `Some(dt)` that tells how much time was consumed by the action.
pub fn update(
&mut self,
dt: f64,
f: |action: &'a A, state: S| -> Option<S>
) -> Option<f64> {
match *self {
use graphics::{
Context,
};
use {
AssetStore,
GameWindow,
Gl,
};
use keyboard;
use mouse;
@bvssvni
bvssvni / code
Last active August 29, 2015 14:01
impl ::std::fmt::Show for Event {
fn fmt(&self, out: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
out.write_str(match *self {
NoEvent => "NoEvent",
QuitEvent(..) => "QuitEvent",
AppTerminatingEvent(..) => "AppTerminatingEvent",
...
@bvssvni
bvssvni / error
Created May 16, 2014 17:00
Rust-Snake unconstrained type error
src/snakeapp.rs:256:9: 256:31 error: cannot determine a type for this bounded type parameter: unconstrained type
src/snakeapp.rs:256 self.load(asset_store);
^~~~~~~~~~~~~~~~~~~~~~
@bvssvni
bvssvni / error
Last active August 29, 2015 14:00
make rlib
clear \
&& rustc --target "x86_64-apple-darwin" -O --crate-type=rlib src/lib.rs -L "target/x86_64-apple-darwin/lib" --out-dir "target/x86_64-apple-darwin/lib/" \
&& clear \
&& echo "--- Built rlib" \
&& echo "--- Type 'make test' to test library"
task 'rustc' failed at 'index out of bounds: the len is 0 but the index is 0', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/librustc/lib.rs:1
stack backtrace:
1: 0x10cf55844 - rt::backtrace::imp::write::h254d0a6dd1fae24biCa::v0.11.pre
2: 0x10ceb78de - rt::unwind::begin_unwind_inner::h6e474448729455a4oca::v0.11.pre
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'index out of bounds: the len is 0 but the index is 0', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/librustc/lib.rs:1
stack backtrace:
1: 0x104892844 - rt::backtrace::imp::write::h254d0a6dd1fae24biCa::v0.11.pre
2: 0x1047f48de - rt::unwind::begin_unwind_inner::h6e474448729455a4oca::v0.11.pre
3: 0x1047f4068 - rt::unwind::begin_unwind::h7603572080577830236::v0.11.pre
4: 0x104892309 - rt::unwind::begin_unwind_raw::h0893674862f52c69x99::v0.11.pre
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'No triple in crate', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libstd/option.rs:245
stack backtrace:
1: 0x104c1e844 - rt::backtrace::imp::write::h254d0a6dd1fae24biCa::v0.11.pre
2: 0x104b808de - rt::unwind::begin_unwind_inner::h6e474448729455a4oca::v0.11.pre
3: 0x101efdd58 - rt::unwind::begin_unwind::h11500859575803473188::v0.11.pre
4: 0x10264db87 - metadata::decoder::get_crate_triple::h55d8343241d15157rQb::v0.11.pre
src/interpolation.rs:15:5: 15:20 error: binary operation `+` cannot be applied to type `&T`
src/interpolation.rs:15 a + (b - a) * t
test: something.rs
# This is run even when 'something.rs' exists.
touch dummy.rs
something.rs:
touch something.rs