about summary refs log tree commit diff
path: root/src/librustdoc/scrape_examples.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-06-10 08:35:03 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2022-06-10 08:35:03 +1000
commit7f51a1b97638780a3d22979d886384ad7903cc4e (patch)
treeb2260c5e219bed6457c4b351c0d57b0d3922185e /src/librustdoc/scrape_examples.rs
parent15f5622a53210099a19ab46ce2316494fb413d7c (diff)
downloadrust-7f51a1b97638780a3d22979d886384ad7903cc4e.tar.gz
rust-7f51a1b97638780a3d22979d886384ad7903cc4e.zip
Revert b983e42936feab29f6333e9835913afc6b4a394e.
Diffstat (limited to 'src/librustdoc/scrape_examples.rs')
-rw-r--r--src/librustdoc/scrape_examples.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/scrape_examples.rs b/src/librustdoc/scrape_examples.rs
index f6c599297fc..81ce56b3342 100644
--- a/src/librustdoc/scrape_examples.rs
+++ b/src/librustdoc/scrape_examples.rs
@@ -17,7 +17,7 @@ use rustc_middle::hir::map::Map;
 use rustc_middle::hir::nested_filter;
 use rustc_middle::ty::{self, TyCtxt};
 use rustc_serialize::{
-    opaque::{FileEncoder, MemDecoder},
+    opaque::{Decoder, FileEncoder},
     Decodable, Encodable,
 };
 use rustc_session::getopts;
@@ -336,7 +336,7 @@ pub(crate) fn load_call_locations(
         let mut all_calls: AllCallLocations = FxHashMap::default();
         for path in with_examples {
             let bytes = fs::read(&path).map_err(|e| format!("{} (for path {})", e, path))?;
-            let mut decoder = MemDecoder::new(&bytes, 0);
+            let mut decoder = Decoder::new(&bytes, 0);
             let calls = AllCallLocations::decode(&mut decoder);
 
             for (function, fn_calls) in calls.into_iter() {