Skip to content

Commit 8d1c261

Browse files
committed
review comments
1 parent 578bc43 commit 8d1c261

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
@@ -1231,6 +1231,10 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
12311231
trait_ref: ty::TraitRef<'tcx>,
12321232
) -> ty::ExistentialTraitRef<'tcx> {
12331233
if trait_ref.self_ty() != self.tcx().types.trait_object_dummy_self {
1234+
// FIXME: There appears to be a missing filter on top of `expand_trait_aliases`, which
1235+
// picks up non-supertraits where clauses - but also, the object safety completely
1236+
// ignores trait aliases, which could be object safety hazards. We `delay_span_bug`
1237+
// here to avoid an ICE in stable even when the feature is disabled. (#66420)
12341238
self.tcx().sess.delay_span_bug(DUMMY_SP, &format!(
12351239
"trait_ref_to_existential called on {:?} with non-dummy Self",
12361240
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)