Skip to content

Commit

Permalink
Fix test breakage after rust-lang/rust#72121
Browse files Browse the repository at this point in the history
See rust-lang/rust#72121.

The PR fixes some hygiene issues and thus exposes that the originating
expression comes from macros.
  • Loading branch information
Xanewok committed Nov 19, 2020
1 parent 6604643 commit ad9b9db
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 18 deletions.
41 changes: 27 additions & 14 deletions tests/cases/pathologic_paths/stdout
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
version bump: 1.0.0 -> (technically breaking) -> 1.1.0
warning: path changes to `a`
--> pathologic_paths/new.rs:5:9
|
5 | pub mod a { blow!($($rest)*); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: added definition (technically breaking)
--> pathologic_paths/new.rs:10:1
|
10 | / blow!(_ _ _ _ _ _ _ _
11 | | _ _ _ _ _ _ _ _
12 | | _ _ _ _ _ _ _ _
13 | | _ _ _ _ _ _ _ _
... |
16 | | _ _ _ _ _ _ _ _
17 | | _ _ _ _ _ _ _ _);
| |_______________________^
|
= note: added definition (technically breaking)
= note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: path changes to `b`
--> pathologic_paths/new.rs:6:9
|
6 | pub mod b { pub use super::a::*; }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: added definition (technically breaking)

warning: 2 warnings emitted
--> pathologic_paths/new.rs:10:1
|
10 | / blow!(_ _ _ _ _ _ _ _
11 | | _ _ _ _ _ _ _ _
12 | | _ _ _ _ _ _ _ _
13 | | _ _ _ _ _ _ _ _
... |
16 | | _ _ _ _ _ _ _ _
17 | | _ _ _ _ _ _ _ _);
| |_______________________^
|
= note: added definition (technically breaking)
= note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: 2 warnings emitted
14 changes: 14 additions & 0 deletions tests/full_cases/log-0.3.4-0.3.8.linux
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ warning: technically breaking changes in `<new::LogLevel as std::hash::Hash>`
| ^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogLevelFilter as std::hash::Hash>`
--> log-0.3.8/src/lib.rs:410:27
Expand All @@ -14,6 +15,7 @@ warning: technically breaking changes in `<new::LogLevelFilter as std::hash::Has
| ^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogRecord<'a> as std::fmt::Debug>`
--> log-0.3.8/src/lib.rs:517:10
Expand All @@ -22,6 +24,7 @@ warning: technically breaking changes in `<new::LogRecord<'a> as std::fmt::Debug
| ^^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::Eq>`
--> log-0.3.8/src/lib.rs:552:10
Expand All @@ -30,6 +33,7 @@ warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::Eq>
| ^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::PartialEq>`
--> log-0.3.8/src/lib.rs:552:14
Expand All @@ -38,6 +42,7 @@ warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::Par
| ^^^^^^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::Ord>`
--> log-0.3.8/src/lib.rs:552:25
Expand All @@ -46,6 +51,7 @@ warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::Ord
| ^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::PartialOrd>`
--> log-0.3.8/src/lib.rs:552:30
Expand All @@ -54,6 +60,7 @@ warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::Par
| ^^^^^^^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogMetadata<'a> as std::hash::Hash>`
--> log-0.3.8/src/lib.rs:552:42
Expand All @@ -62,6 +69,7 @@ warning: technically breaking changes in `<new::LogMetadata<'a> as std::hash::Ha
| ^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogMetadata<'a> as std::fmt::Debug>`
--> log-0.3.8/src/lib.rs:552:48
Expand All @@ -70,6 +78,7 @@ warning: technically breaking changes in `<new::LogMetadata<'a> as std::fmt::Deb
| ^^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogLocation as std::cmp::Eq>`
--> log-0.3.8/src/lib.rs:604:30
Expand All @@ -78,6 +87,7 @@ warning: technically breaking changes in `<new::LogLocation as std::cmp::Eq>`
| ^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogLocation as std::cmp::PartialEq>`
--> log-0.3.8/src/lib.rs:604:34
Expand All @@ -86,6 +96,7 @@ warning: technically breaking changes in `<new::LogLocation as std::cmp::Partial
| ^^^^^^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogLocation as std::cmp::Ord>`
--> log-0.3.8/src/lib.rs:604:45
Expand All @@ -94,6 +105,7 @@ warning: technically breaking changes in `<new::LogLocation as std::cmp::Ord>`
| ^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogLocation as std::cmp::PartialOrd>`
--> log-0.3.8/src/lib.rs:604:50
Expand All @@ -102,6 +114,7 @@ warning: technically breaking changes in `<new::LogLocation as std::cmp::Partial
| ^^^^^^^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogLocation as std::hash::Hash>`
--> log-0.3.8/src/lib.rs:604:62
Expand All @@ -110,6 +123,7 @@ warning: technically breaking changes in `<new::LogLocation as std::hash::Hash>`
| ^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: path changes to `set_logger_raw`
--> log-0.3.8/src/lib.rs:713:1
Expand Down
17 changes: 15 additions & 2 deletions tests/full_cases/log-0.3.4-0.3.8.osx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ warning: technically breaking changes in `<new::LogLevel as std::hash::Hash>`
| ^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogLevelFilter as std::hash::Hash>`
--> log-0.3.8/src/lib.rs:410:27
Expand All @@ -14,6 +15,7 @@ warning: technically breaking changes in `<new::LogLevelFilter as std::hash::Has
| ^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogRecord<'a> as std::fmt::Debug>`
--> log-0.3.8/src/lib.rs:517:10
Expand All @@ -22,6 +24,7 @@ warning: technically breaking changes in `<new::LogRecord<'a> as std::fmt::Debug
| ^^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::Eq>`
--> log-0.3.8/src/lib.rs:552:10
Expand All @@ -30,6 +33,7 @@ warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::Eq>
| ^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::PartialEq>`
--> log-0.3.8/src/lib.rs:552:14
Expand All @@ -38,6 +42,7 @@ warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::Par
| ^^^^^^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::Ord>`
--> log-0.3.8/src/lib.rs:552:25
Expand All @@ -46,6 +51,7 @@ warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::Ord
| ^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::PartialOrd>`
--> log-0.3.8/src/lib.rs:552:30
Expand All @@ -54,6 +60,7 @@ warning: technically breaking changes in `<new::LogMetadata<'a> as std::cmp::Par
| ^^^^^^^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogMetadata<'a> as std::hash::Hash>`
--> log-0.3.8/src/lib.rs:552:42
Expand All @@ -62,6 +69,7 @@ warning: technically breaking changes in `<new::LogMetadata<'a> as std::hash::Ha
| ^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogMetadata<'a> as std::fmt::Debug>`
--> log-0.3.8/src/lib.rs:552:48
Expand All @@ -70,6 +78,7 @@ warning: technically breaking changes in `<new::LogMetadata<'a> as std::fmt::Deb
| ^^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogLocation as std::cmp::Eq>`
--> log-0.3.8/src/lib.rs:604:30
Expand All @@ -78,6 +87,7 @@ warning: technically breaking changes in `<new::LogLocation as std::cmp::Eq>`
| ^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogLocation as std::cmp::PartialEq>`
--> log-0.3.8/src/lib.rs:604:34
Expand All @@ -86,6 +96,7 @@ warning: technically breaking changes in `<new::LogLocation as std::cmp::Partial
| ^^^^^^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogLocation as std::cmp::Ord>`
--> log-0.3.8/src/lib.rs:604:45
Expand All @@ -94,6 +105,7 @@ warning: technically breaking changes in `<new::LogLocation as std::cmp::Ord>`
| ^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogLocation as std::cmp::PartialOrd>`
--> log-0.3.8/src/lib.rs:604:50
Expand All @@ -102,6 +114,7 @@ warning: technically breaking changes in `<new::LogLocation as std::cmp::Partial
| ^^^^^^^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: technically breaking changes in `<new::LogLocation as std::hash::Hash>`
--> log-0.3.8/src/lib.rs:604:62
Expand All @@ -110,6 +123,7 @@ warning: technically breaking changes in `<new::LogLocation as std::hash::Hash>`
| ^^^^
|
= note: trait impl generalized or newly added (technically breaking)
= note: this warning originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: path changes to `set_logger_raw`
--> log-0.3.8/src/lib.rs:713:1
Expand Down Expand Up @@ -157,5 +171,4 @@ warning: path changes to `ShutdownLoggerError`
|
= note: added definition (technically breaking)

warning: 18 warnings emitted

warning: 18 warnings emitted
Loading

0 comments on commit ad9b9db

Please sign in to comment.