We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b1a91f commit 603aeb6Copy full SHA for 603aeb6
tests/ui/resolve/conflicting-primitive-names.rs
@@ -0,0 +1,30 @@
1
+//@ check-pass
2
+#![allow(non_camel_case_types)]
3
+#![allow(unused)]
4
+
5
+// Ensure that primitives do not interfere with user types of similar names
6
7
+macro_rules! make_ty_mod {
8
+ ($modname:ident, $ty:tt) => {
9
+ mod $modname {
10
+ struct $ty {
11
+ a: i32,
12
+ }
13
14
+ fn assignment() {
15
+ let $ty = ();
16
17
18
+ fn access(a: $ty) -> i32 {
19
+ a.a
20
21
22
+ };
23
+}
24
25
+make_ty_mod!(check_f16, f16);
26
+make_ty_mod!(check_f32, f32);
27
+make_ty_mod!(check_f64, f64);
28
+make_ty_mod!(check_f128, f128);
29
30
+fn main() {}
0 commit comments