-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Compiler panics on cycle in (sub)traits declaration #58813
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Can you post the output? I cannot reproduce this in the playground for any release. |
With the exact same compiler and that code I cannot reproduce that ICE. If you happen to reproduce it, please do it like |
Weird, yesterday I could reproduce it multiple times, now I can't, and I get the set same result as in the playground. |
OK, I'm managed to recreate the bug by first running almost the same code, but without the problem.
Then running the original problematic code with
|
Indeed! Thank you very much! Incremental bugs are sometimes hard to reproduce. Bug is also on 1.33.0 stable, but not on 1.34.0-beta1. |
The question is: This is already fixed in nightly. I think this deserved a testcase nevertheless, right? Here's one if needed src/test/incremental/circular_dependency.rs// revisions:rpass1 rpass2
// See issue #58813
#![allow(warnings)]
pub trait T1: T2 { }
#[cfg(rpass1)]
pub trait T2 { }
#[cfg(rpass2)]
pub trait T2: T1 { }
fn main() { } |
Heh, normally when regressions are fixed I tagged them as E-needstest, but I guess we already have a test ready to go here. |
(Update: Fixed test; revision is meant to introduce compile-failure, w/o ICE.)
…ess-test, r=petrochenkov Regression test for rust-lang#58813 Fix rust-lang#58813
Rollup of 24 pull requests Successful merges: - #58080 (Add FreeBSD armv6 and armv7 targets) - #58204 (On return type `impl Trait` for block with no expr point at last semi) - #58269 (Add librustc and libsyntax to rust-src distribution.) - #58369 (Make the Entry API of HashMap<K, V> Sync and Send) - #58861 (Expand where negative supertrait specific error is shown) - #58877 (Suggest removal of `&` when borrowing macro and appropriate) - #58883 (Suggest appropriate code for unused field when destructuring pattern) - #58891 (Remove stray ` in the docs for the FromIterator implementation for Option) - #58893 (race condition in thread local storage example) - #58906 (Monomorphize generator field types for debuginfo) - #58911 (Regression test for #58435.) - #58912 (Regression test for #58813) - #58916 (Fix release note problems noticed after merging.) - #58918 (Regression test added for an async ICE.) - #58921 (Add an explicit test for issue #50582) - #58926 (Make the lifetime parameters of tcx consistent.) - #58931 (Elide invalid method receiver error when it contains TyErr) - #58940 (Remove JSBackend from config.toml) - #58950 (Add self to mailmap) - #58961 (On incorrect cfg literal/identifier, point at the right span) - #58963 (libstd: implement Error::source for io::Error) - #58970 (delay_span_bug in wfcheck's ty.lift_to_tcx unwrap) - #58984 (Teach `-Z treat-err-as-bug` to take a number of errors to emit) - #59007 (Add a test for invalid const arguments) Failed merges: - #58959 (Add release notes for PR #56243) r? @ghost
I tried this code:
I expected to see this happen: compilation error about cycle in traits T1,T2
Instead, this happened: compiler panicked
Meta
rustc --version --verbose
:rustc 1.32.0 (9fda7c2 2019-01-16)
binary: rustc
commit-hash: 9fda7c2
commit-date: 2019-01-16
host: x86_64-unknown-linux-gnu
release: 1.32.0
LLVM version: 8.0
The text was updated successfully, but these errors were encountered: