about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-01-07 13:46:05 +0900
committerGitHub <noreply@github.com>2020-01-07 13:46:05 +0900
commit9ef3b2ca2a9d37657ea1b5de056dd7324dca0632 (patch)
tree23d33c63262f5f834c10667d956ce50f38b4f02d /src/test
parent6d9913d51b0e5b898f5d42a21bdcd9510658ec9c (diff)
parent9462c8babb8743a12ffa467dfc10f7b03a2f77c8 (diff)
downloadrust-9ef3b2ca2a9d37657ea1b5de056dd7324dca0632.tar.gz
rust-9ef3b2ca2a9d37657ea1b5de056dd7324dca0632.zip
Rollup merge of #67898 - matthewjasper:newtype-index-hygiene, r=Centril
Improve hygiene of `newtype_index`

`newtype_index` no longer needs `rustc_index::vec::Idx` to be in scope.

r? @Centril
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui-fulldeps/newtype_index.rs22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/test/ui-fulldeps/newtype_index.rs b/src/test/ui-fulldeps/newtype_index.rs
deleted file mode 100644
index fe68b394e5a..00000000000
--- a/src/test/ui-fulldeps/newtype_index.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// run-pass
-
-#![feature(rustc_private)]
-
-extern crate rustc_index;
-extern crate serialize as rustc_serialize;
-
-use rustc_index::{newtype_index, vec::Idx};
-
-newtype_index!(struct MyIdx { MAX = 0xFFFF_FFFA });
-
-use std::mem::size_of;
-
-fn main() {
-    assert_eq!(size_of::<MyIdx>(), 4);
-    assert_eq!(size_of::<Option<MyIdx>>(), 4);
-    assert_eq!(size_of::<Option<Option<MyIdx>>>(), 4);
-    assert_eq!(size_of::<Option<Option<Option<MyIdx>>>>(), 4);
-    assert_eq!(size_of::<Option<Option<Option<Option<MyIdx>>>>>(), 4);
-    assert_eq!(size_of::<Option<Option<Option<Option<Option<MyIdx>>>>>>(), 4);
-    assert_eq!(size_of::<Option<Option<Option<Option<Option<Option<MyIdx>>>>>>>(), 8);
-}