about summary refs log tree commit diff
path: root/tests/ui/cast
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2024-02-13 00:17:19 +0000
committerMaybe Lapkin <waffle.lapkin@gmail.com>2024-07-04 17:56:09 +0200
commitbb651d358d63e5fac626e200c32147b43a330ea0 (patch)
tree04dcda30a315591032812f5d1ba36a01d243eb92 /tests/ui/cast
parent5645e8e28578e4b907383323fadde172375409f1 (diff)
downloadrust-bb651d358d63e5fac626e200c32147b43a330ea0.tar.gz
rust-bb651d358d63e5fac626e200c32147b43a330ea0.zip
blessings
Diffstat (limited to 'tests/ui/cast')
-rw-r--r--tests/ui/cast/cast-rfc0401-vtable-kinds.rs6
-rw-r--r--tests/ui/cast/cast-rfc0401-vtable-kinds.stderr2
-rw-r--r--tests/ui/cast/ptr-to-trait-obj-different-args.rs2
3 files changed, 2 insertions, 8 deletions
diff --git a/tests/ui/cast/cast-rfc0401-vtable-kinds.rs b/tests/ui/cast/cast-rfc0401-vtable-kinds.rs
index b13ea94c4c9..5704a33cc87 100644
--- a/tests/ui/cast/cast-rfc0401-vtable-kinds.rs
+++ b/tests/ui/cast/cast-rfc0401-vtable-kinds.rs
@@ -4,16 +4,10 @@
 
 #![feature(unsized_tuple_coercion)]
 
-trait Foo<T> {
-    fn foo(&self, _: T) -> u32 { 42 }
-}
-
 trait Bar { //~ WARN trait `Bar` is never used
     fn bar(&self) { println!("Bar!"); }
 }
 
-impl<T> Foo<T> for () {}
-impl Foo<u32> for u32 { fn foo(&self, _: u32) -> u32 { self+43 } }
 impl Bar for () {}
 
 #[repr(C)]
diff --git a/tests/ui/cast/cast-rfc0401-vtable-kinds.stderr b/tests/ui/cast/cast-rfc0401-vtable-kinds.stderr
index 952687e98d0..4f57e2e7df7 100644
--- a/tests/ui/cast/cast-rfc0401-vtable-kinds.stderr
+++ b/tests/ui/cast/cast-rfc0401-vtable-kinds.stderr
@@ -1,5 +1,5 @@
 warning: trait `Bar` is never used
-  --> $DIR/cast-rfc0401-vtable-kinds.rs:11:7
+  --> $DIR/cast-rfc0401-vtable-kinds.rs:7:7
    |
 LL | trait Bar {
    |       ^^^
diff --git a/tests/ui/cast/ptr-to-trait-obj-different-args.rs b/tests/ui/cast/ptr-to-trait-obj-different-args.rs
index 1859dd8dac0..7488cf5ee97 100644
--- a/tests/ui/cast/ptr-to-trait-obj-different-args.rs
+++ b/tests/ui/cast/ptr-to-trait-obj-different-args.rs
@@ -35,4 +35,4 @@ trait Assocked {
 
 fn change_assoc(x: *mut dyn Assocked<Assoc = u8>) -> *mut dyn Assocked<Assoc = u32> {
     x as _ //~ error: the trait bound `dyn Assocked<Assoc = u8>: Unsize<dyn Assocked<Assoc = u32>>` is not satisfied
-}
\ No newline at end of file
+}