Closed
Description
Repro:
pub type PrivacyPolicy<E> =
Vec<Box<dyn PrivacyRule<ViewerContext = Self::ViewerContext, Id = Self::Id, Err = E>>>;
pub trait PrivacyRule {
type ViewerContext;
type Id;
fn can_see(&self, viewer: &Self::ViewerContext, id: &Self::Id) -> ();
}
This doesn't ICE on beta or stable but gives the following ICE on nightly:
error: internal compiler error: src/librustc/hir/map/mod.rs:517: ty_param_owner: ty PrivacyPolicy (hir_id=HirId { owner: DefIndex(12), local_id: 0 }) not a type parameter
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:643:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
error: aborting due to previous error
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.37.0-nightly (b25ee6449 2019-06-17) running on x86_64-unknown-linux-gnu
note: compiler flags: -C codegen-units=1 -C debuginfo=2 --crate-type lib
note: some of the compiler flags provided by cargo are hidden
error: Could not compile `playground`.