News for hackers. Stuff that matters.
Re:I love building a startup in Rust. I wouldn't pick it again by steveklabnik on Friday February 17, 2023 @02:24PM (#34839092)
esteban of course gave you an excellent response already, but just another bit of like, context here: while it may not be on rustc, the developers want to go beyond the norm here. rustc understands if you write async/await syntax like JavaScript, and then directly proposes that you switch to the Rust syntax:

    pub async fn foo() -> i32 {
       unimplemented(); 
    }
    
    pub async fn bar() {
        let f = await foo();
    }
gives

    error: incorrect use of `await`
     --> src/lib.rs:6:13
      |
    6 |     let f = await foo();
      |             ^^^^^^^^^ help: `await` is a postfix operation: `foo().await`
It isn't on rustc to understand this either, but it helps a bunch of people, so the team does it anyway.
Re:I love building a startup in Rust. I wouldn't pick it again by pdimitar on Friday February 17, 2023 @04:07PM (#34840593)
Check sibling reply. Sadly I never wrote those down. :(

I'll definitely do so going forward.

The problem is with that is the impostor syndrome: I legitimately can't tell if I am an idiot and skipped some basic Rust training, or the error messages are truly confusing and unproductive.

But your messages help. I'll just write those down and send them to GitHub's issue list.

Re:I love building a startup in Rust. I wouldn't pick it again by steveklabnik on Friday February 17, 2023 @05:53PM (#34841730)
I’m not working on Rust anymore, but the previous stated position on this, which as far as I know is still the case, is that if it’s confusing, you should file. Worst case scenario is “sort we can’t fix that” but it’s not an imposition to file issues. More is better. Because exactly as Esteban said, information is valuable. Even duplicates are valuable: they indicate that more than one person has run into this, and therefore it’s more valuable than an obscure issue only one person sees.
Re:I love building a startup in Rust. I wouldn't pick it again by estebank on Friday February 17, 2023 @08:01PM (#34842746)
I can confirm all of this is still the case.

> I legitimately can't tell if I am an idiot and skipped some basic Rust training, or the error messages are truly confusing and unproductive.

It doesn't make a difference. The compiler can't assume any level of proficiency. If a topic requires you to read the docs, it should tell you so. There are some "basic" things it relies on, but for anyone with any level of experience programming should be able to read a diagnostic and either understand it outright or have enough clues about what to search for. So "this error is confusing because I didn't read chapter N of The Book" can be simplified to "this error is confusing."

Re:I love building a startup in Rust. I wouldn't pick it again by steveklabnik on Friday February 17, 2023 @08:09PM (#34842789)
Excellent. Keep up the good work, I (and others) appreciate it.