Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -943,10 +943,10 @@ impl Ord for UseSegment {
version_sort(ia, ib)
} else {
// snake_case < CamelCase < UPPER_SNAKE_CASE
if ia.starts_with(char::is_uppercase) && ib.starts_with(char::is_lowercase) {
if ia.starts_with(char::is_uppercase) && !ib.starts_with(char::is_uppercase) {
return Ordering::Greater;
}
if ia.starts_with(char::is_lowercase) && ib.starts_with(char::is_uppercase) {
if !ia.starts_with(char::is_uppercase) && ib.starts_with(char::is_uppercase) {
return Ordering::Less;
}
if is_upper_snake_case(ia) && !is_upper_snake_case(ib) {
Expand Down
22 changes: 22 additions & 0 deletions tests/target/issue-6333.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
pub use crate::r#_StructUtil_Compile::CanonCryptoItem;
Copy link
Contributor

Choose a reason for hiding this comment

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

Would probably be useful to add the // rustfmt-style_edition: 2015 comment to the start of the file. Also, it might be useful to include a separate test for // rustfmt-style_edition: 2024.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

pub use crate::r#_StructUtil_Compile::MessageID;
pub use crate::r#_Wrappers_Compile::Outcome;
pub use crate::software::amazon::crypt::dbencryptionsdk::stct::internaldafny::types::Action;
pub use crate::software::amazon::crypt::mat::internaldafny::types::AlgorithmSuiteInfo;
pub use crate::software::amazon::crypt::mat::internaldafny::types::EncryptedDataKey;
pub use crate::software::amazon::crypt::mat::internaldafny::types::EncryptionMaterials;
pub use crate::software::amazon::crypt::primitives::internaldafny::types::HMacInput;
pub use crate::software::amazon::crypt::primitives::internaldafny::types::IAwsPrimClient;
pub use dafny_runtime::_System::nat;
pub use dafny_runtime::int;
pub use dafny_runtime::itertools::Itertools;
pub use dafny_runtime::rd;
pub use dafny_runtime::string_utf16_of;
pub use dafny_runtime::truncate;
pub use dafny_runtime::DafnyCharUTF16;
pub use dafny_runtime::DafnyType;
pub use dafny_runtime::DafnyTypeEq;
pub use dafny_runtime::MapBuilder;
pub use dafny_runtime::Object;
pub use dafny_runtime::Sequence;
pub use std::rc::Rc;
Loading