mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
review comments
This commit is contained in:
parent
578bc438b0
commit
8d1c2612f8
@ -1231,6 +1231,10 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
||||
trait_ref: ty::TraitRef<'tcx>,
|
||||
) -> ty::ExistentialTraitRef<'tcx> {
|
||||
if trait_ref.self_ty() != self.tcx().types.trait_object_dummy_self {
|
||||
// FIXME: There appears to be a missing filter on top of `expand_trait_aliases`, which
|
||||
// picks up non-supertraits where clauses - but also, the object safety completely
|
||||
// ignores trait aliases, which could be object safety hazards. We `delay_span_bug`
|
||||
// here to avoid an ICE in stable even when the feature is disabled. (#66420)
|
||||
self.tcx().sess.delay_span_bug(DUMMY_SP, &format!(
|
||||
"trait_ref_to_existential called on {:?} with non-dummy Self",
|
||||
trait_ref,
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(trait_alias)]
|
||||
#![feature(trait_alias)] // Enabled to reduce stderr output, but can be triggered even if disabled.
|
||||
trait Trait {}
|
||||
trait WithType {
|
||||
type Ctx;
|
||||
|
Loading…
Reference in New Issue
Block a user