Skip to content

Commit c152682

Browse files
committed
add the ORDER_DEPENDENT_TRAIT_OBJECTS lint
1 parent 21f2684 commit c152682

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/librustc/lint/builtin.rs

+8
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,13 @@ declare_lint! {
208208
"potentially-conflicting impls were erroneously allowed"
209209
}
210210

211+
declare_lint! {
212+
pub ORDER_DEPENDENT_TRAIT_OBJECTS,
213+
Deny,
214+
// FIXME: ENG
215+
"trait-object types are different depending on marker-trait order"
216+
}
217+
211218
declare_lint! {
212219
pub BAD_REPR,
213220
Warn,
@@ -405,6 +412,7 @@ impl LintPass for HardwiredLints {
405412
PARENTHESIZED_PARAMS_IN_TYPES_AND_MODULES,
406413
LATE_BOUND_LIFETIME_ARGUMENTS,
407414
INCOHERENT_FUNDAMENTAL_IMPLS,
415+
ORDER_DEPENDENT_TRAIT_OBJECTS,
408416
DEPRECATED,
409417
UNUSED_UNSAFE,
410418
UNUSED_MUT,

src/librustc_lint/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,11 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
295295
reference: "issue #46205 <https://github.com/rust-lang/rust/issues/46205>",
296296
edition: None,
297297
},
298+
FutureIncompatibleInfo {
299+
id: LintId::of(ORDER_DEPENDENT_TRAIT_OBJECTS),
300+
reference: "issue #33140 <https://github.com/rust-lang/rust/issues/33140>",
301+
edition: None,
302+
},
298303
FutureIncompatibleInfo {
299304
id: LintId::of(TYVAR_BEHIND_RAW_POINTER),
300305
reference: "issue #46906 <https://github.com/rust-lang/rust/issues/46906>",

0 commit comments

Comments
 (0)