Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal compiler error: expected appropriate reference type #22289

Closed
AerialX opened this issue Feb 13, 2015 · 0 comments · Fixed by #24193
Closed

internal compiler error: expected appropriate reference type #22289

AerialX opened this issue Feb 13, 2015 · 0 comments · Fixed by #24193
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@AerialX
Copy link

AerialX commented Feb 13, 2015

:; echo 'fn main() { 0 as &std::any::Any; }' | RUST_BACKTRACE=1 rustc -
<anon>:1:13: 1:14 error: mismatched types:
 expected `&_`,
    found `_`
(expected &-ptr,
    found integral variable) [E0308]
<anon>:1 fn main() { 0 as &std::any::Any; }
                     ^
<anon>:1:13: 1:14 error: internal compiler error: expected appropriate reference type
<anon>:1 fn main() { 0 as &std::any::Any; }
                     ^
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
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:129

stack backtrace:
1: 0x7f953c823750 - sys::backtrace::write::h49b06c4e5fa1765dZTA
2: 0x7f953c8483e0 - failure::on_fail::h128a61ca90111ec2JFJ
3: 0x7f953c7a0350 - rt::unwind::begin_unwind_inner::h142cc6242e7988934jJ
4: 0x7f9539b58d10 - rt::unwind::begin_unwind::h6758701799544434784
5: 0x7f9539b58ca0 - diagnostic::SpanHandler::span_bug::h59bf852a75d477d4n3E
6: 0x7f953a691540 - session::Session::span_bug::h709cb9d6918f6cf5S7r
7: 0x7f953bfb1970 - check::check_cast::h5ab7c1542e125357Yeo
8: 0x7f953bff66d0 - check::check_expr_with_unifier::h2765108193956421474
9: 0x7f953bfac3b0 - check::check_block_with_expected::h253417a34106ec9dYds
10: 0x7f953bf8e590 - check::check_fn::h4133ccf0cc02cfa7Zon
11: 0x7f953bfa9030 - check::check_bare_fn::h7302ce7f04a890c6hen
12: 0x7f953bfa0960 - check::check_item::hec6adb41fc576f76Kxn
13: 0x7f953c069bb0 - check_crate::closure.35274
14: 0x7f953c064480 - check_crate::h90636931de9b676ckrB
15: 0x7f953ce4b0b0 - driver::phase_3_run_analysis_passes::h589f8717780121b4SGa
16: 0x7f953ce31190 - driver::compile_input::ha0cf61571709f853Eba
17: 0x7f953cf022b0 - run_compiler::h331ebfa0d68f5ee75bc
18: 0x7f953cf00910 - thunk::F.Invoke<A, R>::invoke::h10527493330292840218
19: 0x7f953ceff800 - rt::unwind::try::try_fn::h13426443671359034537
20: 0x7f953c8b4a70 - rust_try_inner
21: 0x7f953c8b4a60 - rust_try
22: 0x7f953ceffab0 - thunk::F.Invoke<A, R>::invoke::h16144672682574185653
23: 0x7f953c834050 - sys::thread::thread_start::h76415ad3898ce7eaaOE
24: 0x7f95368362b0 - start_thread
25: 0x7f953c428249 - __clone
26: 0x0 -

:; rustc -Vv
rustc 1.0.0-nightly (3ef8ff1f8 2015-02-12 00:38:24 +0000)
binary: rustc
commit-hash: 3ef8ff1f81107b42840a695725e1a0869c163355
commit-date: 2015-02-12 00:38:24 +0000
host: x86_64-unknown-linux-gnu
release: 1.0.0-nightly
@jdm jdm added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Feb 13, 2015
@ghost ghost added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Apr 3, 2015
Manishearth added a commit to Manishearth/rust that referenced this issue Apr 9, 2015
Manishearth added a commit to Manishearth/rust that referenced this issue Apr 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants