-
Notifications
You must be signed in to change notification settings - Fork 13.3k
SnakeCaseLint #14520
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
SnakeCaseLint #14520
Conversation
👍 |
Awesome work, thanks! |
@alexcrichton updated, you may want to just peek again at here as I reran the tests and realised I'd missed a case for default trait methods |
If this is extended to fields and locals (which I think is a good idea), it might make sense to replace the UppercaseVariables lint with this one since they'll end up doing pretty similar things. |
@alexcrichton Added @DaGenix mostly agree, but I'd like to be able to allow each separately so perhaps just a naming change in future. |
A number of functions/methods have been moved or renamed to align better with rust standard conventions. syntax::ext::mtwt::xorPush => xor_push syntax::parse::parser::Parser => Parser::new [breaking-change]
…rrors. A number of functions/methods have been moved or renamed to align better with rust standard conventions. std::reflect::MovePtrAdaptor => MovePtrAdaptor::new debug::reflect::MovePtrAdaptor => MovePtrAdaptor::new std::repr::ReprVisitor => ReprVisitor::new debug::repr::ReprVisitor => ReprVisitor::new rustuv::homing::HomingIO.go_to_IO_home => go_to_io_home [breaking-change]
A number of functions/methods have been moved or renamed to align better with rust standard conventions. serialize::ebml::reader::Doc => seriaize::ebml::Doc::new serialize::ebml::reader::Decoder => Decoder::new serialize::ebml::writer::Encoder => Encoder::new [breaking-change]
A number of functions/methods have been moved or renamed to align better with rust standard conventions. rustc::back::link::WriteOutputFile => write_output_file rustc::middle::ty::EmptyBuiltinBounds => empty_builtin_bounds rustc::middle::ty::AllBuiltinBounds => all_builtin_bounds rustc::middle::liveness::IrMaps => IrMaps::new rustc::middle::liveness::Liveness => Liveness::new rustc::middle::resolve::NameBindings => NameBindings::new rustc::middle::resolve::PrimitiveTypeTable => PrimitiveTypeTable::new rustc::middle::resolve::Resolver => Resolver::new rustc::middle::trans::datum::Datum => Datum::new rustc::middle::trans::datum::DatumBlock => DatumBlock::new rustc::middle::trans::datum::Rvalue => Rvalue::new rustc::middle::typeck::infer::new_ValsAndBindings => ::infer::unify::ValsAndBindings::new rustc::middle::typeck::infer::region_inference::RegionVarBindings => RegionVarBindings::new [breaking-change]
@alexcrichton Rebased & |
This enforces `snake_case` for functions and methods only. Might be worth extending it to fields and locals too at some point in the future. A number of breaking changes each detailed in the attached commits.
…ykril fix: unify types in `infer_expr_coerce_never()` Fixes rust-lang#14506 rust-lang#14506 turned out to be a regression in type inference. `infer_expr_coerce_never()` added in rust-lang#14251 allows never-to-any coercion but should also perform ordinary type unification in other cases.
This enforces
snake_case
for functions and methods only. Might be worth extending it to fields and locals too at some point in the future.A number of breaking changes each detailed in the attached commits.