Skip to content

Commit

Permalink
Auto merge of #8930 - ehuss:fix-semver-msg, r=Eh2406
Browse files Browse the repository at this point in the history
Fix semver documentation tests.

GitHub just updated the VM image to include the latest stable rust (1.48), which included some minor changes to diagnostic outputs.  This updates the semver chapter tests which validates that the correct error is displayed for the 1.48 release.  These diagnostics were changed via rust-lang/rust#76524 and rust-lang/rust#73996.
  • Loading branch information
bors committed Dec 2, 2020
2 parents 63d0fe4 + e187309 commit 3d5447e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/doc/src/reference/semver.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ pub struct Foo {
///////////////////////////////////////////////////////////
// Example usage that will break.
fn main() {
let x = updated_crate::Foo { f1: 123 }; // Error: missing field `f2`
let x = updated_crate::Foo { f1: 123 }; // Error: cannot construct `Foo`
}
```

Expand Down Expand Up @@ -738,7 +738,7 @@ pub struct Foo<A: Eq> {
use updated_crate::Foo;
fn main() {
let s = Foo { f1: 1.23 }; // Error: the trait bound `{float}: std::cmp::Eq` is not satisfied
let s = Foo { f1: 1.23 }; // Error: the trait bound `{float}: Eq` is not satisfied
}
```

Expand Down Expand Up @@ -1070,7 +1070,7 @@ pub fn foo<T: Copy + IntoIterator<Item = u8>>(x: T) {}
use updated_crate::foo;
fn main() {
foo(vec![1, 2, 3]); // Error: `std::marker::Copy` is not implemented for `std::vec::Vec<u8>`
foo(vec![1, 2, 3]); // Error: `Copy` is not implemented for `Vec<u8>`
}
```

Expand Down

0 comments on commit 3d5447e

Please sign in to comment.