1
Fork 0

Don't drop parent substs when we have no generic parameters

This commit is contained in:
Michael Goulet 2022-08-22 04:15:05 +00:00
parent 3ce46b74aa
commit 6e83da1a2d

View file

@ -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> {