diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-07-08 01:00:54 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-07-11 00:12:57 +0300 |
| commit | 7b74d72d9a4414f088d7f638343d5d8a7c67084a (patch) | |
| tree | 43f8c5ed458c7962efe68b0c13b294360db57df4 | |
| parent | baddce5155f7358af319818b10c992790dc8c572 (diff) | |
| download | rust-7b74d72d9a4414f088d7f638343d5d8a7c67084a.tar.gz rust-7b74d72d9a4414f088d7f638343d5d8a7c67084a.zip | |
Fix failing tests
| -rw-r--r-- | src/librustc/ty/query/on_disk_cache.rs | 5 | ||||
| -rw-r--r-- | src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/librustc/ty/query/on_disk_cache.rs b/src/librustc/ty/query/on_disk_cache.rs index d0be13a7111..a508d9846bc 100644 --- a/src/librustc/ty/query/on_disk_cache.rs +++ b/src/librustc/ty/query/on_disk_cache.rs @@ -610,8 +610,9 @@ impl<'a, 'tcx> SpecializedDecoder<Span> for CacheDecoder<'a, 'tcx> { } 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))?; diff --git a/src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr b/src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr index 1cc53db2c36..38304e7f3f9 100644 --- a/src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr +++ b/src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr @@ -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 |
