Skip to content

Move the HIR CFG to rustc_ast_borrowck - #64231

Merged
bors merged 1 commit into
rust-lang:masterfrom
matthewjasper:move-ast-cfg
Sep 7, 2019
Merged

Move the HIR CFG to rustc_ast_borrowck#64231
bors merged 1 commit into
rust-lang:masterfrom
matthewjasper:move-ast-cfg

Conversation

@matthewjasper

Copy link
Copy Markdown
Contributor

No new code should be using it.

No new code should be using it.
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @zackmdavis

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

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 6, 2019
@Centril

Copy link
Copy Markdown
Contributor

This is great! 🎉 -- Cannot wait to ditch ::cfg.

r? @Centril@bors r+

@bors

bors commented Sep 6, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 10f46b6 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 Sep 6, 2019
Centril added a commit to Centril/rust that referenced this pull request Sep 7, 2019
Move the HIR CFG to `rustc_ast_borrowck`
No new code should be using it.
@CentrilCentril mentioned this pull request Sep 7, 2019
bors added a commit that referenced this pull request Sep 7, 2019
Rollup of 10 pull requests
Successful merges:
- #63919 (Use hygiene for AST passes)
- #63927 (Filter linkcheck spurious failure)
- #64149 (rustc_codegen_llvm: give names to non-alloca variable values.)
- #64192 (Bail out when encountering likely missing turbofish in parser)
- #64231 (Move the HIR CFG to `rustc_ast_borrowck`)
- #64233 (Correct pluralisation of various diagnostic messages)
- #64236 (reduce visibility)
- #64240 (Include compiler-rt in the source tarball)
- #64241 ([doc] Added more prereqs and note about default directory)
- #64243 (Move injection of attributes from command line to `libsyntax_ext`)
Failed merges:
r? @ghost
@bors
bors merged commit 10f46b6 into rust-lang:masterSep 7, 2019
@mati865mati865 mentioned this pull request Sep 7, 2019
@matthewjasper
matthewjasper deleted the move-ast-cfg branch September 7, 2019 20:28
@llogiq

Copy link
Copy Markdown
Contributor

So...how do we access librustc_ast_borrowck from clippy? Changing the use statement in our cognitive_complexity lint to use librustc_ast_borrowck::cfg::CFG doesn't work because cargo doesn't find librustc_ast_borrowck.

@tesuji

Copy link
Copy Markdown
Contributor

Probably just add extern crate rustc_ast_borrowck; in
https://github.com/rust-lang/rust-clippy/blob/f30bf69ec7af4366e64916f32566f3a894edd593/clippy_lints/src/lib.rs#L22-L38
I tried this earlier but I cannot sort out this error:

% cargo check --all --all-targets -- Compiling clippy-mini-macro-test v0.2.0(/home/lzutao/forked/rust/clippy/mini-macro)Compiling clippy_lints v0.0.212(/home/lzutao/forked/rust/clippy/clippy_lints) error[E0616]: field `graph` of struct `rustc_ast_borrowck::cfg::CFG` is private --> clippy_lints/src/cognitive_complexity.rs:51:17 | 51 | let n = cfg.graph.len_nodes()asu64; | ^^^^^^^^^ error[E0616]: field `graph` of struct `rustc_ast_borrowck::cfg::CFG` is private --> clippy_lints/src/cognitive_complexity.rs:52:17 | 52 | let e = cfg.graph.len_edges()asu64; | ^^^^^^^^^ 

@matthewjasper

Copy link
Copy Markdown
ContributorAuthor

I'll open a PR to remove the use of CFG from clippy, it's not going to be around for that much longer.

@hanna-kruppehanna-kruppe mentioned this pull request Jan 2, 2020
3 tasks
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.

7 participants

@matthewjasper@rust-highfive@Centril@bors@llogiq@tesuji@zackmdavis