Skip to content
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

Use consts instead of statics where appropriate #22876

Merged
merged 1 commit into from
Mar 3, 2015
Merged

Conversation

Florob
Copy link
Contributor

@Florob Florob commented Feb 27, 2015

This changes the type of some public constants/statics in libunicode.
Notably some &'static &'static [(char, char)] have changed
to &'static [(char, char)]. The regexp crate seems to be the
sole user of these, yet this is technically a [breaking-change]

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@bors
Copy link
Collaborator

bors commented Feb 28, 2015

☔ The latest upstream changes (presumably #22801) made this pull request unmergeable. Please resolve the merge conflicts.

@eddyb
Copy link
Member

eddyb commented Feb 28, 2015

I would add a lint for static items that have a value which could be borrowed in a const - but that requires exposed rvalue promotion to 'static (already implemented behind the scenes), which is not here yet (@nikomatsakis "promised" an RFC a long time ago).

@bors
Copy link
Collaborator

bors commented Mar 2, 2015

☔ The latest upstream changes (presumably #22940) made this pull request unmergeable. Please resolve the merge conflicts.

@nikomatsakis
Copy link
Contributor

This looks good to me. I'd be happy to r+ a rebased version.

This changes the type of some public constants/statics in libunicode.
Notably some `&'static &'static [(char, char)]` have changed
to `&'static [(char, char)]`. The regexp crate seems to be the
sole user of these, yet this is technically a [breaking-change]
@Florob
Copy link
Contributor Author

Florob commented Mar 2, 2015

Rebased. r? @nikomatsakis

@nikomatsakis
Copy link
Contributor

@bors r+ f35f973 rollup

@bors
Copy link
Collaborator

bors commented Mar 3, 2015

☔ The latest upstream changes (presumably #22971) made this pull request unmergeable. Please resolve the merge conflicts.

Manishearth added a commit to Manishearth/rust that referenced this pull request Mar 3, 2015
 This changes the type of some public constants/statics in libunicode.
Notably some `&'static &'static [(char, char)]` have changed
to `&'static [(char, char)]`. The regexp crate seems to be the
sole user of these, yet this is technically a [breaking-change]
@bors bors merged commit f35f973 into rust-lang:master Mar 3, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants