-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Modernize type names in the compiler #26895
Conversation
e62e5f8
to
754aaea
Compare
|
@arielb1 totally okay with bike shedding or removal. I'll remove it and tack another commit on here. |
@@ -278,7 +278,7 @@ impl<'a, 'tcx> CombineFields<'a, 'tcx> { | |||
}; | |||
let u = ty.fold_with(&mut generalize); | |||
if generalize.cycle_detected { | |||
Err(ty::terr_cyclic_ty) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hate to ask for this, but I'd rather have ty::TypeError::CyclicTy
(i.e., not pub use all the names from the enum)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I wanted to do it, but wasn't sure how much pain it was to fix. I'll bite the bullet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would you be okay with just TypeError::Variant? I think it is slightly less verbose and just as clear.
lgtm |
r=me whenever you feel you've suffered enough :) |
+1, this always tripped me up. |
@bors r=nikomatsakis |
📌 Commit 19218ee has been approved by |
This PR modernizes some names in the type checker. The only remaining snake_case name in ty.rs is `ctxt` which should be resolved by @eddyb's pending refactor. We can bike shed over the names, it would just be nice to bring the type checker inline with modern Rust. r? @eddyb cc @nikomatsakis
This PR modernizes some names in the type checker. The only remaining snake_case name in ty.rs is
ctxt
which should be resolved by @eddyb's pending refactor. We can bike shed over the names, it would just be nice to bring the type checker inline with modern Rust.r? @eddyb
cc @nikomatsakis