Skip to content

Commit

Permalink
Fix semver documentation tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Dec 2, 2020
1 parent 63d0fe4 commit e187309
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 e187309

Please sign in to comment.