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