diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-04-03 15:29:31 +0200 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-05-25 10:07:01 +0200 |
| commit | e694b63cd147512ad5e73ff4f9bee057e0c27c19 (patch) | |
| tree | bdf2dad3178352604ed4ea3d1f8b6923125c70e2 /src/librustc_mir/monomorphize | |
| parent | 9d82107f16185987048fdf06dae59efe3cf60924 (diff) | |
| download | rust-e694b63cd147512ad5e73ff4f9bee057e0c27c19.tar.gz rust-e694b63cd147512ad5e73ff4f9bee057e0c27c19.zip | |
Don't use `ty::Const` without immediately interning
Diffstat (limited to 'src/librustc_mir/monomorphize')
| -rw-r--r-- | src/librustc_mir/monomorphize/collector.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_mir/monomorphize/collector.rs b/src/librustc_mir/monomorphize/collector.rs index 91cf0fbb9b4..e0d6784789e 100644 --- a/src/librustc_mir/monomorphize/collector.rs +++ b/src/librustc_mir/monomorphize/collector.rs @@ -609,7 +609,7 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirNeighborCollector<'a, 'tcx> { fn visit_const(&mut self, constant: &&'tcx ty::Const<'tcx>, location: Location) { debug!("visiting const {:?} @ {:?}", *constant, location); - collect_const(self.tcx, **constant, self.param_substs, self.output); + collect_const(self.tcx, *constant, self.param_substs, self.output); self.super_const(constant); } @@ -1248,7 +1248,7 @@ fn def_id_to_string<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, fn collect_const<'a, 'tcx>( tcx: TyCtxt<'a, 'tcx, 'tcx>, - constant: ty::Const<'tcx>, + constant: &'tcx ty::Const<'tcx>, param_substs: SubstsRef<'tcx>, output: &mut Vec<MonoItem<'tcx>>, ) { |
