Skip to content

E0060 and E0061 bonus improvements for error messages #35290

Closed

Description

@leikahing

cc @GuillaumeGomez

This issue tracks the bonus portions of issues #35215 and #35216. I worked on the span_label fixes for them and @jaredwy said he would take on the bonus portion.

Bonus for E0060:

error[E0060]: this function takes at least 1 parameter but 0 parameters were supplied
  --> src/test/compile-fail/E0060.rs:16:14
   |
16 |     unsafe { printf(); } //~ ERROR E0060
   |              ^^^^^^^^ expected at least 1 parameter
   |
   = note: the following parameter type was expected: *const u8

Bonus: There may be a better way of displaying the information from the note. Could it be part of the label?

Bonus for E0061:

error[E0061]: this function takes 2 parameters but 1 parameter was supplied
  --> src/test/compile-fail/E0061.rs:14:5
   |
14 |     f(0); //~ ERROR E0061
   |     ^^^^ expected 2 parameters
   |
   = note: the following parameter types were expected: u16, &str

error: aborting due to previous error

Bonus: the types could be incorporated into the label rather than a note (though we may want to avoid types with long names in the label)

Activity

  1. GuillaumeGomez commented on Aug 4, 2016

    @GuillaumeGomez
    Member

    Thanks for opening it @birryree!

    cc @jonathandturner

  2. KiChjang commented on Aug 24, 2016

    @KiChjang
    Contributor

    @jaredwy Are you still working on this?

  3. jaredwy commented on Aug 24, 2016

    @jaredwy

    @KiChjang I have been yup. :) wound up in hospital. So just no time to clean it up and push yet unfortunately.

    Sorry!

  4. sophiajt commented on Aug 24, 2016

    @sophiajt
    Contributor

    @jaredwy - woah, that's crazy! Hopefully things are (mostly) better now.

  5. GuillaumeGomez commented on Aug 25, 2016

    @GuillaumeGomez
    Member

    @jaredwy: Sorry, didn't see you took it and I did it. :-/ As apologies, I propose you to have a first possible lock on #35920 before we give them to others as well.

  6. jaredwy commented on Sep 1, 2016

    @jaredwy

    @jonathandturner All is well, thanks! Was expected surgery just managed to get in earlier :)

    @GuillaumeGomez that is ok :) Spent the past week on the couch. I might hit you up on that offer of an apology in way of mentoring on a bigger rust issue :D

  7. GuillaumeGomez commented on Sep 1, 2016

    @GuillaumeGomez
    Member

    @jaredwy: Let's do it like this then. Try to get better meanwhile!

  8. jaredwy commented on Sep 12, 2016

    @jaredwy

    @GuillaumeGomez great! will send you an email.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions