about summary refs log tree commit diff
diff options
context:
space:
mode:
authorpetrochenkov <vadim.petrochenkov@gmail.com>2016-07-08 13:35:17 +0300
committerpetrochenkov <vadim.petrochenkov@gmail.com>2016-07-08 13:35:17 +0300
commitd27e55c5d81eaee11ff2d414793cb7278d58d578 (patch)
tree3bbc035f54cdc0e4728c26582306f24956a77a2f
parent390b639e59adbb35b491f3080a07ba7b2ed84072 (diff)
downloadrust-d27e55c5d81eaee11ff2d414793cb7278d58d578.tar.gz
rust-d27e55c5d81eaee11ff2d414793cb7278d58d578.zip
Stabilize `FnOnce::Output` + Fix rebase
-rw-r--r--src/libcore/ops.rs2
-rw-r--r--src/librustc_resolve/lib.rs5
-rw-r--r--src/test/compile-fail/associated-types/cache/project-fn-ret-contravariant.rs1
-rw-r--r--src/test/compile-fail/associated-types/cache/project-fn-ret-invariant.rs1
-rw-r--r--src/test/run-pass/issue-28550.rs2
5 files changed, 3 insertions, 8 deletions
diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs
index 7753aae147a..9347ac2a8c8 100644
--- a/src/libcore/ops.rs
+++ b/src/libcore/ops.rs
@@ -1929,7 +1929,7 @@ pub trait FnMut<Args> : FnOnce<Args> {
 #[fundamental] // so that regex can rely that `&str: !FnMut`
 pub trait FnOnce<Args> {
     /// The returned type after the call operator is used.
-    #[unstable(feature = "fn_traits", issue = "29625")]
+    #[stable(feature = "fn_once_output", since = "1.12.0")]
     type Output;
 
     /// This is called when the call operator is used.
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs
index bcfd8787262..9079cc8ccb1 100644
--- a/src/librustc_resolve/lib.rs
+++ b/src/librustc_resolve/lib.rs
@@ -2287,7 +2287,7 @@ impl<'a> Resolver<'a> {
                                          .and_then(|resolution| {
                         let always_binding = !pat_src.is_refutable() || opt_pat.is_some() ||
                                              bmode != BindingMode::ByValue(Mutability::Immutable);
-                        match def {
+                        match resolution.base_def {
                             Def::Struct(..) | Def::Variant(..) |
                             Def::Const(..) | Def::AssociatedConst(..) if !always_binding => {
                                 // A constant, unit variant, etc pattern.
@@ -2296,12 +2296,11 @@ impl<'a> Resolver<'a> {
                             Def::Struct(..) | Def::Variant(..) |
                             Def::Const(..) | Def::AssociatedConst(..) | Def::Static(..) => {
                                 // A fresh binding that shadows something unacceptable.
-                                let kind_name = PathResolution::new(def).kind_name();
                                 resolve_error(
                                     self,
                                     ident.span,
                                     ResolutionError::BindingShadowsSomethingUnacceptable(
-                                        pat_src.descr(), kind_name, ident.node.name)
+                                        pat_src.descr(), resolution.kind_name(), ident.node.name)
                                 );
                                 None
                             }
diff --git a/src/test/compile-fail/associated-types/cache/project-fn-ret-contravariant.rs b/src/test/compile-fail/associated-types/cache/project-fn-ret-contravariant.rs
index 9404803a32d..c5557cee7cc 100644
--- a/src/test/compile-fail/associated-types/cache/project-fn-ret-contravariant.rs
+++ b/src/test/compile-fail/associated-types/cache/project-fn-ret-contravariant.rs
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(fn_traits)]
 #![feature(unboxed_closures)]
 #![feature(rustc_attrs)]
 
diff --git a/src/test/compile-fail/associated-types/cache/project-fn-ret-invariant.rs b/src/test/compile-fail/associated-types/cache/project-fn-ret-invariant.rs
index 99568213d99..a15422e42d9 100644
--- a/src/test/compile-fail/associated-types/cache/project-fn-ret-invariant.rs
+++ b/src/test/compile-fail/associated-types/cache/project-fn-ret-invariant.rs
@@ -18,7 +18,6 @@
 
 // revisions: ok oneuse transmute krisskross
 
-#![feature(fn_traits)]
 #![allow(dead_code, unused_variables)]
 
 use std::marker::PhantomData;
diff --git a/src/test/run-pass/issue-28550.rs b/src/test/run-pass/issue-28550.rs
index 83e3e40b3a8..f44a535e817 100644
--- a/src/test/run-pass/issue-28550.rs
+++ b/src/test/run-pass/issue-28550.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(fn_traits)]
-
 struct A<F: FnOnce()->T,T>(F::Output);
 struct B<F: FnOnce()->T,T>(A<F,T>);