diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index 7753aae147a88..9347ac2a8c82f 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -1929,7 +1929,7 @@ pub trait FnMut : FnOnce { #[fundamental] // so that regex can rely that `&str: !FnMut` pub trait FnOnce { /// 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 bcfd87872628e..9079cc8ccb122 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 9404803a32dd8..c5557cee7cc1d 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 99568213d9907..a15422e42d94a 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 83e3e40b3a820..f44a535e8176e 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 AT,T>(F::Output); struct BT,T>(A);