diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2019-05-12 18:51:40 +0100 |
|---|---|---|
| committer | Matthew Jasper <mjjasper1@gmail.com> | 2019-05-12 18:51:40 +0100 |
| commit | 9a4f0abd7a385416acf9d93b9d77ea1fdf755f93 (patch) | |
| tree | ba5fecdc3cd90b63de527557cf74720372a6c0ea | |
| parent | 1f5145e2735083475d586f4a6a1a389a090f30e4 (diff) | |
| download | rust-9a4f0abd7a385416acf9d93b9d77ea1fdf755f93.tar.gz rust-9a4f0abd7a385416acf9d93b9d77ea1fdf755f93.zip | |
Don't allow any ReScope in impl trait types
This shouldn't be possible any more, but if it does happen, emit an error rather than maybe panicking later when NLL finds a the ReScope. Impl trait in bindings is sufficiently broken that I don't think this breaks anything that works for it.
| -rw-r--r-- | src/librustc/infer/opaque_types/mod.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/librustc/infer/opaque_types/mod.rs b/src/librustc/infer/opaque_types/mod.rs index a8dca9062bd..4351f94df2f 100644 --- a/src/librustc/infer/opaque_types/mod.rs +++ b/src/librustc/infer/opaque_types/mod.rs @@ -611,10 +611,7 @@ impl<'cx, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for ReverseMapper<'cx, 'gcx, 'tcx> ty::ReLateBound(..) | // ignore `'static`, as that can appear anywhere - ty::ReStatic | - - // ignore `ReScope`, which may appear in impl Trait in bindings. - ty::ReScope(..) => return r, + ty::ReStatic => return r, _ => { } } |
