We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dd07f1f + 070cd4e commit 35e2f13Copy full SHA for 35e2f13
crates/base-db/src/span.rs
@@ -151,15 +151,15 @@ impl fmt::Debug for HirFileIdRepr {
151
152
impl From<FileId> for HirFileId {
153
fn from(id: FileId) -> Self {
154
- assert!(id.index() < Self::MAX_FILE_ID);
+ assert!(id.index() < Self::MAX_FILE_ID, "FileId index {} is too large", id.index());
155
HirFileId(id.index())
156
}
157
158
159
impl From<MacroFileId> for HirFileId {
160
fn from(MacroFileId { macro_call_id: MacroCallId(id) }: MacroFileId) -> Self {
161
let id = id.as_u32();
162
- assert!(id < Self::MAX_FILE_ID);
+ assert!(id < Self::MAX_FILE_ID, "MacroCallId index {} is too large", id);
163
HirFileId(id | Self::MACRO_FILE_TAG_MASK)
164
165
0 commit comments