Skip to content

Refactor inference #4399

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

nikomatsakis
Copy link
Contributor

A collection of refactorings that I found it hard/tiresome to divide:

Make extern fn() assignable to any closure type, rather than a subtype of the closure types.
Remove unused int_ty_set and float_ty_set
Refactor variable unification and make it more DRY
Do fn sub/lub/glb on the level of fn_sig
Rename infer::to_str::ToStr to infer::to_str::InferStr
Capitalize names of various types
Correct hashing of FnMeta

r? @pcwalton

eliminating use of deprecated features and more forwards compatible
with fn reform.
- Make `extern fn()` assignable to any closure type, rather than
  a subtype.
- Remove unused int_ty_set and float_ty_set
- Refactor variable unification and make it more DRY
- Do fn sub/lub/glb on the level of fn_sig
- Rename infer::to_str::ToStr to infer::to_str::InferStr
- Capitalize names of various types
- Correct hashing of FnMeta
float_ty_set(FLOAT_TY_SET_FLOAT | FLOAT_TY_SET_F32 | FLOAT_TY_SET_F64)
}

pub fn intersection(a: float_ty_set, b: float_ty_set) -> float_ty_set {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more floatersection jokes :(

@pcwalton
Copy link
Contributor

pcwalton commented Jan 9, 2013

r=me

@nikomatsakis
Copy link
Contributor Author

I added comments / refactored that Either<> enum. Pushed.

bors added a commit to rust-lang-ci/rust that referenced this pull request May 2, 2020
dont fire `possible_missing_comma` if intendation is present

Closes rust-lang#4399
changelog: dont fire `possible_missing_comma` if intendation is present

I suspect there is already a utils function for indentation (but searching indent didn't yield a function for that), and my solution is certainly not universal, but it's probably the best we can do.
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.

2 participants