-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't register predicates for RPITIT items in built-in trait object i…
…mpl confirmation
- Loading branch information
1 parent
30ac7b9
commit e7fdb2e
Showing
6 changed files
with
102 additions
and
16 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
warning: the feature `generic_associated_types_extended` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/gat-extended-bad-afit.rs:9:12 | ||
| | ||
LL | #![feature(generic_associated_types_extended)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #95451 <https://github.com/rust-lang/rust/issues/95451> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
error[E0038]: the trait `HealthCheck` cannot be made into an object | ||
--> $DIR/gat-extended-bad-afit.rs:19:22 | ||
| | ||
LL | dyn HealthCheck: HealthCheck, | ||
| ^^^^^^^^^^^ `HealthCheck` 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/gat-extended-bad-afit.rs:14:14 | ||
| | ||
LL | trait HealthCheck { | ||
| ----------- this trait cannot be made into an object... | ||
LL | async fn check<const N: usize>(&self); | ||
| ^^^^^ | ||
| | | ||
| ...because method `check` is `async` | ||
| ...because method `check` has generic type parameters | ||
= help: consider moving `check` to another trait | ||
|
||
error: aborting due to 1 previous error; 1 warning emitted | ||
|
||
For more information about this error, try `rustc --explain E0038`. |
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,24 @@ | ||
//@ edition: 2021 | ||
//@ revisions: yes no | ||
|
||
// Ice regression test for #131538 | ||
// Make sure that we don't crash when the GATE feature gate is enabled. | ||
|
||
#![cfg_attr(yes, feature(async_fn_in_dyn_trait))] | ||
//[yes]~^ WARN the feature `async_fn_in_dyn_trait` is incomplete | ||
#![feature(generic_associated_types_extended)] | ||
//~^ WARN the feature `generic_associated_types_extended` is incomplete | ||
#![feature(trivial_bounds)] | ||
|
||
trait HealthCheck { | ||
async fn check<const N: usize>(&self); | ||
} | ||
|
||
fn do_health_check_par() | ||
where | ||
dyn HealthCheck: HealthCheck, | ||
//~^ ERROR the trait `HealthCheck` cannot be made into an object | ||
{ | ||
} | ||
|
||
fn main() {} |
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,35 @@ | ||
warning: the feature `async_fn_in_dyn_trait` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/gat-extended-bad-afit.rs:7:26 | ||
| | ||
LL | #![cfg_attr(yes, feature(async_fn_in_dyn_trait))] | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #133119 <https://github.com/rust-lang/rust/issues/133119> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
warning: the feature `generic_associated_types_extended` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/gat-extended-bad-afit.rs:9:12 | ||
| | ||
LL | #![feature(generic_associated_types_extended)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #95451 <https://github.com/rust-lang/rust/issues/95451> for more information | ||
|
||
error[E0038]: the trait `HealthCheck` cannot be made into an object | ||
--> $DIR/gat-extended-bad-afit.rs:19:22 | ||
| | ||
LL | dyn HealthCheck: HealthCheck, | ||
| ^^^^^^^^^^^ `HealthCheck` 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/gat-extended-bad-afit.rs:14:14 | ||
| | ||
LL | trait HealthCheck { | ||
| ----------- this trait cannot be made into an object... | ||
LL | async fn check<const N: usize>(&self); | ||
| ^^^^^ ...because method `check` has generic type parameters | ||
= help: consider moving `check` to another trait | ||
|
||
error: aborting due to 1 previous error; 2 warnings emitted | ||
|
||
For more information about this error, try `rustc --explain E0038`. |