File tree 1 file changed +24
-1
lines changed
1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -1700,6 +1700,30 @@ To understand better how closures work in Rust, read:
1700
1700
https://doc.rust-lang.org/book/ch13-01-closures.html
1701
1701
"## ,
1702
1702
1703
+ E0566 : r##"
1704
+ Conflicting representation hints have been used on a same item.
1705
+
1706
+ Erroneous code example:
1707
+
1708
+ ```compile_fail,E0566
1709
+ # #![deny(warnings)]
1710
+ # fn main() {
1711
+ #[repr(u32, u64)] // error!
1712
+ enum Repr { A }
1713
+ # }
1714
+ ```
1715
+
1716
+ In most cases (if not all), using just one representation hint is more than
1717
+ enough. If you want to have a representation hint depending on the current
1718
+ architecture, use `cfg_attr`. Example:
1719
+
1720
+ ```
1721
+ #[cfg_attr(linux, repr(u32))]
1722
+ #[cfg_attr(not(linux), repr(u64))]
1723
+ enum Repr { A }
1724
+ ```
1725
+ "## ,
1726
+
1703
1727
E0580 : r##"
1704
1728
The `main` function was incorrectly declared.
1705
1729
@@ -2097,7 +2121,6 @@ rejected in your own crates.
2097
2121
E0490 , // a value of type `..` is borrowed for too long
2098
2122
E0495 , // cannot infer an appropriate lifetime due to conflicting
2099
2123
// requirements
2100
- E0566 , // conflicting representation hints
2101
2124
E0623 , // lifetime mismatch where both parameters are anonymous regions
2102
2125
E0628 , // generators cannot have explicit parameters
2103
2126
E0631 , // type mismatch in closure arguments
You can’t perform that action at this time.
0 commit comments