Skip to content

Commit 5f09349

Browse files
committed
switch to core::hint::unreachable_unchecked
1 parent 6ce83aa commit 5f09349

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ fn unnamed_fields_return(
201201
pub unsafe fn #function_name_val_unchecked(self) -> #returns_val {
202202
match self {
203203
Self::#variant_name(#matches) => (#matches),
204-
_ => std::hint::unreachable_unchecked(),
204+
_ => core::hint::unreachable_unchecked(),
205205
}
206206
}
207207

@@ -210,7 +210,7 @@ fn unnamed_fields_return(
210210
pub unsafe fn #function_name_ref_unchecked(&self) -> #returns_ref {
211211
match self {
212212
Self::#variant_name(#matches) => (#matches),
213-
_ => std::hint::unreachable_unchecked(),
213+
_ => core::hint::unreachable_unchecked(),
214214
}
215215
}
216216

@@ -219,7 +219,7 @@ fn unnamed_fields_return(
219219
pub unsafe fn #function_name_mut_ref_unchecked(&mut self) -> #returns_mut_ref {
220220
match self {
221221
Self::#variant_name(#matches) => (#matches),
222-
_ => std::hint::unreachable_unchecked(),
222+
_ => core::hint::unreachable_unchecked(),
223223
}
224224
}
225225
)
@@ -322,7 +322,7 @@ fn named_fields_return(
322322
pub unsafe fn #function_name_val_unchecked(self) -> #returns_val {
323323
match self {
324324
Self::#variant_name{ #matches } => (#matches),
325-
_ => std::hint::unreachable_unchecked(),
325+
_ => core::hint::unreachable_unchecked(),
326326
}
327327
}
328328

@@ -331,7 +331,7 @@ fn named_fields_return(
331331
pub unsafe fn #function_name_ref_unchecked(&self) -> #returns_ref {
332332
match self {
333333
Self::#variant_name{ #matches } => (#matches),
334-
_ => std::hint::unreachable_unchecked(),
334+
_ => core::hint::unreachable_unchecked(),
335335
}
336336
}
337337

@@ -340,7 +340,7 @@ fn named_fields_return(
340340
pub unsafe fn #function_name_mut_ref_unchecked(&mut self) -> #returns_mut_ref {
341341
match self {
342342
Self::#variant_name{ #matches } => (#matches),
343-
_ => std::hint::unreachable_unchecked(),
343+
_ => core::hint::unreachable_unchecked(),
344344
}
345345
}
346346
)

0 commit comments

Comments
 (0)