Skip to content

Commit

Permalink
Fix crate->pub(crate) and proc_macro->crate::proc_macro for nightly f…
Browse files Browse the repository at this point in the history
…eature
  • Loading branch information
LukasKalbertodt committed Sep 21, 2018
1 parent e1cfab2 commit 058973f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/analyze.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ pub(crate) fn find_suitable_param_names(trait_def: &ItemTrait) -> (Ident, Lifeti
/// but this is cleaner and just the correct thing to do.
#[cfg(feature = "nightly")]
fn param_span() -> Span2 {
::proc_macro::Span::def_site().into()
crate::proc_macro::Span::def_site().into()
}

/// On stable, we use `call_site()` hygiene. That means that our names could
Expand Down
4 changes: 2 additions & 2 deletions src/diag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl DiagnosticExt for Diagnostic {
// `Diagnostic`.

#[cfg(feature = "nightly")]
crate type Diagnostic = ::proc_macro::Diagnostic;
pub(crate) type Diagnostic = crate::proc_macro::Diagnostic;

#[cfg(not(feature = "nightly"))]
pub(crate) struct Diagnostic {
Expand Down Expand Up @@ -170,7 +170,7 @@ pub(crate) trait SpanExt {
impl SpanExt for Span {
#[cfg(feature = "nightly")]
fn err(self, msg: impl Into<String>) -> Diagnostic {
Diagnostic::spanned(self, ::proc_macro::Level::Error, msg)
Diagnostic::spanned(self, crate::proc_macro::Level::Error, msg)
}

#[cfg(not(feature = "nightly"))]
Expand Down

0 comments on commit 058973f

Please sign in to comment.