Skip to content

Commit 6e83da1

Browse files
Don't drop parent substs when we have no generic parameters
1 parent 3ce46b7 commit 6e83da1

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_typeck/src/astconv

1 file changed

+1
-1
lines changed

compiler/rustc_typeck/src/astconv/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
365365
// here and so associated type bindings will be handled regardless of whether there are any
366366
// non-`Self` generic parameters.
367367
if generics.params.is_empty() {
368-
return (tcx.intern_substs(&[]), arg_count);
368+
return (tcx.intern_substs(parent_substs), arg_count);
369369
}
370370

371371
struct SubstsForAstPathCtxt<'a, 'tcx> {

0 commit comments

Comments
 (0)