Rollup merge of #102568 - compiler-errors:lint-unsatisfied-opaques, r=oli-obk
Lint against nested opaque types that don't satisfy associated type bounds See the test failures for examples of places where this lint would fire. r? `@oli-obk`
This commit is contained in:
@@ -446,7 +446,9 @@ pub fn in_external_macro(sess: &Session, span: Span) -> bool {
|
||||
match expn_data.kind {
|
||||
ExpnKind::Inlined
|
||||
| ExpnKind::Root
|
||||
| ExpnKind::Desugaring(DesugaringKind::ForLoop | DesugaringKind::WhileLoop) => false,
|
||||
| ExpnKind::Desugaring(
|
||||
DesugaringKind::ForLoop | DesugaringKind::WhileLoop | DesugaringKind::OpaqueTy,
|
||||
) => false,
|
||||
ExpnKind::AstPass(_) | ExpnKind::Desugaring(_) => true, // well, it's "external"
|
||||
ExpnKind::Macro(MacroKind::Bang, _) => {
|
||||
// Dummy span for the `def_site` means it's an external macro.
|
||||
|
||||
Reference in New Issue
Block a user