Skip to content

Commit e85295c

Browse files
committed
test blessing
1 parent eac4916 commit e85295c

7 files changed

+11
-12
lines changed

tests/ui/cast/ptr-to-trait-obj-add-auto.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// check-fail
1+
//@ check-fail
22

33
trait Trait<'a> {}
44

tests/ui/cast/ptr-to-trait-obj-different-args.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
// check-fail
1+
//@ check-fail
22
//
33
// issue: <https://github.com/rust-lang/rust/issues/120222>
44

5-
65
trait A {}
76
impl<T> A for T {}
87
trait B {}

tests/ui/cast/ptr-to-trait-obj-different-args.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
error[E0277]: the trait bound `dyn A: Unsize<dyn B>` is not satisfied
2-
--> $DIR/ptr-to-trait-obj-different-args.rs:19:27
2+
--> $DIR/ptr-to-trait-obj-different-args.rs:18:27
33
|
44
LL | let b: *const dyn B = a as _;
55
| ^^^^^^ the trait `Unsize<dyn B>` is not implemented for `dyn A`
66
|
77
= note: all implementations of `Unsize` are provided automatically by the compiler, see <https://doc.rust-lang.org/stable/std/marker/trait.Unsize.html> for more information
88

99
error[E0277]: the trait bound `dyn Trait<X>: Unsize<dyn Trait<Y>>` is not satisfied
10-
--> $DIR/ptr-to-trait-obj-different-args.rs:22:34
10+
--> $DIR/ptr-to-trait-obj-different-args.rs:21:34
1111
|
1212
LL | let y: *const dyn Trait<Y> = x as _;
1313
| ^^^^^^ the trait `Unsize<dyn Trait<Y>>` is not implemented for `dyn Trait<X>`
1414
|
1515
= note: all implementations of `Unsize` are provided automatically by the compiler, see <https://doc.rust-lang.org/stable/std/marker/trait.Unsize.html> for more information
1616

1717
error[E0277]: the trait bound `dyn Trait<X>: Unsize<dyn Trait<T>>` is not satisfied
18-
--> $DIR/ptr-to-trait-obj-different-args.rs:28:34
18+
--> $DIR/ptr-to-trait-obj-different-args.rs:27:34
1919
|
2020
LL | let _: *const dyn Trait<T> = x as _;
2121
| ^^^^^^ the trait `Unsize<dyn Trait<T>>` is not implemented for `dyn Trait<X>`
@@ -27,7 +27,7 @@ LL | fn generic<T>(x: *const dyn Trait<X>, t: *const dyn Trait<T>) where dyn Tra
2727
| ++++++++++++++++++++++++++++++++++++++++
2828

2929
error[E0277]: the trait bound `dyn Trait<T>: Unsize<dyn Trait<X>>` is not satisfied
30-
--> $DIR/ptr-to-trait-obj-different-args.rs:29:34
30+
--> $DIR/ptr-to-trait-obj-different-args.rs:28:34
3131
|
3232
LL | let _: *const dyn Trait<X> = t as _;
3333
| ^^^^^^ the trait `Unsize<dyn Trait<X>>` is not implemented for `dyn Trait<T>`
@@ -39,7 +39,7 @@ LL | fn generic<T>(x: *const dyn Trait<X>, t: *const dyn Trait<T>) where dyn Tra
3939
| ++++++++++++++++++++++++++++++++++++++++
4040

4141
error[E0277]: the trait bound `dyn Assocked<Assoc = u8>: Unsize<dyn Assocked<Assoc = u32>>` is not satisfied
42-
--> $DIR/ptr-to-trait-obj-different-args.rs:37:5
42+
--> $DIR/ptr-to-trait-obj-different-args.rs:36:5
4343
|
4444
LL | x as _
4545
| ^^^^^^ the trait `Unsize<dyn Assocked<Assoc = u32>>` is not implemented for `dyn Assocked<Assoc = u8>`

tests/ui/cast/ptr-to-trait-obj-different-regions-lt-ext.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// check-fail
1+
//@ check-fail
22
//
33
// issue: <https://github.com/rust-lang/rust/issues/120217>
44

tests/ui/cast/ptr-to-trait-obj-different-regions-misc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// check-fail
1+
//@ check-fail
22

33
trait Trait<'a> {}
44

tests/ui/cast/ptr-to-trait-obj-ok.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// check-pass
1+
//@ check-pass
22

33
trait Trait<'a> {}
44

tests/ui/traits/upcast_soundness_bug.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![feature(trait_upcasting)]
2-
// check-fail
2+
//@ check-fail
33
//
44
// issue: <https://github.com/rust-lang/rust/pull/120222>
55
//! This would segfault at runtime.

0 commit comments

Comments
 (0)