Skip to content

Instantly share code, notes, and snippets.

View stepancheg's full-sized avatar

Stepan Koltsov stepancheg

View GitHub Profile
public final int getAndSet(int newValue) {
return unsafe.getAndSetInt(this, valueOffset, newValue);
}
public final boolean getAndSet(boolean newValue) {
boolean prev;
do {
prev = get();
} while (!compareAndSet(prev, newValue));
return prev;
}
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;
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...
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
#!/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):
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
fn bar(foo: &Foo) {}
fn baz(foo: &Foo) {
// this call works
bar(foo);
}
trait Foo {
fn qux(&self) {
// this doesn't, and error is
[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