Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E0138 needs to be updated to new format #35510

Closed
sophiajt opened this issue Aug 8, 2016 · 0 comments
Closed

E0138 needs to be updated to new format #35510

sophiajt opened this issue Aug 8, 2016 · 0 comments

Comments

@sophiajt
Copy link
Contributor

sophiajt commented Aug 8, 2016

From: src/test/compile-fail/E0138.rs

E0138 needs a span_label, updating it from:

error[E0138]: multiple 'start' functions
  --> src/test/compile-fail/E0138.rs:17:1
   |
17 | fn f(argc: isize, argv: *const *const u8) -> isize {} //~ ERROR E0138
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To:

error[E0138]: multiple 'start' functions
  --> src/test/compile-fail/E0138.rs:17:1
   |
17 | fn f(argc: isize, argv: *const *const u8) -> isize {} //~ ERROR E0138
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ multiple `start` functions

Bonus: would be better to just underline the name of the function and show the other start function:

error[E0138]: multiple 'start' functions
  --> src/test/compile-fail/E0138.rs:17:1
   |
14 | fn foo(argc: isize, argv: *const *const u8) -> isize {}
        --- previous `start` function here 
...
17 | fn f(argc: isize, argv: *const *const u8) -> isize {} //~ ERROR E0138
   |    ^ multiple `start` functions
sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 10, 2016
Update E0138 to new format

Part of rust-lang#35233
Fix rust-lang#35510
r? @jonathandturner

![e0138](https://cloud.githubusercontent.com/assets/2716047/17562415/7200d93c-5f5d-11e6-98ff-e15c29f40e03.png)

Question: How can I only underline the function name ? I have observed the debug output and the struct of item, but I can't find the `Span` for function name. Should I modify the struct I get to save function name's position or there is another way to get it ? (I can only find `Span`s for function attributes, inputs, outputs, blocks)
sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 13, 2016
Update E0138 to new format

Part of rust-lang#35233
Fix rust-lang#35510
r? @jonathandturner

![e0138](https://cloud.githubusercontent.com/assets/2716047/17562415/7200d93c-5f5d-11e6-98ff-e15c29f40e03.png)

Question: How can I only underline the function name ? I have observed the debug output and the struct of item, but I can't find the `Span` for function name. Should I modify the struct I get to save function name's position or there is another way to get it ? (I can only find `Span`s for function attributes, inputs, outputs, blocks)
eddyb added a commit to eddyb/rust that referenced this issue Aug 14, 2016
Update E0138 to new format

Part of rust-lang#35233
Fix rust-lang#35510
r? @jonathandturner

![e0138](https://cloud.githubusercontent.com/assets/2716047/17562415/7200d93c-5f5d-11e6-98ff-e15c29f40e03.png)

Question: How can I only underline the function name ? I have observed the debug output and the struct of item, but I can't find the `Span` for function name. Should I modify the struct I get to save function name's position or there is another way to get it ? (I can only find `Span`s for function attributes, inputs, outputs, blocks)
eddyb added a commit to eddyb/rust that referenced this issue Aug 14, 2016
Update E0138 to new format

Part of rust-lang#35233
Fix rust-lang#35510
r? @jonathandturner

![e0138](https://cloud.githubusercontent.com/assets/2716047/17562415/7200d93c-5f5d-11e6-98ff-e15c29f40e03.png)

Question: How can I only underline the function name ? I have observed the debug output and the struct of item, but I can't find the `Span` for function name. Should I modify the struct I get to save function name's position or there is another way to get it ? (I can only find `Span`s for function attributes, inputs, outputs, blocks)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant