]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #105484 - nbdd0121:upcast, r=compiler-errors
authorfee1-dead <ent3rm4n@gmail.com>
Wed, 28 Dec 2022 07:51:41 +0000 (15:51 +0800)
committerGitHub <noreply@github.com>
Wed, 28 Dec 2022 07:51:41 +0000 (15:51 +0800)
Implement allow-by-default `multiple_supertrait_upcastable` lint

The lint detects when an object-safe trait has multiple supertraits.

Enabled in libcore and liballoc as they are low-level enough that many embedded programs will use them.

r? `@nikomatsakis`

1  2 
compiler/rustc_feature/src/active.rs
compiler/rustc_lint/src/lib.rs
compiler/rustc_span/src/symbol.rs
library/alloc/src/lib.rs

Simple merge
index 1275d6f223c7a38ebe5fbfd42cc50c04c4990149,f9c86f8b5f316ead64067f8a344b00881eb8b5bd..44ee4172675e0cad8517323d9dcd8d10dba32760
@@@ -229,8 -230,10 +231,9 @@@ late_lint_methods!
              InvalidAtomicOrdering: InvalidAtomicOrdering,
              NamedAsmLabels: NamedAsmLabels,
              OpaqueHiddenInferredBound: OpaqueHiddenInferredBound,
+             MultipleSupertraitUpcastable: MultipleSupertraitUpcastable,
          ]
 -    ],
 -    ['tcx]
 +    ]
  );
  
  pub fn new_lint_store(internal_lints: bool) -> LintStore {
Simple merge
Simple merge