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
example.rs:16:18: 16:25 error: `src` does not live long enough | |
example.rs:16 src: &'a src | |
^~~~~~~ | |
example.rs:14:40: 18:6 note: reference must be valid for the lifetime &'a as defined on the block at 14:39... | |
example.rs:14 pub fn make(src : R) -> Lex<'a, R> { | |
example.rs:15 Lex { | |
example.rs:16 src: &'a src | |
example.rs:17 } | |
example.rs:18 } | |
example.rs:14:40: 18:6 note: ...but borrowed value is only valid for the block at 14:39 |
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::vec::Vec; | |
struct MultiplyMap<'a, T> { | |
vec: Vec<T>, | |
oper: 'a |T,T|-> T | |
} | |
impl<'a> MultiplyMap<'a, ~str>{ | |
pub fn new(data: Vec<~str>) -> MultiplyMap<'a, ~str> { | |
MultiplyMap{ |
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
struct Instant { | |
nanos: i64, | |
} | |
trait ChronoUnit { | |
fn convert_to_nanos(&self) -> i64; | |
fn is_estimate(&self) -> bool; | |
// get_estimate() | |
} |
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
note: run with `RUST_BACKTRACE=1` for a backtrace | |
thread 'rustc' panicked at 'assertion failed: bpos.to_usize() >= mbc.pos.to_usize() + mbc.bytes', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/codemap.rs:738 | |
stack backtrace: | |
1: 0x2b43da104b84 - sys::backtrace::write::h5e3efc31357524bax4C | |
2: 0x2b43da12d528 - panicking::on_panic::ha90a3694573d0234cjJ | |
3: 0x2b43da060b0c - rt::unwind::begin_unwind_inner::hed207b77c3567743tZI | |
4: 0x2b43dca0edec - rt::unwind::begin_unwind::h13891512158995194072 | |
5: 0x2b43dca8bbc8 - codemap::CodeMap::bytepos_to_file_charpos::he35a71cdbcb3d0ce69z | |
6: 0x2b43dca8a109 - codemap::CodeMap::lookup_char_pos::h68bd093129a66ec5o1z |
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
var gulp = require('gulp'), | |
mocha = require('gulp-mocha'), | |
istanbul = require('gulp-istanbul'); | |
var src_path = 'src/*.js'; | |
var test_path = 'test/*.js'; | |
gulp.task('pre-test', function () { | |
return gulp.src([src_path]) | |
// Covering files |
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
let p = project("foo") | |
.file("Cargo.toml", r#" | |
[project] | |
name = "foo" | |
version = "0.5.0" | |
authors = [] | |
[workspace] | |
members = ["a"] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Shnatsel wrote...
The following code is unsound:
This uses Rc::as_ref()
to obtain a reference to the underlying data, which does not guarantee uniqueness. It is possible to obtain several mutable references to the same memory location by calling this function repeatedly:
let mycell = Cell::new(vec![1,2,3]);
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 bevy::prelude::*; | |
fn main() { | |
App::build() | |
.add_plugins(DefaultPlugins) | |
.add_startup_system(setup.system()) | |
.add_system(animate_translation.system()) | |
.add_system(animate_rotation.system()) | |
.add_system(animate_scale.system()) | |
.run(); |
OlderNewer