Skip to content

Commit

Permalink
Fix test breakage due to rust-lang/rust#76898
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Nov 19, 2020
1 parent 4827814 commit f91a85d
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 135 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2020-09-15
nightly-2020-09-25
7 changes: 3 additions & 4 deletions tests/cases/bounds/stdout
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,16 @@ error: breaking changes in `abc`
--> bounds/new.rs:9:1
|
9 | pub fn abc<A: Clone>(_: A) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: added bound: `A: std::clone::Clone` (breaking)

warning: technically breaking changes in `def`
--> bounds/new.rs:11:1
|
11 | pub fn def<A>(_: A) {}
| ^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^
|
= note: removed bound: `A: std::clone::Clone` (technically breaking)

error: aborting due to 2 previous errors; 2 warnings emitted

error: aborting due to 2 previous errors; 2 warnings emitted
43 changes: 15 additions & 28 deletions tests/cases/func/stdout
Original file line number Diff line number Diff line change
Expand Up @@ -3,77 +3,64 @@ error: breaking changes in `bcd`
--> func/new.rs:4:1
|
4 | pub fn bcd(_: u8) {}
| ^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^
|
= warning: type error: incorrect number of function parameters (breaking)

error: breaking changes in `cde`
--> func/new.rs:6:1
|
6 | / pub fn cde() -> u16 {
7 | | 0xcde
8 | | }
| |_^
6 | pub fn cde() -> u16 {
| ^^^^^^^^^^^^^^^^^^^
|
= warning: type error: expected `()`, found `u16` (breaking)

error: breaking changes in `def`
--> func/new.rs:10:1
|
10 | pub fn def() {}
| ^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^
|
= warning: type error: incorrect number of function parameters (breaking)

warning: non-breaking changes in `efg`
--> func/new.rs:12:1
|
12 | / pub fn efg<A>(a: A, _: A) -> A {
13 | | a
14 | | }
| |_^
12 | pub fn efg<A>(a: A, _: A) -> A {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defaulted type parameter added (non-breaking)

error: breaking changes in `fgh`
--> func/new.rs:16:1
|
16 | / pub fn fgh(a: u8, _: u16) -> u8 {
17 | | a
18 | | }
| |_^
16 | pub fn fgh(a: u8, _: u16) -> u8 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: type error: expected `u8`, found `u16` (breaking)

error: breaking changes in `ghi`
--> func/new.rs:20:1
|
20 | / pub fn ghi(a: u8, _: u8) -> u16 {
21 | | a as u16
22 | | }
| |_^
20 | pub fn ghi(a: u8, _: u8) -> u16 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: type error: expected `u8`, found `u16` (breaking)

warning: non-breaking changes in `hij`
--> func/new.rs:24:1
|
24 | / pub const fn hij() -> u8 {
25 | | 0
26 | | }
| |_^
24 | pub const fn hij() -> u8 {
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: fn item made const (non-breaking)

error: breaking changes in `ijk`
--> func/new.rs:28:1
|
28 | / pub fn ijk() -> u8 {
29 | | 0
30 | | }
| |_^
28 | pub fn ijk() -> u8 {
| ^^^^^^^^^^^^^^^^^^
|
= warning: fn item made non-const (breaking)

error: aborting due to 6 previous errors; 2 warnings emitted

error: aborting due to 6 previous errors; 2 warnings emitted
5 changes: 2 additions & 3 deletions tests/cases/infer_regress/stdout
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ error: breaking changes in `abc`
--> infer_regress/new.rs:1:1
|
1 | pub fn abc<A>(_: A) { }
| ^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^
|
= note: variance loosened (non-breaking)
= warning: type error: expected type parameter `A`, found `()` (breaking)
Expand All @@ -16,5 +16,4 @@ error: breaking changes in `Abc`
|
= warning: type error: expected type parameter `A`, found `()` (breaking)

error: aborting due to 2 previous errors

error: aborting due to 2 previous errors
11 changes: 5 additions & 6 deletions tests/cases/regions/stdout
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,32 @@ error: breaking changes in `abc`
--> regions/new.rs:13:1
|
13 | pub fn abc(_: &bool) { }
| ^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^
|
= warning: type error: expected `bool`, found `&bool` (breaking)

error: breaking changes in `def`
--> regions/new.rs:15:1
|
15 | pub fn def(_: bool) { }
| ^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^
|
= warning: type error: expected `&bool`, found `bool` (breaking)

error: breaking changes in `efg`
--> regions/new.rs:17:1
|
17 | pub fn efg(_: &str) { }
| ^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^
|
= warning: type error: expected bound lifetime parameter, found concrete lifetime (breaking)

error: breaking changes in `fgh`
--> regions/new.rs:19:1
|
19 | pub fn fgh(_: &'static str) { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: type error: expected bound lifetime parameter, found concrete lifetime (breaking)

error: aborting due to 6 previous errors

error: aborting due to 6 previous errors
23 changes: 5 additions & 18 deletions tests/full_cases/log-0.3.4-0.3.8.linux
Original file line number Diff line number Diff line change
Expand Up @@ -130,36 +130,23 @@ warning: path changes to `set_logger_raw`
|
713 | / pub unsafe fn set_logger_raw<M>(make_logger: M) -> Result<(), SetLoggerError>
714 | | where M: FnOnce(MaxLogLevelFilter) -> *const Log {
715 | | if STATE.compare_and_swap(UNINITIALIZED, INITIALIZING,
716 | | Ordering::SeqCst) != UNINITIALIZED {
... |
722 | | Ok(())
723 | | }
| |_^
| |________________________________________________________^
|
= note: added definition (technically breaking)

warning: path changes to `shutdown_logger`
--> log-0.3.8/src/lib.rs:736:1
|
736 | / pub fn shutdown_logger() -> Result<Box<Log>, ShutdownLoggerError> {
737 | | shutdown_logger_raw().map(|l| unsafe { mem::transmute(l) })
738 | | }
| |_^
736 | pub fn shutdown_logger() -> Result<Box<Log>, ShutdownLoggerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: added definition (technically breaking)

warning: path changes to `shutdown_logger_raw`
--> log-0.3.8/src/lib.rs:754:1
|
754 | / pub fn shutdown_logger_raw() -> Result<*const Log, ShutdownLoggerError> {
755 | | // Set the global log level to stop other thread from logging
756 | | MAX_LOG_LEVEL_FILTER.store(0, Ordering::SeqCst);
757 | |
... |
772 | | }
773 | | }
| |_^
754 | pub fn shutdown_logger_raw() -> Result<*const Log, ShutdownLoggerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: added definition (technically breaking)

Expand Down
23 changes: 5 additions & 18 deletions tests/full_cases/log-0.3.4-0.3.8.osx
Original file line number Diff line number Diff line change
Expand Up @@ -130,36 +130,23 @@ warning: path changes to `set_logger_raw`
|
713 | / pub unsafe fn set_logger_raw<M>(make_logger: M) -> Result<(), SetLoggerError>
714 | | where M: FnOnce(MaxLogLevelFilter) -> *const Log {
715 | | if STATE.compare_and_swap(UNINITIALIZED, INITIALIZING,
716 | | Ordering::SeqCst) != UNINITIALIZED {
... |
722 | | Ok(())
723 | | }
| |_^
| |________________________________________________________^
|
= note: added definition (technically breaking)

warning: path changes to `shutdown_logger`
--> log-0.3.8/src/lib.rs:736:1
|
736 | / pub fn shutdown_logger() -> Result<Box<Log>, ShutdownLoggerError> {
737 | | shutdown_logger_raw().map(|l| unsafe { mem::transmute(l) })
738 | | }
| |_^
736 | pub fn shutdown_logger() -> Result<Box<Log>, ShutdownLoggerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: added definition (technically breaking)

warning: path changes to `shutdown_logger_raw`
--> log-0.3.8/src/lib.rs:754:1
|
754 | / pub fn shutdown_logger_raw() -> Result<*const Log, ShutdownLoggerError> {
755 | | // Set the global log level to stop other thread from logging
756 | | MAX_LOG_LEVEL_FILTER.store(0, Ordering::SeqCst);
757 | |
... |
772 | | }
773 | | }
| |_^
754 | pub fn shutdown_logger_raw() -> Result<*const Log, ShutdownLoggerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: added definition (technically breaking)

Expand Down
23 changes: 5 additions & 18 deletions tests/full_cases/log-0.3.4-0.3.8.windows_msvc
Original file line number Diff line number Diff line change
Expand Up @@ -130,36 +130,23 @@ warning: path changes to `set_logger_raw`
|
713 | / pub unsafe fn set_logger_raw<M>(make_logger: M) -> Result<(), SetLoggerError>
714 | | where M: FnOnce(MaxLogLevelFilter) -> *const Log {
715 | | if STATE.compare_and_swap(UNINITIALIZED, INITIALIZING,
716 | | Ordering::SeqCst) != UNINITIALIZED {
... |
722 | | Ok(())
723 | | }
| |_^
| |________________________________________________________^
|
= note: added definition (technically breaking)

warning: path changes to `shutdown_logger`
--> log-0.3.8\src\lib.rs:736:1
|
736 | / pub fn shutdown_logger() -> Result<Box<Log>, ShutdownLoggerError> {
737 | | shutdown_logger_raw().map(|l| unsafe { mem::transmute(l) })
738 | | }
| |_^
736 | pub fn shutdown_logger() -> Result<Box<Log>, ShutdownLoggerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: added definition (technically breaking)

warning: path changes to `shutdown_logger_raw`
--> log-0.3.8\src\lib.rs:754:1
|
754 | / pub fn shutdown_logger_raw() -> Result<*const Log, ShutdownLoggerError> {
755 | | // Set the global log level to stop other thread from logging
756 | | MAX_LOG_LEVEL_FILTER.store(0, Ordering::SeqCst);
757 | |
... |
772 | | }
773 | | }
| |_^
754 | pub fn shutdown_logger_raw() -> Result<*const Log, ShutdownLoggerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: added definition (technically breaking)

Expand Down
16 changes: 3 additions & 13 deletions tests/full_cases/rmpv-0.4.0-0.4.1.linux
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@ error: breaking changes in `write_value`
|
15 | / pub fn write_value<W>(wr: &mut W, val: &Value) -> Result<(), Error>
16 | | where W: Write
17 | | {
18 | | match *val {
... |
69 | | Ok(())
70 | | }
| |_^
| |__________________^
|
= warning: type error: expected enum `old::encode::Error`, found enum `new::encode::Error` (breaking)

Expand All @@ -44,12 +39,7 @@ error: breaking changes in `write_value_ref`
|
27 | / pub fn write_value_ref<W>(wr: &mut W, val: &ValueRef) -> Result<(), Error>
28 | | where W: Write
29 | | {
30 | | match *val {
... |
81 | | Ok(())
82 | | }
| |_^
| |__________________^
|
= warning: type error: expected enum `old::encode::Error`, found enum `new::encode::Error` (breaking)

Expand Down Expand Up @@ -108,4 +98,4 @@ warning: technically breaking changes in `<new::decode::Error as std::convert::F

error: aborting due to 4 previous errors; 4 warnings emitted

error: rustc-semverver errored
error: rustc-semverver errored
16 changes: 3 additions & 13 deletions tests/full_cases/rmpv-0.4.0-0.4.1.osx
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@ error: breaking changes in `write_value`
|
15 | / pub fn write_value<W>(wr: &mut W, val: &Value) -> Result<(), Error>
16 | | where W: Write
17 | | {
18 | | match *val {
... |
69 | | Ok(())
70 | | }
| |_^
| |__________________^
|
= warning: type error: expected enum `old::encode::Error`, found enum `new::encode::Error` (breaking)

Expand All @@ -44,12 +39,7 @@ error: breaking changes in `write_value_ref`
|
27 | / pub fn write_value_ref<W>(wr: &mut W, val: &ValueRef) -> Result<(), Error>
28 | | where W: Write
29 | | {
30 | | match *val {
... |
81 | | Ok(())
82 | | }
| |_^
| |__________________^
|
= warning: type error: expected enum `old::encode::Error`, found enum `new::encode::Error` (breaking)

Expand Down Expand Up @@ -108,4 +98,4 @@ warning: technically breaking changes in `<new::decode::Error as std::convert::F

error: aborting due to 4 previous errors; 4 warnings emitted

error: rustc-semverver errored
error: rustc-semverver errored
Loading

0 comments on commit f91a85d

Please sign in to comment.