]> git.lizzy.rs Git - rust.git/blob - tests/ui/unsafe_removed_from_name.rs
Merge pull request #1520 from Manishearth/rustup
[rust.git] / tests / ui / unsafe_removed_from_name.rs
1 #![feature(plugin)]
2 #![plugin(clippy)]
3 #![allow(unused_imports)]
4 #![allow(dead_code)]
5 #![deny(unsafe_removed_from_name)]
6
7 use std::cell::{UnsafeCell as TotallySafeCell};
8
9
10 use std::cell::UnsafeCell as TotallySafeCellAgain;
11
12
13 // Shouldn't error
14 use std::cell::{UnsafeCell as SuperDangerousUnsafeCell};
15 use std::cell::{UnsafeCell as Dangerunsafe};
16 use std::cell::UnsafeCell as Bombsawayunsafe;
17 use std::cell::{RefCell as ProbablyNotUnsafe};
18 use std::cell::RefCell as RefCellThatCantBeUnsafe;
19
20 mod mod_with_some_unsafe_things {
21     pub struct Safe {}
22     pub struct Unsafe {}
23 }
24
25 use mod_with_some_unsafe_things::Unsafe as LieAboutModSafety;
26
27
28 // Shouldn't error
29 use mod_with_some_unsafe_things::Safe as IPromiseItsSafeThisTime;
30 use mod_with_some_unsafe_things::Unsafe as SuperUnsafeModThing;
31
32 fn main() {}