rust/tests/ui/object-pointer-types.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
1.1 KiB
Plaintext
Raw Normal View History

error[E0599]: no method named `owned` found for reference `&dyn Foo` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/object-pointer-types.rs:11:7
2018-08-08 12:28:26 +00:00
|
LL | fn owned(self: Box<Self>);
| --------- the method might not be found because of this arbitrary self type
...
2019-03-09 12:03:44 +00:00
LL | x.owned();
2024-02-10 03:37:08 +00:00
| ^^^^^
|
help: there is a method `to_owned` with a similar name
2024-02-10 03:37:08 +00:00
|
LL | x.to_owned();
| ~~~~~~~~
2018-08-08 12:28:26 +00:00
error[E0599]: no method named `owned` found for mutable reference `&mut dyn Foo` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/object-pointer-types.rs:17:7
2018-08-08 12:28:26 +00:00
|
LL | fn owned(self: Box<Self>);
| --------- the method might not be found because of this arbitrary self type
...
2019-03-09 12:03:44 +00:00
LL | x.owned();
| ^^^^^ method not found in `&mut dyn Foo`
2018-08-08 12:28:26 +00:00
2023-01-06 19:21:47 +00:00
error[E0599]: no method named `managed` found for struct `Box<(dyn Foo + 'static)>` in the current scope
2018-12-25 15:56:47 +00:00
--> $DIR/object-pointer-types.rs:23:7
2018-08-08 12:28:26 +00:00
|
2019-03-09 12:03:44 +00:00
LL | x.managed();
| ^^^^^^^ method not found in `Box<dyn Foo>`
2018-08-08 12:28:26 +00:00
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0599`.