We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c19264f commit 776c0beCopy full SHA for 776c0be
src/doc/unstable-book/src/language-features/universal-impl-trait.md
src/librustc/hir/lowering.rs
@@ -989,13 +989,6 @@ impl<'a> LoweringContext<'a> {
989
}, lifetimes)
990
},
991
ImplTraitContext::Universal(def_id) => {
992
- let has_feature = self.sess.features_untracked().universal_impl_trait;
993
- if !t.span.allows_unstable() && !has_feature {
994
- emit_feature_err(&self.sess.parse_sess, "universal_impl_trait",
995
- t.span, GateIssue::Language,
996
- "`impl Trait` in argument position is experimental");
997
- }
998
-
999
let def_node_id = self.next_id().node_id;
1000
1001
// Add a definition for the in-band TyParam
src/librustc/lib.rs
@@ -70,7 +70,7 @@
70
#![feature(specialization)]
71
#![feature(unboxed_closures)]
72
#![feature(underscore_lifetimes)]
73
-#![feature(universal_impl_trait)]
+#![cfg_attr(stage0, feature(universal_impl_trait))]
74
#![feature(trace_macros)]
75
#![feature(trusted_len)]
76
#![feature(catch_expr)]
src/librustc_data_structures/lib.rs
@@ -34,7 +34,7 @@
34
35
#![feature(macro_vis_matcher)]
36
#![feature(allow_internal_unstable)]
37
38
39
#![cfg_attr(unix, feature(libc))]
40
#![cfg_attr(test, feature(test))]
src/librustc_typeck/diagnostics.rs
@@ -4600,7 +4600,6 @@ This error indicates that there is a mismatch between generic parameters and
4600
impl Trait parameters in a trait declaration versus its impl.
4601
4602
```compile_fail,E0643
4603
4604
trait Foo {
4605
fn foo(&self, _: &impl Iterator);
4606
}
src/libsyntax/feature_gate.rs
@@ -279,9 +279,6 @@ declare_features! (
279
// Allows `impl Trait` in function return types.
280
(active, conservative_impl_trait, "1.12.0", Some(34511), None),
281
282
- // Allows `impl Trait` in function arguments.
283
- (active, universal_impl_trait, "1.23.0", Some(34511), None),
284
285
// Allows exhaustive pattern matching on types that contain uninhabited types.
286
(active, exhaustive_patterns, "1.13.0", None, None),
287
@@ -556,6 +553,8 @@ declare_features! (
556
553
(accepted, inclusive_range_syntax, "1.26.0", Some(28237), None),
557
554
// allow `..=` in patterns (RFC 1192)
558
555
(accepted, dotdoteq_in_patterns, "1.26.0", Some(28237), None),
+ // Allows `impl Trait` in function arguments.
+ (accepted, universal_impl_trait, "1.26.0", Some(34511), None),
559
);
560
561
// If you change this, please modify src/doc/unstable-book as well. You must
src/test/compile-fail/impl-trait/impl-generic-mismatch-ab.rs
@@ -8,7 +8,6 @@
8
// option. This file may not be copied, modified, or distributed
9
// except according to those terms.
10
11
12
use std::fmt::Debug;
13
14
src/test/compile-fail/impl-trait/impl-generic-mismatch.rs
src/test/compile-fail/impl-trait/where-allowed.rs
@@ -10,7 +10,7 @@
//! A simple test for testing many permutations of allowedness of
//! impl Trait
-#![feature(conservative_impl_trait, universal_impl_trait, dyn_trait)]
+#![feature(conservative_impl_trait, dyn_trait)]
15
16
// Allowed
src/test/run-pass/impl-trait/example-calendar.rs
@@ -12,7 +12,6 @@
//[nll] compile-flags: -Znll -Zborrowck=mir
#![feature(conservative_impl_trait,
- universal_impl_trait,
fn_traits,
17
step_trait,
18
unboxed_closures,
0 commit comments