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