Skip to content

Commit

Permalink
elided_named_lifetimes: allow elided 'static in assoc consts's types
Browse files Browse the repository at this point in the history
  • Loading branch information
GrigorenkoPV committed Aug 18, 2024
1 parent c726445 commit d2e0d11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_resolve/src/late.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2978,7 +2978,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
},
|this| {
this.visit_generics(generics);
this.visit_ty(ty);
this.visit_ty_do_not_warn_elided_static(ty);

// Only impose the restrictions of `ConstRibKind` for an
// actual constant expression in a provided default.
Expand Down Expand Up @@ -3191,7 +3191,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
);

this.visit_generics(generics);
this.visit_ty(ty);
this.visit_ty_do_not_warn_elided_static(ty);
if let Some(expr) = expr {
// We allow arbitrary const expressions inside of associated consts,
// even if they are potentially not const evaluatable.
Expand Down

0 comments on commit d2e0d11

Please sign in to comment.