Skip to content

Rename target_word_size #20421

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

Closed
sanxiyn opened this issue Jan 2, 2015 · 7 comments · Fixed by #20680
Closed

Rename target_word_size #20421

sanxiyn opened this issue Jan 2, 2015 · 7 comments · Fixed by #20680
Assignees

Comments

@sanxiyn
Copy link
Member

sanxiyn commented Jan 2, 2015

At the moment, target_word_size in conditional compilation attributes actually refers to pointer size. Since word size (or register size) and pointer size are different concepts, it should be renamed.

@huonw
Copy link
Member

huonw commented Jan 2, 2015

Seems like target_pointer_size would be more appropriate.

@nagisa
Copy link
Member

nagisa commented Jan 2, 2015

Do we want to do some transition period? I.e.

  • Support both target_word_size and target_pointer_size
  • Release a snapshot
  • Remove the support for target_word size

@thestinger
Copy link
Contributor

I doubt there are a significant number of users outside of the low-level standard libraries. Most of those (like big integers) are likely incorrect because they really do want the largest hardware integer type.

@nagisa
Copy link
Member

nagisa commented Jan 3, 2015

@thestinger the problem here are not users outside, but the std itself. If we just rename the attribute to something else, the code will build with stage0 but not stage > 0 and were we to replace the use of attributes everywhere as well, compiler would not build with stage0.

@brson brson assigned nrc Jan 7, 2015
@sfackler
Copy link
Member

sfackler commented Jan 7, 2015

You don't necessarily need a period of time with support for both. You can either just stick both attributes on the types with one used at stage0 and one after, or use cfg_attr if you don't want the unused attribute warnings.

nrc added a commit to nrc/rust that referenced this issue Jan 7, 2015
alexcrichton added a commit to alexcrichton/rust that referenced this issue Jan 8, 2015
@codyps
Copy link
Contributor

codyps commented Feb 11, 2015

Was there a reason this didn't also adjust the json field name?

@nagisa
Copy link
Member

nagisa commented Feb 11, 2015

@jmesmon None. You should fill a new issue about that.

codyps added a commit to codyps/rust that referenced this issue Feb 12, 2015
…et-pointer-width to match rust struct field

Completes rust-lang#20421 (which renamed the struct field but not the json field)

If you're using the json target specificating interface, this is
potentially a:
[breaking-change]
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

Successfully merging a pull request may close this issue.

7 participants