File tree Expand file tree Collapse file tree 1 file changed +0
-31
lines changed
compiler/rustc_data_structures/src/tagged_ptr Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change 6262/// }
6363/// ```
6464///
65- // This is supposed to produce a compile error, but does not,
66- // see <https://github.com/rust-lang/rust/issues/110613> for more information.
67- //
68- // Using the same pattern twice results in a compile error:
69- //
70- // ```compile_fail
71- // # use rustc_data_structures::impl_tag;
72- // #[derive(Copy, Clone)]
73- // struct Unit;
74- //
75- // impl_tag! {
76- // impl Tag for Unit;
77- // Unit <=> 0,
78- // Unit <=> 1,
79- // }
80- // ```
81- //
82- // Using the same tag twice results in a compile error:
83- //
84- // ```compile_fail
85- // # use rustc_data_structures::impl_tag;
86- // #[derive(Copy, Clone)]
87- // enum E { A, B };
88- //
89- // impl_tag! {
90- // impl Tag for E;
91- // E::A <=> 0,
92- // E::B <=> 0,
93- // }
94- // ```
95- //
9665/// Not specifying all values results in a compile error:
9766///
9867/// ```compile_fail,E0004
You can’t perform that action at this time.
0 commit comments