Skip to content

Commit

Permalink
Don't drop parent substs when we have no generic parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Aug 22, 2022
1 parent 3ce46b7 commit 6e83da1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_typeck/src/astconv/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
// here and so associated type bindings will be handled regardless of whether there are any
// non-`Self` generic parameters.
if generics.params.is_empty() {
return (tcx.intern_substs(&[]), arg_count);
return (tcx.intern_substs(parent_substs), arg_count);
}

struct SubstsForAstPathCtxt<'a, 'tcx> {
Expand Down

0 comments on commit 6e83da1

Please sign in to comment.