fix: allow to name module std in project (#4353)
add missing prefix '::' for use of 'core' or 'std' module RELATED #4331
This commit is contained in:
1 parent
d5bc480f6f
commit
a66bffb487
5 files changed
+19
-19
No files matched your search
@@ -314,14 +314,14 @@ pub(crate) fn create_error_type(
|
||||
#(#error_variants,)*
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for #error_name {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
impl ::std::fmt::Debug for #error_name {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
write!(f, "{}({})", stringify!(#error_name), self)
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for #error_name {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
impl ::std::fmt::Display for #error_name {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
match self {
|
||||
Self::ExtraSegments(segments) => {
|
||||
write!(f, "Found additional trailing segments: {}", segments)?
|
||||
|
||||
Reference in new issue
Block a user