diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-02-10 13:18:02 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2018-03-13 11:21:30 -0400 |
| commit | 6d0f9319dfd4a115f64fd5e00be3749da5eda8bc (patch) | |
| tree | eb01c85e38cb513a2fabc6689f7e64040ed34851 /src/librustc/ty/instance.rs | |
| parent | 1d377d10a1c86152a49b46f446557c150fda655d (diff) | |
refactor `ParamEnv::empty(Reveal)` into two distinct methods
- `ParamEnv::empty()` -- does not reveal all, good for typeck - `ParamEnv::reveal_all()` -- does, good for trans - `param_env.with_reveal_all()` -- converts an existing parameter environment
Diffstat (limited to 'src/librustc/ty/instance.rs')
| -rw-r--r-- | src/librustc/ty/instance.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc/ty/instance.rs b/src/librustc/ty/instance.rs index 614158bafa6..ebb058c5d29 100644 --- a/src/librustc/ty/instance.rs +++ b/src/librustc/ty/instance.rs @@ -199,7 +199,7 @@ impl<'a, 'b, 'tcx> Instance<'tcx> { _ => { if Some(def_id) == tcx.lang_items().drop_in_place_fn() { let ty = substs.type_at(0); - if ty.needs_drop(tcx, ty::ParamEnv::empty(traits::Reveal::All)) { + if ty.needs_drop(tcx, ty::ParamEnv::reveal_all()) { debug!(" => nontrivial drop glue"); ty::InstanceDef::DropGlue(def_id, Some(ty)) } else { |
