Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 8a5829c

Browse files
committed
Re-order mod declarations
1 parent 6cf7b5f commit 8a5829c

File tree

40 files changed

+122
-121
lines changed

40 files changed

+122
-121
lines changed

crates/base-db/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
33
#![warn(rust_2018_idioms, unused_lifetimes)]
44

5-
mod input;
65
mod change;
6+
mod input;
77

88
use std::panic;
99

crates/hir-def/src/body.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
//! Defines `Body`: a lowered representation of bodies of functions, statics and
22
//! consts.
33
mod lower;
4+
mod pretty;
5+
pub mod scope;
46
#[cfg(test)]
57
mod tests;
6-
pub mod scope;
7-
mod pretty;
88

99
use std::ops::Index;
1010

crates/hir-def/src/hir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
//!
1313
//! See also a neighboring `body` module.
1414
15-
pub mod type_ref;
1615
pub mod format_args;
16+
pub mod type_ref;
1717

1818
use std::fmt;
1919

crates/hir-def/src/macro_expansion_tests/mbe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
//! Tests specific to declarative macros, aka macros by example. This covers
22
//! both stable `macro_rules!` macros as well as unstable `macro` macros.
33
4-
mod tt_conversion;
54
mod matching;
65
mod meta_syntax;
76
mod metavar_expr;
87
mod regression;
8+
mod tt_conversion;
99

1010
use expect_test::expect;
1111

crates/hir-def/src/macro_expansion_tests/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
//! write unit-tests (in fact, we used to do that), but that makes tests brittle
1010
//! and harder to understand.
1111
12-
mod mbe;
13-
mod builtin_fn_macro;
1412
mod builtin_derive_macro;
13+
mod builtin_fn_macro;
14+
mod mbe;
1515
mod proc_macros;
1616

1717
use std::{iter, ops::Range, sync};

crates/hir-def/src/nameres.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@
4848
//! the result
4949
5050
pub mod attr_resolution;
51-
pub mod proc_macro;
52-
pub mod diagnostics;
5351
mod collector;
52+
pub mod diagnostics;
5453
mod mod_resolution;
5554
mod path_resolution;
55+
pub mod proc_macro;
5656

5757
#[cfg(test)]
5858
mod tests;

crates/hir-expand/src/declarative.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! Compiled declarative macro expanders (`macro_rules!`` and `macro`)
12
use std::sync::OnceLock;
23

34
use base_db::{CrateId, Edition, VersionReq};

crates/hir-ty/src/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//! Type inference-based diagnostics.
2+
mod decl_check;
23
mod expr;
34
mod match_check;
45
mod unsafe_check;
5-
mod decl_check;
66

77
pub use crate::diagnostics::{
88
decl_check::{incorrect_case, CaseType, IncorrectCase},

crates/hir-ty/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ pub mod mir;
4141
pub mod primitive;
4242
pub mod traits;
4343

44-
#[cfg(test)]
45-
mod tests;
4644
#[cfg(test)]
4745
mod test_db;
46+
#[cfg(test)]
47+
mod tests;
4848

4949
use std::{
5050
collections::hash_map::Entry,

crates/hir-ty/src/mir.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ use hir_def::{
2121
};
2222
use la_arena::{Arena, ArenaMap, Idx, RawIdx};
2323

24+
mod borrowck;
2425
mod eval;
2526
mod lower;
26-
mod borrowck;
27-
mod pretty;
2827
mod monomorphization;
28+
mod pretty;
2929

3030
pub use borrowck::{borrowck_query, BorrowckResult, MutabilityReason};
3131
pub use eval::{

0 commit comments

Comments
 (0)