diff options
| author | Charles Lew <crlf0710@gmail.com> | 2021-07-31 23:08:56 +0800 |
|---|---|---|
| committer | Charles Lew <crlf0710@gmail.com> | 2021-08-03 01:09:38 +0800 |
| commit | 3cb625e4683c43991de6fc27d6b4e0db5a34011f (patch) | |
| tree | 24fe8c252757e305e94b55febe728ff29b9089d3 /src/test/ui/traits/trait-upcasting/struct.rs | |
| parent | a14433347945af2c514074c1d66066ee9f5e8a72 (diff) | |
| download | rust-3cb625e4683c43991de6fc27d6b4e0db5a34011f.tar.gz rust-3cb625e4683c43991de6fc27d6b4e0db5a34011f.zip | |
Various adjustments to historic tests and documents.
Diffstat (limited to 'src/test/ui/traits/trait-upcasting/struct.rs')
| -rw-r--r-- | src/test/ui/traits/trait-upcasting/struct.rs | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/src/test/ui/traits/trait-upcasting/struct.rs b/src/test/ui/traits/trait-upcasting/struct.rs index cf71ed49551..0f3cb285bf4 100644 --- a/src/test/ui/traits/trait-upcasting/struct.rs +++ b/src/test/ui/traits/trait-upcasting/struct.rs @@ -1,38 +1,57 @@ // run-pass #![feature(trait_upcasting)] +#![allow(incomplete_features)] use std::rc::Rc; use std::sync::Arc; trait Foo: PartialEq<i32> + std::fmt::Debug + Send + Sync { - fn a(&self) -> i32 { 10 } + fn a(&self) -> i32 { + 10 + } - fn z(&self) -> i32 { 11 } + fn z(&self) -> i32 { + 11 + } - fn y(&self) -> i32 { 12 } + fn y(&self) -> i32 { + 12 + } } trait Bar: Foo { - fn b(&self) -> i32 { 20 } + fn b(&self) -> i32 { + 20 + } - fn w(&self) -> i32 { 21 } + fn w(&self) -> i32 { + 21 + } } trait Baz: Bar { - fn c(&self) -> i32 { 30 } + fn c(&self) -> i32 { + 30 + } } impl Foo for i32 { - fn a(&self) -> i32 { 100 } + fn a(&self) -> i32 { + 100 + } } impl Bar for i32 { - fn b(&self) -> i32 { 200 } + fn b(&self) -> i32 { + 200 + } } impl Baz for i32 { - fn c(&self) -> i32 { 300 } + fn c(&self) -> i32 { + 300 + } } fn test_box() { |
