You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cargo run --verbose
Compiling test v0.0.1 (file:///home/paho/projects/test)
Running `rustc /home/paho/projects/test/src/main.rs --crate-name test --crate-type bin -g --out-dir /home/paho/projects/test/target --dep-info /home/paho/projects/test/target/.fingerprint/test-7768c6b1caa470a0/dep-bin-test -L /home/paho/projects/test/target -L /home/paho/projects/test/target/deps`
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' panicked at 'assertion failed: *start <= *end', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libcore/slice.rs:421
Could not compile `test`.
Caused by:
Process didn't exit successfully: `rustc /home/paho/projects/test/src/main.rs --crate-name test --crate-type bin -g --out-dir /home/paho/projects/test/target --dep-info /home/paho/projects/test/target/.fingerprint/test-7768c6b1caa470a0/dep-bin-test -L /home/paho/projects/test/target -L /home/paho/projects/test/target/deps` (status=101)
FAIL: 101
In addition, trying to call A::fun() results in the compiler failing to find module A. Calling SomeTrait::fun() does not throw an error, and the print command is executed. However, if a second struct is defined also implementing SomeTrait, then SomeTrait::fun() throws an error as it is unable to infer enough type information. I am unable, then, to find a way to run either struct's version of fun().
I would guess that traits just shouldn't be allowed non-member functions and trying to define them should throw an error.
The text was updated successfully, but these errors were encountered:
Rust version (this is on Arch):
This code
produces the following compiler panic:
In addition, trying to call
A::fun()
results in the compiler failing to find moduleA
. CallingSomeTrait::fun()
does not throw an error, and the print command is executed. However, if a second struct is defined also implementingSomeTrait
, thenSomeTrait::fun()
throws an error as it is unable to infer enough type information. I am unable, then, to find a way to run either struct's version offun()
.I would guess that traits just shouldn't be allowed non-member functions and trying to define them should throw an error.
The text was updated successfully, but these errors were encountered: