]> git.lizzy.rs Git - rust.git/commitdiff
Fix failing tests
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>
Sun, 7 Jul 2019 22:00:54 +0000 (01:00 +0300)
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>
Wed, 10 Jul 2019 21:12:57 +0000 (00:12 +0300)
src/librustc/ty/query/on_disk_cache.rs
src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr

index d0be13a711117c9f576b6d40e3d19806bc8af524..a508d9846bce3c059c74863c15b827f2c5904a1b 100644 (file)
@@ -610,8 +610,9 @@ fn specialized_decode(&mut self) -> Result<Span, Self::Error> {
             }
             TAG_EXPANSION_INFO_SHORTHAND => {
                 let pos = AbsoluteBytePos::decode(self)?;
-                if let Some(cached_ctxt) = self.synthetic_expansion_infos.borrow().get(&pos) {
-                    Span::new(lo, hi, *cached_ctxt)
+                let cached_ctxt = self.synthetic_expansion_infos.borrow().get(&pos).cloned();
+                if let Some(ctxt) = cached_ctxt {
+                    Span::new(lo, hi, ctxt)
                 } else {
                     let expn_info =
                         self.with_position(pos.to_usize(), |this| ExpnInfo::decode(this))?;
index 1cc53db2c364c750141d7ac18a0859cb301964c6..38304e7f3f934e210d6666fe684cdf304609d59b 100644 (file)
@@ -1,8 +1,8 @@
 error[E0658]: use of unstable library feature 'custom_test_frameworks': custom test frameworks are an unstable feature
-  --> $DIR/feature-gate-custom_test_frameworks.rs:3:1
+  --> $DIR/feature-gate-custom_test_frameworks.rs:3:3
    |
 LL | #[test_case]
-   | ^^^^^^^^^^^^
+   |   ^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/50297
    = help: add `#![feature(custom_test_frameworks)]` to the crate attributes to enable