Skip to content

E0265 needs to be updated to new format #35309

New issue

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

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

Already on GitHub? # to your account

Closed
sophiajt opened this issue Aug 4, 2016 · 5 comments
Closed

E0265 needs to be updated to new format #35309

sophiajt opened this issue Aug 4, 2016 · 5 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

Comments

@sophiajt
Copy link
Contributor

sophiajt commented Aug 4, 2016

From: src/test/compile-fail/issue-23302.rs

Error E0265 needs a span_label, updating it from:

error[E0265]: recursive constant
  --> src/test/compile-fail/issue-23302.rs:14:5
   |
14 |     A = X::A as isize, //~ ERROR E0265
   |     ^^^^^^^^^^^^^^^^^

To:

error[E0265]: recursive constant
  --> src/test/compile-fail/issue-23302.rs:14:5
   |
14 |     A = X::A as isize, //~ ERROR E0265
   |     ^^^^^^^^^^^^^^^^^ recursive constant

Bonus: I'm not sure how difficult this will be, but if we can underline the part of the constant that is causing the recursion, that might be even better.

error[E0265]: recursive constant
  --> src/test/compile-fail/issue-23302.rs:14:5
   |
14 |     A = X::A as isize, //~ ERROR E0265
   |         ^^^^ recursion not allowed in constant
@sophiajt sophiajt added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-diagnostics Area: Messages for errors, warnings, and lints E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels Aug 4, 2016
@yossi-k
Copy link
Contributor

yossi-k commented Aug 5, 2016

on it

@sophiajt
Copy link
Contributor Author

@yossi-k - I'm releasing this so someone else can volunteer since it's gone 19 days without a fix. There are other error codes if you're interested in fixing more.

@mikhail-m1
Copy link
Contributor

mikhail-m1 commented Aug 29, 2016

I try to understand how static recursive works, but I cannot find any example with enum which compiles.
But I found example witch one crash compiler:

const I : i32 = J;
const J : i32 = Foo::A;
enum Foo { A = I }
fn main() {}

May some RFC or other doc about this feature?

@sophiajt
Copy link
Contributor Author

You may want to ask around on #rust-internals on irc.mozilla.org.

Also, can you file an issue for the compiler crash?

@mikhail-m1
Copy link
Contributor

I'll create Issue about stack overflow and try to fix it
For now I've done next

error[E0265]: recursive constant
  --> src/test/compile-fail/issue-23302.rs:14:5
   |
14 |     A = X::A as isize, //~ ERROR E0265
   |         ^^^^^^^^^^^^^ recursion not allowed in constant

It's not the aim but better then now
I'll try to improve it later

sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 30, 2016
update E0265 to new format

Fixes rust-lang#35309 as part of rust-lang#35233.
I've describe partially bonus achieve in rust-lang#35309

r? @jonathandturner
sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 31, 2016
update E0265 to new format

Fixes rust-lang#35309 as part of rust-lang#35233.
I've describe partially bonus achieve in rust-lang#35309

r? @jonathandturner
sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 31, 2016
update E0265 to new format

Fixes rust-lang#35309 as part of rust-lang#35233.
I've describe partially bonus achieve in rust-lang#35309

r? @jonathandturner
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Projects
None yet
Development

No branches or pull requests

3 participants