diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-10-04 16:11:02 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-04 16:11:02 +0530 |
| commit | 35f92ed1bf880ccc2585a67fe3a429e48b757402 (patch) | |
| tree | 5bc30a676a673f9a0f3d0cec66fe9c2bb16a867c /compiler/rustc_middle/src | |
| parent | 32dde232d8a67cd305748d951b2112585886e321 (diff) | |
| parent | 7a8854037b81e04bea5309e5b107bfe09fc841c0 (diff) | |
| download | rust-35f92ed1bf880ccc2585a67fe3a429e48b757402.tar.gz rust-35f92ed1bf880ccc2585a67fe3a429e48b757402.zip | |
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`
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/lint.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/lint.rs b/compiler/rustc_middle/src/lint.rs index b3b02f5b987..d95c5cbd654 100644 --- a/compiler/rustc_middle/src/lint.rs +++ b/compiler/rustc_middle/src/lint.rs @@ -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. |
