Skip to content

librustc_mir: Make qualify_min_const_fn module public - #57342

Merged
bors merged 1 commit into
rust-lang:masterfrom
phansch:make_public
Jan 5, 2019
Merged

librustc_mir: Make qualify_min_const_fn module public#57342
bors merged 1 commit into
rust-lang:masterfrom
phansch:make_public

Conversation

@phansch

Copy link
Copy Markdown
Contributor

Trying to write a const_fn lint for Clippy. @oli-obk suggested
here to use the is_min_const_fn function from the
qualify_min_const_fn module. However, the module is currently private
and this commit makes it public.

I lack any historical knowledge of the development of the const_fn
feature, so I'm not sure if it was private on purpose or not. fwiw, all
modules are already public except qualify_min_const_fn.

r? @oli-obk

Trying to write a `const_fn` lint for Clippy. @oli-obk suggested
[here][link] to use the `is_min_const_fn` function from the
`qualify_min_const_fn` module. However, the module is currently private
and this commit makes it public.
I lack any historical knowledge of the development of the `const_fn`
feature, so I'm not sure if it was private on purpose or not. fwiw, all
modules are already public except `qualify_min_const_fn`.
[link]: rust-lang/rust-clippy#2440 (comment)
@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 4, 2019
@Centril

Copy link
Copy Markdown
Contributor

Seems fine; ofc we don't guarantee that this module will always exist so things may change, but I don't see any big harm in doing this now and it has a major upside...

@bors r+ rollup

@bors

bors commented Jan 4, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 79ea93c has been approved by Centril

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 4, 2019
kennytm added a commit to kennytm/rust that referenced this pull request Jan 5, 2019
librustc_mir: Make qualify_min_const_fn module public
Trying to write a `const_fn` lint for Clippy. @oli-obk suggested
[here][link] to use the `is_min_const_fn` function from the
`qualify_min_const_fn` module. However, the module is currently private
and this commit makes it public.
I lack any historical knowledge of the development of the `const_fn`
feature, so I'm not sure if it was private on purpose or not. fwiw, all
modules are already public except `qualify_min_const_fn`.
r? @oli-obk
[link]: rust-lang/rust-clippy#2440 (comment)
@kennytmkennytm mentioned this pull request Jan 5, 2019
bors added a commit that referenced this pull request Jan 5, 2019
Rollup of 17 pull requests
Successful merges:
- #57219 (Remove some unused code)
- #57229 (Fix#56806 by using `delay_span_bug` in object safety layout sanity checks)
- #57233 (Rename and fix nolink-with-link-args test)
- #57238 (Fix backtraces for inlined functions on Windows)
- #57249 (Fix broken links to second edition TRPL.)
- #57267 (src/jemalloc is gone, remove its mention from COPYRIGHT)
- #57273 (Update the stdsimd submodule)
- #57278 (Add Clippy to config.toml.example)
- #57295 (Fix 'be be' constructs)
- #57311 (VaList::copy should not require a mutable ref)
- #57312 (`const fn` is no longer coming soon (const keyword docs))
- #57313 (Improve Box<T> -> Pin<Box<T>> conversion)
- #57314 (Fix repeated word typos)
- #57326 (Doc rewording, use the same name `writer`)
- #57338 (rustdoc: force binary filename for compiled doctests)
- #57342 (librustc_mir: Make qualify_min_const_fn module public)
- #57343 (Calculate privacy access only via query)
Failed merges:
- #57340 (Use correct tracking issue for c_variadic)
r? @ghost
@bors
bors merged commit 79ea93c into rust-lang:masterJan 5, 2019
@phansch
phansch deleted the make_public branch January 5, 2019 22:19
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@phansch@Centril@bors@oli-obk@rust-highfive