forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UI tests: Rename "object safe" to "dyn compatible"
- Loading branch information
Showing
157 changed files
with
366 additions
and
364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//@ run-pass | ||
|
||
// Check that `Allocator` is dyn-compatible, this allows for polymorphic allocators | ||
|
||
#![feature(allocator_api)] | ||
|
||
use std::alloc::{Allocator, System}; | ||
|
||
fn ensure_dyn_compatible(_: &dyn Allocator) {} | ||
|
||
fn main() { | ||
ensure_dyn_compatible(&System); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...async-await/in-trait/object-safety.stderr → ...c-await/in-trait/dyn-compatibility.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...rence-impl-trait-for-trait-object-safe.rs → ...ce-impl-trait-for-trait-dyn-compatible.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
error[E0038]: the trait `DynIncompatible` cannot be made into an object | ||
--> $DIR/coherence-impl-trait-for-trait-dyn-compatible.rs:7:26 | ||
| | ||
LL | impl DynIncompatible for dyn DynIncompatible { } | ||
| ^^^^^^^^^^^^^^^^^^^ `DynIncompatible` cannot be made into an object | ||
| | ||
note: for a trait to be "dyn-compatible" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety> | ||
--> $DIR/coherence-impl-trait-for-trait-dyn-compatible.rs:6:45 | ||
| | ||
LL | trait DynIncompatible { fn eq(&self, other: Self); } | ||
| --------------- ^^^^ ...because method `eq` references the `Self` type in this parameter | ||
| | | ||
| this trait cannot be made into an object... | ||
= help: consider moving `eq` to another trait | ||
|
||
error[E0046]: not all trait items implemented, missing: `eq` | ||
--> $DIR/coherence-impl-trait-for-trait-dyn-compatible.rs:7:1 | ||
| | ||
LL | trait DynIncompatible { fn eq(&self, other: Self); } | ||
| -------------------------- `eq` from trait | ||
LL | impl DynIncompatible for dyn DynIncompatible { } | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `eq` in implementation | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0038, E0046. | ||
For more information about an error, try `rustc --explain E0038`. |
27 changes: 0 additions & 27 deletions
27
tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.stderr
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...fety/almost-supertrait-associated-type.rs → ...lity/almost-supertrait-associated-type.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...consts.dyn_compatible_for_dispatch.stderr → ...consts.dyn_compatible_for_dispatch.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../ui/object-safety/object-safety-bounds.rs → tests/ui/dyn-compatibility/bounds.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...object-safety/object-safety-bounds.stderr → tests/ui/dyn-compatibility/bounds.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...safety/object-safety-by-value-self-use.rs → ...ui/dyn-compatibility/by-value-self-use.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ty/object-safety-by-value-self-use.stderr → ...yn-compatibility/by-value-self-use.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ect-safety/object-safety-by-value-self.rs → tests/ui/dyn-compatibility/by-value-self.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
1 change: 1 addition & 0 deletions
1
tests/ui/object-safety/issue-102933.rs → ...ibility/elaborated-predicates-ordering.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
//@ check-pass | ||
// issue: rust-lang/rust#102933 | ||
|
||
use std::future::Future; | ||
|
||
|
File renamed without changes.
File renamed without changes.
Oops, something went wrong.