Skip to content

Instantly share code, notes, and snippets.

View GuillaumeGomez's full-sized avatar

Guillaume Gomez GuillaumeGomez

View GitHub Profile
#![feature(plugin)]
#![plugin(afl_plugin)]
extern crate afl;
extern crate mp3_metadata;
use std::env;
fn main() {
/*let file = match env::args().skip(1).next() {
@GuillaumeGomez
GuillaumeGomez / frew
Last active September 26, 2016 20:13
RUST_BACKTRACE=1 cargo run < out/queue/id:000000,orig:double_id.mp3
Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs
Running `target/debug/basic`
thread 'main' panicked at 'Meta error: DuplicatedIDV3', ../src/libcore/result.rs:788
stack backtrace:
1: 0x107ad8dfb - std::sys::backtrace::tracing::imp::write::h29f5fdb9fc0a7395
2: 0x107adac2a - std::panicking::default_hook::_{{closure}}::h2cc84f0378700526
3: 0x107ada05a - std::panicking::default_hook::hbbe7fa36a995aca0
4: 0x107ada688 - std::panicking::rust_panic_with_hook::h105c3d42fcd2fb5e
5: 0x107ada4e6 - std::panicking::begin_panic::hbf62ea4a5ff3f9de
fn some_fn(i: u32, x: u32, z: u32)
^^^^^^^^^^^^^^^^^
/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */
#![allow(non_camel_case_types,non_upper_case_globals,unused_imports,unused_variables,unused_assignments)]
use dom::bindings;
use dom::bindings::callback::wrap_call_this_object;
use dom::bindings::callback::{CallSetup,ExceptionHandling};
use dom::bindings::callback::{CallbackContainer,CallbackInterface,CallbackFunction};
use dom::bindings::codegen::Bindings::*;
use dom::bindings::codegen::InterfaceObjectMap;
use dom::bindings::codegen::{PrototypeList, RegisterBindings, UnionTypes};
# Call for proposals for next __Rust Doc Days__ crates!
Since the first Rust Doc Days went well, we the Rust Documentation Team have decided to do it again. The second Rust Doc Days will happen after RustConf, likely during the end of September. But before we can schedule the event, we need your help.
For the second Rust Doc Days, we want *you* to propose crates that need better documentation. This time we'd prefer to focus on community crates. We've already nominated __serde__, but we need your thoughts. Let us know by leaving a comment below.
If you want to read more about the first Rust Doc Days, you can read the original [Rust Doc Days announcement] and the [Rust Doc Days follow up] post
[Rust Doc Days announcement]: https://facility9.com/2016/06/announcing-rust-doc-days/
[Rust Doc Days follow up]: https://facility9.com/2016/07/rust-doc-days-follow-up/
imperio@imperio-virtual-machine:~/rust/rust-bindgen$ echo $LIBCLANG_PATH
/usr/lib/llvm-3.8/lib/
imperio@imperio-virtual-machine:~/rust/rust-bindgen$ cargo build
Compiling bindgen v0.16.0 (file:///home/imperio/rust/rust-bindgen)
error: linking with `cc` failed: exit code: 1
note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/imperio/rust/rust-bindgen/target/debug/bindgen.0.o" "-o" "/home/imperio/rust/rust-bindgen/target/debug/bindgen" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" "/home/imperio/rust/rust-bindgen/target/debug" "-L" "/home/imperio/rust/rust-bindgen/target/debug/deps" "-L" "/usr/lib/llvm-3.8/lib" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-Wl,-Bdynamic" "/home/imperio/rust/rust-bindgen/target/debug/libbindgen.rlib" "/home/imperio/rust/rust-bindgen/target/debug/deps/libsyntex_syntax-6936cc848bda7d69.rlib" "/home/imperio/rust/rust-bindgen/target/debug/deps/libbitflags-1efefdc447eb53f2.rlib"
Je me trouve toujours complètement prisonnier de toutes les limitations mises en place. Quelques exemples tirés de faits réels…
Déjà, dans les motifs, tu peux uniquement préciser * ou + : impossible de dire qu’un motif peut apparaître 0 ou 1 fois, ou qu’il doit être présent en 0, 1, 2, ou 3 exemplaires. Et pareillement, dans les résultats de la macro, impossible de dire « Si tel motif est présent, insère ci, sinon, insère ça. ». De ce point de vue-là, même les macros NASM sont plus puissantes… >_<
Ensuite, ce motif fonctionne (note bien que je voudrais qu’il n’y ait qu’un ou zéro $void, et pas un nombre indéterminé)…
```rust
([$($void:path)*] $class:ident)
./mach test-wpt --log-raw raw.log /domparsing/insert-adjacent.html /domparsing/insert_adjacent_html.xhtml /domparsing/insert_adjacent_html.html; ./mach update-wpt --no-patch raw.log
Running 3 tests in web-platform-tests
Unsupported test type wdspec for product servo
▶ Unexpected subtest result in /domparsing/insert-adjacent.html:
│ FAIL [expected PASS] insertAdjacentHTML(afterbegin, <h3>afterbegin</h3> )
│ → el.insertAdjacentHTML is not a function
│ FAIL [expected PASS] insertAdjacentHTML(beforeend, <h3>beforeend</h3> )
│ → el.insertAdjacentHTML is not a function
.enum > .toggle-wrapper > .collapse-toggle, .struct > .toggle-wrapper > .collapse-toggle {
left: 0;
margin-top: 5px;
}
.enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
margin-left: 10px;
margin-bottom: 20px;
margin-top: 5px;
}
src/librustc/traits/error_reporting.rs:80:9: 80:27 error: cannot infer an appropriate lifetime for lifetime parameter `'tcx` due to conflicting requirements [E0495]
src/librustc/traits/error_reporting.rs:80 fcx.type_vars_for_defs(obligation.cause.span, subst::ParamSpace::TypeSpace, &mut substs, tps);
^~~~~~~~~~~~~~~~~~
src/librustc/traits/error_reporting.rs:80:5: 80:98 note: first, the lifetime cannot outlive the method call at 80:4...
src/librustc/traits/error_reporting.rs:80 fcx.type_vars_for_defs(obligation.cause.span, subst::ParamSpace::TypeSpace, &mut substs, tps);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/librustc/traits/error_reporting.rs:80:81: 80:92 note: ...so that argument is valid for the call
src/librustc/traits/error_reporting.rs:80 fcx.type_vars_for_defs(obligation.cause.span, subst::ParamSpace::TypeSpace, &mut substs, tps);