We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f513ea commit 112dff0Copy full SHA for 112dff0
src/test/rustdoc/trait-object-safe.rs
@@ -0,0 +1,23 @@
1
+#![crate_name = "foo"]
2
+
3
+// @has 'foo/trait.Safe.html'
4
+// @has - '//*[@class="obj-info"]' 'This trait is object safe.'
5
+pub trait Safe {
6
+ fn foo(&self);
7
+}
8
9
+// @has 'foo/trait.Unsafe.html'
10
+// @has - '//*[@class="obj-info"]' 'This trait is not object safe.'
11
+pub trait Unsafe {
12
+ fn foo() -> Self;
13
14
15
+// @has 'foo/trait.Unsafe2.html'
16
17
+pub trait Unsafe2<T> {
18
+ fn foo(i: T);
19
20
21
+// @has 'foo/struct.Foo.html'
22
+// @!has - '//*[@class="obj-info"]'
23
+pub struct Foo;
0 commit comments