about summary refs log tree commit diff
path: root/src/liballoc/tests/vec_deque.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-02-03 18:40:23 +0000
committerbors <bors@rust-lang.org>2019-02-03 18:40:23 +0000
commit4f4f4a40b6c7bcb6fa07ee6575e8a9759ba08922 (patch)
tree28a3d197b75da9125cc8f6de8d912f75c56e7e48 /src/liballoc/tests/vec_deque.rs
parente858c2637fa5bac40ac450628b30c56c2b4327b4 (diff)
parent2396780cdaedf097dd6a8f3927749bcaf5b1238b (diff)
downloadrust-4f4f4a40b6c7bcb6fa07ee6575e8a9759ba08922.tar.gz
rust-4f4f4a40b6c7bcb6fa07ee6575e8a9759ba08922.zip
Auto merge of #58081 - Centril:liballoc-2018, r=oli-obk
Transition liballoc to Rust 2018

This transitions liballoc to Rust 2018 edition and applies relevant idiom lints.
I also did a small bit of drive-by cleanup along the way.

r? @oli-obk

I started with liballoc since it seemed easiest. In particular, adding `edition = "2018"` to libcore gave me way too many errors due to stdsimd. Ideally we should be able to continue this crate-by-crate until all crates use 2018.
Diffstat (limited to 'src/liballoc/tests/vec_deque.rs')
-rw-r--r--src/liballoc/tests/vec_deque.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/liballoc/tests/vec_deque.rs b/src/liballoc/tests/vec_deque.rs
index c9d16a06b47..aa49bdb0090 100644
--- a/src/liballoc/tests/vec_deque.rs
+++ b/src/liballoc/tests/vec_deque.rs
@@ -1,12 +1,13 @@
-use std::collections::VecDeque;
 use std::fmt::Debug;
-use std::collections::vec_deque::{Drain};
+use std::collections::{VecDeque, vec_deque::Drain};
 use std::collections::CollectionAllocErr::*;
 use std::mem::size_of;
 use std::{usize, isize};
 
-use self::Taggy::*;
-use self::Taggypar::*;
+use crate::hash;
+
+use Taggy::*;
+use Taggypar::*;
 
 #[test]
 fn test_simple() {
@@ -583,7 +584,7 @@ fn test_hash() {
     y.push_back(2);
     y.push_back(3);
 
-    assert!(::hash(&x) == ::hash(&y));
+    assert!(hash(&x) == hash(&y));
 }
 
 #[test]
@@ -599,7 +600,7 @@ fn test_hash_after_rotation() {
             *elt -= 1;
         }
         ring.push_back(len - 1);
-        assert_eq!(::hash(&orig), ::hash(&ring));
+        assert_eq!(hash(&orig), hash(&ring));
         assert_eq!(orig, ring);
         assert_eq!(ring, orig);
     }
@@ -998,7 +999,7 @@ struct DropCounter<'a> {
     count: &'a mut u32,
 }
 
-impl<'a> Drop for DropCounter<'a> {
+impl Drop for DropCounter<'_> {
     fn drop(&mut self) {
         *self.count += 1;
     }