about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-08-22 04:15:05 +0000
committerMichael Goulet <michael@errs.io>2022-08-22 04:28:02 +0000
commit6e83da1a2d2332c6a68f83200067d3a7897b73e8 (patch)
tree240fe1bcff3c49d49a13141b28da4ffa6dd296c0 /compiler
parent3ce46b74aa3968b459cff3ce5c0d4f13e220b217 (diff)
downloadrust-6e83da1a2d2332c6a68f83200067d3a7897b73e8.tar.gz
rust-6e83da1a2d2332c6a68f83200067d3a7897b73e8.zip
Don't drop parent substs when we have no generic parameters
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_typeck/src/astconv/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_typeck/src/astconv/mod.rs b/compiler/rustc_typeck/src/astconv/mod.rs
index 5bb02bc246c..6bd38c36c2c 100644
--- a/compiler/rustc_typeck/src/astconv/mod.rs
+++ b/compiler/rustc_typeck/src/astconv/mod.rs
@@ -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> {