Skip to content

Commit 2f44bb0

Browse files
estebankMark-Simulacrum
authored andcommitted
review comments
1 parent 3bd3984 commit 2f44bb0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/librustc_typeck/astconv.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,6 +1228,10 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
12281228
trait_ref: ty::TraitRef<'tcx>,
12291229
) -> ty::ExistentialTraitRef<'tcx> {
12301230
if trait_ref.self_ty() != self.tcx().types.trait_object_dummy_self {
1231+
// FIXME: There appears to be a missing filter on top of `expand_trait_aliases`, which
1232+
// picks up non-supertraits where clauses - but also, the object safety completely
1233+
// ignores trait aliases, which could be object safety hazards. We `delay_span_bug`
1234+
// here to avoid an ICE in stable even when the feature is disabled. (#66420)
12311235
self.tcx().sess.delay_span_bug(DUMMY_SP, &format!(
12321236
"trait_ref_to_existential called on {:?} with non-dummy Self",
12331237
trait_ref,

src/test/ui/issues/issue-65673.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(trait_alias)]
1+
#![feature(trait_alias)] // Enabled to reduce stderr output, but can be triggered even if disabled.
22
trait Trait {}
33
trait WithType {
44
type Ctx;

0 commit comments

Comments
 (0)