Skip to content

Instantly share code, notes, and snippets.

View stepancheg's full-sized avatar

Stepan Koltsov stepancheg

View GitHub Profile
#![feature(unsafe_destructor)]
#[deriving(Show)]
struct Uninit<T> {
pub value: T
}
impl<T> Uninit<T> {
unsafe fn new() -> Uninit<T> {
Uninit {
Compiling glob v0.0.1 (https://github.com/rust-lang/glob#5d7ad1dc)
Compiling tar v0.0.1 (https://github.com/alexcrichton/tar-rs#868632ea)
/Users/yozh/.cargo/git/checkouts/tar-rs-6e41f0ca8f00e811/master/src/lib.rs:190:43: 190:48 error: mismatched types: expected `&mut [u8]`, found `[_, ..512]` (expected &-ptr, found array of 512 elements)
/Users/yozh/.cargo/git/checkouts/tar-rs-6e41f0ca8f00e811/master/src/lib.rs:190 if try!(Reader::read(&mut me, chunk)) != 512 {
^~~~~
<std macros>:1:1: 8:2 note: in expansion of try!
/Users/yozh/.cargo/git/checkouts/tar-rs-6e41f0ca8f00e811/master/src/lib.rs:190:16: 190:53 note: expansion site
/Users/yozh/.cargo/git/checkouts/glob-53436a21832a74ca/master/src/lib.rs:110:14: 110:46 error: type `core::result::Result<std::path::posix::Path, std::io::IoError>` does not implement any method in scope named `push`
/Users/yozh/.cargo/git/checkouts/glo
[yozh@alpha-6:~/devel/left/cargo;master:darwing]% ./target/x86_64-apple-darwin/tests-a835481c166cc036 '.*example_bin.*'
running 1 test
test test_cargo_test::example_bin_same_name ... FAILED
failures:
---- test_cargo_test::example_bin_same_name stdout ----
task 'test_cargo_test::example_bin_same_name' panicked at '
Expected: an existing file
fn bar(foo: &Foo) {}
fn baz(foo: &Foo) {
// this call works
bar(foo);
}
trait Foo {
fn qux(&self) {
// this doesn't, and error is
fn foo<F : FnMut()>(f: F)
{
foo(f);
foo(f);
}
// tmp3.rs:4:9: 4:10 error: use of moved value: `f`
// tmp3.rs:4 foo(f);
// ^
// tmp3.rs:3:9: 3:10 note: `f` moved here because it has type `F`, which is non-copyable
#!/usr/bin/env python
import sys
import os
import re
class Timestamp:
__slots__ = ('year', 'month', 'day', 'hour', 'minute', 'second')
def __init__(self, year, month, day, hour, minute, second):
binding: user.agent=safari
Compiling module com.company.salmon.frontend.gwt.Solomon
Ignored 8 units with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
Unification traversed 392 fields and methods and 154 types. 1 are considered part of the current module and 1 had all of their fields and methods traversed.
[WARN] Some stale types ([com.company.salmon.frontend.gwt.chart.ChartGwt$8, com.company.salmon.frontend.gwt.chart.ChartGwt$9, com.company.salmon.frontend.gwt.chart.ChartGwt$6, com.company.salmon.frontend.gwt.chart.ChartGwt$7, com.company.salmon.frontend.gwt.chart.ChartGwt$Multiplier, com.company.salmon.frontend.gwt.chart.ChartGwt$YTick, com.company.salmon.frontend.gwt.chart.ChartGwt, com.company.salmon.frontend.gwt.chart.ChartGwt$ChartGeom, com.company.salmon.frontend.gwt.chart.ChartGwt$1, com.company.salmon.frontend.gwt.chart.ChartGwt$5$1, com.company.salmon.frontend.gwt.chart.ChartGwt$4, com.company.salmon.frontend.gwt.chart.Char
binding: user.agent=gecko1_8
Compiling module aaaa.Bbbb
Ignored 1 unit with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
Unification traversed 374 fields and methods and 145 types. 1 are considered part of the current module and 1 had all of their fields and methods traversed.
[WARN] Some stale types ([aaaa.client.Cccc]) were not reprocessed as was expected. This is either a compiler bug or a Generator has legitimately stopped creating these types.
Compiling 1 permutation
Compiling permutation 0...
package ru.yandex.salmon.kikimr.v4.unpackedArrayList;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.reflect.Field;
import java.util.stream.IntStream;
import java.util.stream.Stream;
import ru.yandex.bolts.collection.Cf;
import ru.yandex.bolts.collection.impl.AbstractListF;