Skip to content

Commit 058973f

Browse files
Fix crate->pub(crate) and proc_macro->crate::proc_macro for nightly feature
1 parent e1cfab2 commit 058973f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/analyze.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub(crate) fn find_suitable_param_names(trait_def: &ItemTrait) -> (Ident, Lifeti
101101
/// but this is cleaner and just the correct thing to do.
102102
#[cfg(feature = "nightly")]
103103
fn param_span() -> Span2 {
104-
::proc_macro::Span::def_site().into()
104+
crate::proc_macro::Span::def_site().into()
105105
}
106106

107107
/// On stable, we use `call_site()` hygiene. That means that our names could

src/diag.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl DiagnosticExt for Diagnostic {
4444
// `Diagnostic`.
4545

4646
#[cfg(feature = "nightly")]
47-
crate type Diagnostic = ::proc_macro::Diagnostic;
47+
pub(crate) type Diagnostic = crate::proc_macro::Diagnostic;
4848

4949
#[cfg(not(feature = "nightly"))]
5050
pub(crate) struct Diagnostic {
@@ -170,7 +170,7 @@ pub(crate) trait SpanExt {
170170
impl SpanExt for Span {
171171
#[cfg(feature = "nightly")]
172172
fn err(self, msg: impl Into<String>) -> Diagnostic {
173-
Diagnostic::spanned(self, ::proc_macro::Level::Error, msg)
173+
Diagnostic::spanned(self, crate::proc_macro::Level::Error, msg)
174174
}
175175

176176
#[cfg(not(feature = "nightly"))]

0 commit comments

Comments
 (0)