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