Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some refactorings & update Chalk #1532

Merged
merged 5 commits into from Jul 15, 2019

Conversation

@flodiebold
Copy link
Collaborator

commented Jul 14, 2019

This does some of the renamings proposed in #1515, refactors InferenceContext a bit, and does a Cargo update, including fixing the build since I broke it by already pushing an updated branch to my Chalk fork 馃槥
We could also consider switching back to Chalk master; I couldn't reproduce any hangs with the floundering even on the rustc repo...

@matklad

This comment has been minimized.

Copy link
Collaborator

commented Jul 14, 2019

Yeah, let鈥檚 switch to master if this no longer hangs! Long term, we would solve both fuel and cancellation

@matklad
Copy link
Collaborator

left a comment

LGTM, left a couple of comments

type_of_expr: ArenaMap<ExprId, Ty>,
type_of_pat: ArenaMap<PatId, Ty>,
diagnostics: Vec<InferenceDiagnostic>,
result: InferenceResult,

This comment has been minimized.

Copy link
@matklad

matklad Jul 14, 2019

Collaborator

馃憤

let name = trait_.name(db).unwrap_or_else(crate::Name::missing).to_string();
match &*name {
"Send" | "Sync" | "Sized" | "Fn" | "FnMut" | "FnOnce" => true,

This comment has been minimized.

Copy link
@matklad

matklad Jul 14, 2019

Collaborator

Should we have send sync here as well?

This comment has been minimized.

Copy link
@flodiebold

flodiebold Jul 15, 2019

Author Collaborator

Auto traits are treated as non-enumerable by Chalk anyway.

crates/ra_hir/src/ty/traits/chalk.rs Outdated Show resolved Hide resolved

flodiebold added some commits Jul 14, 2019

Remove blacklist, instead mark `Sized` as non-enumerable
This seems to be enough to prevent hanging in rust-analyzer, Chalk and the rustc
repo.

@flodiebold flodiebold force-pushed the flodiebold:floundering branch from 8ada87d to c8284d8 Jul 15, 2019

@flodiebold

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 15, 2019

bors r+

bors bot added a commit that referenced this pull request Jul 15, 2019

Merge #1532
1532: Some refactorings & update Chalk r=flodiebold a=flodiebold

This does some of the renamings proposed in #1515, refactors `InferenceContext` a bit, and does a Cargo update, including fixing the build since I broke it by already pushing an updated branch to my Chalk fork 馃槥 
We could also consider switching back to Chalk master; I couldn't reproduce any hangs with the floundering even on the rustc repo...

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
@bors

This comment has been minimized.

Copy link
Contributor

commented Jul 15, 2019

@bors bors bot merged commit c8284d8 into rust-analyzer:master Jul 15, 2019

2 checks passed

bors Build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can鈥檛 perform that action at this time.