let first_name = match path.get(0) {
// In the 2018 edition this lint is a hard error, so nothing to do
- Some(seg) if seg.ident.span.rust_2015() => seg.ident.name,
+ Some(seg) if seg.ident.span.rust_2015() && self.session.rust_2015() => seg.ident.name,
_ => return,
};
// except according to those terms.
pub fn foo() {}
+
+#[macro_export]
+macro_rules! macro_2015 {
+ () => {
+ use edition_lint_paths as other_name;
+ use edition_lint_paths::foo as other_foo;
+ fn check_macro_2015() {
+ ::edition_lint_paths::foo();
+ }
+ }
+}
--- /dev/null
+// compile-pass
+// edition:2018
+// compile-flags:--extern edition_lint_paths
+// aux-build:edition-lint-paths.rs
+
+#![deny(absolute_paths_not_starting_with_crate)]
+
+edition_lint_paths::macro_2015!(); // OK
+
+fn main() {}