Skip to content

Commit 0d0869a

Browse files
committed
Remove the deprecated opt_out_copy feature
1 parent 5b3cd39 commit 0d0869a

File tree

4 files changed

+3
-115
lines changed

4 files changed

+3
-115
lines changed

src/librustc/middle/traits/select.rs

+2-21
Original file line numberDiff line numberDiff line change
@@ -713,12 +713,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
713713
debug!("obligation self ty is {}",
714714
obligation.predicate.0.self_ty().repr(self.tcx()));
715715

716-
// If the user has asked for the older, compatibility
717-
// behavior, ignore user-defined impls here. This will
718-
// go away by the time 1.0 is released.
719-
if !self.tcx().sess.features.borrow().opt_out_copy {
720-
try!(self.assemble_candidates_from_impls(obligation, &mut candidates.vec));
721-
}
716+
try!(self.assemble_candidates_from_impls(obligation, &mut candidates.vec));
722717

723718
try!(self.assemble_builtin_bound_candidates(ty::BoundCopy,
724719
stack,
@@ -1505,21 +1500,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
15051500
}
15061501

15071502
ty::BoundCopy => {
1508-
// This is an Opt-In Built-In Trait. So, unless
1509-
// the user is asking for the old behavior, we
1510-
// don't supply any form of builtin impl.
1511-
if !this.tcx().sess.features.borrow().opt_out_copy {
1512-
return Ok(ParameterBuiltin)
1513-
} else {
1514-
// Older, backwards compatibility behavior:
1515-
if
1516-
Some(def_id) == tcx.lang_items.no_copy_bound() ||
1517-
Some(def_id) == tcx.lang_items.managed_bound() ||
1518-
ty::has_dtor(tcx, def_id)
1519-
{
1520-
return Err(Unimplemented);
1521-
}
1522-
}
1503+
return Ok(ParameterBuiltin)
15231504
}
15241505

15251506
ty::BoundSync => {

src/libsyntax/feature_gate.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
8282
("issue_5723_bootstrap", Accepted),
8383

8484
// A way to temporarily opt out of opt in copy. This will *never* be accepted.
85-
("opt_out_copy", Deprecated),
85+
("opt_out_copy", Removed),
8686

8787
// A way to temporarily opt out of the new orphan rules. This will *never* be accepted.
8888
("old_orphan_check", Deprecated),
@@ -123,7 +123,6 @@ pub struct Features {
123123
pub import_shadowing: bool,
124124
pub visible_private_types: bool,
125125
pub quote: bool,
126-
pub opt_out_copy: bool,
127126
pub old_orphan_check: bool,
128127
}
129128

@@ -135,7 +134,6 @@ impl Features {
135134
import_shadowing: false,
136135
visible_private_types: false,
137136
quote: false,
138-
opt_out_copy: false,
139137
old_orphan_check: false,
140138
}
141139
}
@@ -465,7 +463,6 @@ fn check_crate_inner<F>(cm: &CodeMap, span_handler: &SpanHandler, krate: &ast::C
465463
import_shadowing: cx.has_feature("import_shadowing"),
466464
visible_private_types: cx.has_feature("visible_private_types"),
467465
quote: cx.has_feature("quote"),
468-
opt_out_copy: cx.has_feature("opt_out_copy"),
469466
old_orphan_check: cx.has_feature("old_orphan_check"),
470467
},
471468
unknown_features)

src/test/compile-fail/opt-out-copy-bad.rs

-44
This file was deleted.

src/test/run-pass/opt-out-copy.rs

-46
This file was deleted.

0 commit comments

Comments
 (0)