Skip to content

Commit 7bd820d

Browse files
borsehuss
authored andcommitted
Auto merge of #8930 - ehuss:fix-semver-msg, r=Eh2406
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.
1 parent 05d0992 commit 7bd820d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/doc/src/reference/semver.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ pub struct Foo {
224224
///////////////////////////////////////////////////////////
225225
// Example usage that will break.
226226
fn main() {
227-
let x = updated_crate::Foo { f1: 123 }; // Error: missing field `f2`
227+
let x = updated_crate::Foo { f1: 123 }; // Error: cannot construct `Foo`
228228
}
229229
```
230230

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

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

0 commit comments

Comments
 (0)