#![cfg(feature = "const_mut_refs")] //currently breaking my main function
fn main() {
println!("Hello, world!");
}
Currently whenever I have this compiler flag on my nightly compiler my main function can't be found. It gives me the error:
"main function not found in crate insert_name_here consider adding a main function to src/main.rs"
I don't know who to inform about said error, but I know it's a nightly feature so I thought I should inform the community in some way. I tried to make the smallest reproducable version so others could tell me their experiences or if there was a way they could fix it.
I'd define this as a compiler error but not in the traditional sense, because the compiler is the one making the mistake.
for activating unstable language features on nightly; whereas the cfg syntax you used is for adding feature flags to your crate for conditional compilation.
Also, why have you got to be cross-posting this? Unmarked, and within <10min, isn't that a bit impatient? It just means that people collectively need to do duplicate work to answer the same question multiple times in multiple places.
My bad thought it'd be faster, but I will be more considerate in the future, It was honestly very spontaneous, I had an idea and I wanted to implement it and I encountered an error but I already found a solution. My apologies for the late reply.