diff --git a/src/librustc/middle/typeck/collect.rs b/src/librustc/middle/typeck/collect.rs index 9c49512d4dc0d..c87776ba8935e 100644 --- a/src/librustc/middle/typeck/collect.rs +++ b/src/librustc/middle/typeck/collect.rs @@ -631,14 +631,7 @@ pub fn convert(ccx: &CrateCtxt, it: &ast::Item) { parent_visibility); for trait_ref in opt_trait_ref.iter() { - let trait_ref = instantiate_trait_ref(ccx, trait_ref, selfty); - - // Prevent the builtin kind traits from being manually implemented. - if tcx.lang_items.to_builtin_kind(trait_ref.def_id).is_some() { - tcx.sess.span_err(it.span, - "cannot provide an explicit implementation \ - for a builtin kind"); - } + instantiate_trait_ref(ccx, trait_ref, selfty); } }, ast::ItemTrait(ref generics, _, _, ref trait_methods) => { diff --git a/src/test/compile-fail/cant-implement-builtin-kinds.rs b/src/test/compile-fail/cant-implement-builtin-kinds.rs deleted file mode 100644 index 6bedac6d12d6c..0000000000000 --- a/src/test/compile-fail/cant-implement-builtin-kinds.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// See issue #8517 for why this should be illegal. - -struct X(T); - -impl Send for X { } //~ ERROR cannot provide an explicit implementation for a builtin kind -impl Sized for X { } //~ ERROR cannot provide an explicit implementation for a builtin kind -impl Share for X { } //~ ERROR cannot provide an explicit implementation for a builtin kind - -fn main() { }