Skip to content

Commit c49895d

Browse files
committed
Auto merge of #84623 - jackh726:gats-incomplete, r=nikomatsakis
Make GATs no longer an incomplete feature Blocked on ~#84622~, ~#82272~, ~#76826~ r? `@nikomatsakis`
2 parents 2119976 + f1ab6f9 commit c49895d

File tree

138 files changed

+197
-587
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+197
-587
lines changed

compiler/rustc_feature/src/active.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ declare_features! (
405405
(active, in_band_lifetimes, "1.23.0", Some(44524), None),
406406

407407
/// Allows associated types to be generic, e.g., `type Foo<T>;` (RFC 1598).
408-
(incomplete, generic_associated_types, "1.23.0", Some(44265), None),
408+
(active, generic_associated_types, "1.23.0", Some(44265), None),
409409

410410
/// Allows defining `trait X = A + B;` alias items.
411411
(active, trait_alias, "1.24.0", Some(41517), None),

compiler/rustc_lint/src/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2315,7 +2315,7 @@ declare_lint! {
23152315
/// ### Example
23162316
///
23172317
/// ```rust
2318-
/// #![feature(generic_associated_types)]
2318+
/// #![feature(const_generics)]
23192319
/// ```
23202320
///
23212321
/// {{produces}}

src/test/ui/generic-associated-types/collections-project-default.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![allow(incomplete_features)]
21
#![feature(generic_associated_types)]
32
#![feature(associated_type_defaults)]
43

src/test/ui/generic-associated-types/collections-project-default.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> $DIR/collections-project-default.rs:60:5
2+
--> $DIR/collections-project-default.rs:59:5
33
|
44
LL | fn floatify_sibling<C>(ints: &C) -> <C as Collection<i32>>::Sibling<f32>
55
| ------------------------------------ expected `<C as Collection<i32>>::Sibling<f32>` because of return type

src/test/ui/generic-associated-types/collections.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![allow(incomplete_features)]
21
#![feature(generic_associated_types)]
32
#![feature(associated_type_defaults)]
43

src/test/ui/generic-associated-types/const-generics-gat-in-trait-return-type-1.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// run-pass
22
#![feature(generic_associated_types)]
3-
#![allow(incomplete_features)]
43

54
// This test unsures that with_opt_const_param returns the
65
// def_id of the N param in the Foo::Assoc GAT.

src/test/ui/generic-associated-types/const-generics-gat-in-trait-return-type-2.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// run-pass
22
#![feature(generic_associated_types)]
3-
#![allow(incomplete_features)]
43

54
// This test unsures that with_opt_const_param returns the
65
// def_id of the N param in the Foo::Assoc GAT.

src/test/ui/generic-associated-types/const-generics-gat-in-trait-return-type-3.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// run-pass
22
#![feature(generic_associated_types)]
3-
#![allow(incomplete_features)]
43

54
// This test unsures that with_opt_const_param returns the
65
// def_id of the N param in the Bar::Assoc GAT.

src/test/ui/generic-associated-types/constraint-assoc-type-suggestion.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Test that correct syntax is used in suggestion to constrain associated type
22

33
#![feature(generic_associated_types)]
4-
//~^ WARNING the feature `generic_associated_types` is incomplete
54

65
trait X {
76
type Y<T>;
Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
1-
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/constraint-assoc-type-suggestion.rs:3:12
3-
|
4-
LL | #![feature(generic_associated_types)]
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^
6-
|
7-
= note: `#[warn(incomplete_features)]` on by default
8-
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
9-
101
error[E0308]: mismatched types
11-
--> $DIR/constraint-assoc-type-suggestion.rs:13:23
2+
--> $DIR/constraint-assoc-type-suggestion.rs:12:23
123
|
134
LL | let b: Vec<i32> = a;
145
| -------- ^ expected struct `Vec`, found associated type
@@ -22,6 +13,6 @@ help: consider constraining the associated type `<T as X>::Y<i32>` to `Vec<i32>`
2213
LL | fn f<T: X<Y<i32> = Vec<i32>>>(a: T::Y<i32>) {
2314
| ^^^^^^^^^^^^^^^^^^^
2415

25-
error: aborting due to previous error; 1 warning emitted
16+
error: aborting due to previous error
2617

2718
For more information about this error, try `rustc --explain E0308`.

0 commit comments

Comments
 (0)