Skip to content

Commit e187309

Browse files
committed
Fix semver documentation tests.
1 parent 63d0fe4 commit e187309

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)