]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/unsafe_removed_from_name.rs
New upstream version 1.23.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / unsafe_removed_from_name.rs
CommitLineData
abe05a73
XL
1
2
ea8adc8c
XL
3#![allow(unused_imports)]
4#![allow(dead_code)]
5#![warn(unsafe_removed_from_name)]
6
7use std::cell::{UnsafeCell as TotallySafeCell};
8
9use std::cell::UnsafeCell as TotallySafeCellAgain;
10
11// Shouldn't error
12use std::cell::{UnsafeCell as SuperDangerousUnsafeCell};
13use std::cell::{UnsafeCell as Dangerunsafe};
14use std::cell::UnsafeCell as Bombsawayunsafe;
15use std::cell::{RefCell as ProbablyNotUnsafe};
16use std::cell::RefCell as RefCellThatCantBeUnsafe;
17
18mod mod_with_some_unsafe_things {
19 pub struct Safe {}
20 pub struct Unsafe {}
21}
22
23use mod_with_some_unsafe_things::Unsafe as LieAboutModSafety;
24
25// Shouldn't error
26use mod_with_some_unsafe_things::Safe as IPromiseItsSafeThisTime;
27use mod_with_some_unsafe_things::Unsafe as SuperUnsafeModThing;
28
29fn main() {}