forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#84623 - jackh726:gats-incomplete, r=nikomatsakis
Make GATs no longer an incomplete feature Blocked on ~rust-lang#84622~, ~rust-lang#82272~, ~rust-lang#76826~ r? `@nikomatsakis`
- Loading branch information
Showing
138 changed files
with
197 additions
and
587 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
1 change: 0 additions & 1 deletion
1
src/test/ui/generic-associated-types/collections-project-default.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,3 @@ | ||
#![allow(incomplete_features)] | ||
#![feature(generic_associated_types)] | ||
#![feature(associated_type_defaults)] | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
src/test/ui/generic-associated-types/collections-project-default.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
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,3 @@ | ||
#![allow(incomplete_features)] | ||
#![feature(generic_associated_types)] | ||
#![feature(associated_type_defaults)] | ||
|
||
|
1 change: 0 additions & 1 deletion
1
src/test/ui/generic-associated-types/const-generics-gat-in-trait-return-type-1.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
1 change: 0 additions & 1 deletion
1
src/test/ui/generic-associated-types/const-generics-gat-in-trait-return-type-2.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
1 change: 0 additions & 1 deletion
1
src/test/ui/generic-associated-types/const-generics-gat-in-trait-return-type-3.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
1 change: 0 additions & 1 deletion
1
src/test/ui/generic-associated-types/constraint-assoc-type-suggestion.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
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
1 change: 0 additions & 1 deletion
1
src/test/ui/generic-associated-types/construct_with_other_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#![allow(incomplete_features)] | ||
#![feature(generic_associated_types)] | ||
|
||
// check-pass | ||
|
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,3 @@ | ||
#![allow(incomplete_features)] | ||
#![feature(generic_associated_types)] | ||
|
||
trait Foo { | ||
|
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
1 change: 0 additions & 1 deletion
1
src/test/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.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
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
15 changes: 3 additions & 12 deletions
15
src/test/ui/generic-associated-types/gat-in-trait-path.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 |
---|---|---|
@@ -1,27 +1,18 @@ | ||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/gat-in-trait-path.rs:1:12 | ||
| | ||
LL | #![feature(generic_associated_types)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: `#[warn(incomplete_features)]` on by default | ||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information | ||
|
||
error[E0038]: the trait `Foo` cannot be made into an object | ||
--> $DIR/gat-in-trait-path.rs:22:13 | ||
--> $DIR/gat-in-trait-path.rs:21:13 | ||
| | ||
LL | fn f(_arg : Box<dyn for<'a> Foo<A<'a> = &'a ()>>) {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object | ||
| | ||
= help: consider moving `A` to another trait | ||
note: for a trait to be "object safe" 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-in-trait-path.rs:6:10 | ||
--> $DIR/gat-in-trait-path.rs:5:10 | ||
| | ||
LL | trait Foo { | ||
| --- this trait cannot be made into an object... | ||
LL | type A<'a> where Self: 'a; | ||
| ^ ...because it contains the generic associated type `A` | ||
|
||
error: aborting due to previous error; 1 warning emitted | ||
error: aborting due to previous error | ||
|
||
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
// run-pass | ||
|
||
#![feature(generic_associated_types)] | ||
//~^ WARNING the feature `generic_associated_types` is incomplete | ||
|
||
fn main() {} |
11 changes: 0 additions & 11 deletions
11
src/test/ui/generic-associated-types/gat-incomplete-warning.stderr
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.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
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
1 change: 0 additions & 1 deletion
1
src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.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
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
1 change: 0 additions & 1 deletion
1
src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.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
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
1 change: 0 additions & 1 deletion
1
src/test/ui/generic-associated-types/generic-associated-type-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
// run-pass | ||
|
||
#![allow(incomplete_features)] | ||
#![feature(generic_associated_types)] | ||
|
||
pub trait X { | ||
|
1 change: 0 additions & 1 deletion
1
src/test/ui/generic-associated-types/generic-associated-types-where.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
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
1 change: 0 additions & 1 deletion
1
src/test/ui/generic-associated-types/generic_associated_type_undeclared_lifetimes.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,3 @@ | ||
#![allow(incomplete_features)] | ||
#![feature(generic_associated_types)] | ||
|
||
use std::ops::Deref; | ||
|
Oops, something went wrong.