The plugin wrongly detects a duplicate function name. (A value named raw_match_pattern_endian has already been defined in this module [E0428]) when using conditional compilation.
#[cfg(target_endian = "little")]
const fn raw_match_pattern_endian(original: u64) -> u64 {
original
}
#[cfg(target_endian = "big")]
const fn raw_match_pattern_endian(original: u64) -> u64 {
(original & 0xff) << 56 | (original & 0xff00) << 40 | (original & 0xff0000) << 24 | (original & 0xff000000) << 8 | (original & 0xff00000000) >> 8 | (original & 0xff0000000000) >> 24 | (original & 0xff000000000000) >> 40 | (original & 0xff00000000000000) >> 56
}
Was also wondering about it as well, what if I have custom #[cfg(some_stuff)] and #[cfg(not(some_stuff))] next to it (which is quite a common pattern for conditionally compiled libraries). Currently the plugin reports duplicate function name.
I'm also getting this when dealing with type aliases that are conditional to the selected feature.
(Not sure if this is the right place to post this)
IntelliJ Rust plugin version: 0.2.106.2135-191
Rust toolchain version: 1.39.0
IDE name and version: CLion 2019.1.4
Operating system: macOS Catalina 10.15
/// The connection type (MySQL database).
#[cfg(feature = "mysql")]
pub type Connection = diesel::mysql::MysqlConnection;
/// The connection type (SQLite database).
#[cfg(feature = "sqlite")]
pub type Connection = diesel::sqlite::SqliteConnection;
/// The connection type (PostgreSQL database).
#[cfg(feature = "postgres")]
pub type Connection = diesel::pg::PgConnection;
@parkercouch Cargo features aren't supported yet (we're working on it). For more information, see https://github.com/intellij-rust/intellij-rust/pull/4488.
However, the original issue about target_endian seems to be fixed now:

Most helpful comment
@parkercouch Cargo features aren't supported yet (we're working on it). For more information, see https://github.com/intellij-rust/intellij-rust/pull/4488.
However, the original issue about

target_endianseems to be fixed now: