Skip to content

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

Merged
merged 6 commits into from
May 30, 2014
Merged

SnakeCaseLint #14520

merged 6 commits into from
May 30, 2014

Conversation

Ryman
Copy link
Contributor

@Ryman Ryman commented May 29, 2014

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.

@brson
Copy link
Contributor

brson commented May 29, 2014

👍

@alexcrichton
Copy link
Member

Awesome work, thanks!

@Ryman
Copy link
Contributor Author

Ryman commented May 30, 2014

@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

@DaGenix
Copy link

DaGenix commented May 30, 2014

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.

@Ryman
Copy link
Contributor Author

Ryman commented May 30, 2014

@alexcrichton Added allows for windows and anything additional that I'm suspicious of failing. Need a bors retry.

@DaGenix mostly agree, but I'd like to be able to allow each separately so perhaps just a naming change in future.

Ryman added 6 commits May 30, 2014 17:55
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]
@Ryman
Copy link
Contributor Author

Ryman commented May 30, 2014

@alexcrichton Rebased & io updated

bors added a commit that referenced this pull request May 30, 2014
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.
@bors bors closed this May 30, 2014
@bors bors merged commit 030b3a2 into rust-lang:master May 30, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 5, 2023
…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.
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.

5 participants