Skip to content

Commit 3882567

Browse files
committed
add the ORDER_DEPENDENT_TRAIT_OBJECTS lint
1 parent f4b07e0 commit 3882567

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/librustc/lint/builtin.rs

Lines changed: 8 additions & 0 deletions
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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,11 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
293293
reference: "issue #46205 <https://github.com/rust-lang/rust/issues/46205>",
294294
edition: None,
295295
},
296+
FutureIncompatibleInfo {
297+
id: LintId::of(ORDER_DEPENDENT_TRAIT_OBJECTS),
298+
reference: "issue #33140 <https://github.com/rust-lang/rust/issues/33140>",
299+
edition: None,
300+
},
296301
FutureIncompatibleInfo {
297302
id: LintId::of(TYVAR_BEHIND_RAW_POINTER),
298303
reference: "issue #46906 <https://github.com/rust-lang/rust/issues/46906>",

0 commit comments

Comments
 (0)