Turns out it's impossible to use generic newtypes across crates:
test.rs:
pubstructFoo<T>(T);impl<T>Foo<T>{pubfnnew(t:T) -> Foo<T>{Foo(t)}}test2.rs:
externmod test;use test::{Foo};structBaz;fnmain(){Foo::new(Baz);}~ ❯ env RUST_LOG=rustc=1 rustc -L. test2.rs
task <unnamed> failed at 'assertion failed: `(left == right) && (right == left)` (left: `2`, right: `0`)', /build/rust-git/src/rust/src/librustc/middle/trans/callee.rs:385
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues
task <unnamed> failed at 'explicit failure', /build/rust-git/src/rust/src/librustc/rustc.rs:377
This makes it impossible to use std::rt::io::buffered::BufferedStream.
Turns out it's impossible to use generic newtypes across crates:
test.rs:
test2.rs:
This makes it impossible to use
std::rt::io::buffered::BufferedStream.