Skip to content

Commit 5614e83

Browse files
committed
Remove vecs_implicitly_copyable from the compiler
1 parent ccfb3eb commit 5614e83

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

src/librustc/middle/lint.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ pub enum lint {
5151
implicit_copies,
5252
unrecognized_lint,
5353
non_implicitly_copyable_typarams,
54-
vecs_implicitly_copyable,
5554
deprecated_pattern,
5655
non_camel_case_types,
5756
type_limits,
@@ -132,14 +131,6 @@ static lint_table: &'static [(&'static str, LintSpec)] = &[
132131
default: warn
133132
}),
134133

135-
("vecs_implicitly_copyable",
136-
LintSpec {
137-
lint: vecs_implicitly_copyable,
138-
desc: "make vecs and strs not implicitly copyable \
139-
(only checked at top level)",
140-
default: warn
141-
}),
142-
143134
("implicit_copies",
144135
LintSpec {
145136
lint: implicit_copies,

src/librustc/middle/ty.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ use metadata::csearch;
1414
use metadata;
1515
use middle::const_eval;
1616
use middle::freevars;
17-
use middle::lint::{get_lint_level, allow};
18-
use middle::lint;
1917
use middle::resolve::{Impl, MethodInfo};
2018
use middle::resolve;
2119
use middle::ty;
@@ -241,7 +239,6 @@ struct ctxt_ {
241239
diag: @syntax::diagnostic::span_handler,
242240
interner: @mut HashMap<intern_key, ~t_box_>,
243241
next_id: @mut uint,
244-
vecs_implicitly_copyable: bool,
245242
legacy_modes: bool,
246243
cstore: @mut metadata::cstore::CStore,
247244
sess: session::Session,
@@ -992,14 +989,10 @@ pub fn mk_ctxt(s: session::Session,
992989
}
993990
}
994991

995-
let vecs_implicitly_copyable =
996-
get_lint_level(s.lint_settings.default_settings,
997-
lint::vecs_implicitly_copyable) == allow;
998992
@ctxt_ {
999993
diag: s.diagnostic(),
1000994
interner: @mut HashMap::new(),
1001995
next_id: @mut primitives::LAST_PRIMITIVE_ID,
1002-
vecs_implicitly_copyable: vecs_implicitly_copyable,
1003996
legacy_modes: legacy_modes,
1004997
cstore: s.cstore,
1005998
sess: s,
@@ -1946,8 +1939,7 @@ pub impl TypeContents {
19461939
}
19471940

19481941
fn nonimplicitly_copyable(cx: ctxt) -> TypeContents {
1949-
let base = TypeContents::noncopyable(cx) + TC_OWNED_POINTER;
1950-
if cx.vecs_implicitly_copyable {base} else {base + TC_OWNED_VEC}
1942+
TypeContents::noncopyable(cx) + TC_OWNED_POINTER + TC_OWNED_VEC
19511943
}
19521944

19531945
fn needs_drop(&self, cx: ctxt) -> bool {

0 commit comments

Comments
 (0)