Skip to content

Use consts instead of statics where appropriate#22876

Merged
bors merged 1 commit into
rust-lang:masterfrom
Florob:const
Mar 3, 2015
Merged

Use consts instead of statics where appropriate#22876
bors merged 1 commit into
rust-lang:masterfrom
Florob:const

Conversation

@Florob

@Florob Florob commented Feb 27, 2015

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

r? @nikomatsakis

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

@bors

bors commented Feb 28, 2015

Copy link
Copy Markdown
Collaborator

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

@eddyb

eddyb commented Feb 28, 2015

Copy link
Copy Markdown
Contributor

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

bors commented Mar 2, 2015

Copy link
Copy Markdown
Collaborator

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

@nikomatsakis

Copy link
Copy Markdown
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

Florob commented Mar 2, 2015

Copy link
Copy Markdown
Contributor Author

Rebased. r? @nikomatsakis

@nikomatsakis

Copy link
Copy Markdown
Contributor

@bors r+ f35f973 rollup

@bors

bors commented Mar 3, 2015

Copy link
Copy Markdown
Collaborator

☔ 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
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 this pull request may close these issues.

5 participants