File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,21 @@ declare_lint_pass!(QueryStability => [POTENTIAL_QUERY_INSTABILITY]);
5959
6060impl LateLintPass < ' _ > for QueryStability {
6161 fn check_expr ( & mut self , cx : & LateContext < ' _ > , expr : & Expr < ' _ > ) {
62+ // FIXME(rustdoc): This lint uses typecheck results, causing rustdoc to
63+ // error if there are resolution failures.
64+ //
65+ // As internal lints are currently always run if there are `unstable_options`,
66+ // they are added to the lint store of rustdoc. Internal lints are also
67+ // not used via the `lint_mod` query. Crate lints run outside of a query
68+ // so rustdoc currently doesn't disable them.
69+ //
70+ // Instead of relying on this, either change crate lints to a query disabled by
71+ // rustdoc, only run internal lints if the user is explicitly opting in
72+ // or figure out a different way to avoid running lints for rustdoc.
73+ if cx. tcx . sess . opts . actually_rustdoc {
74+ return ;
75+ }
76+
6277 let ( def_id, span) = match expr. kind {
6378 ExprKind :: Path ( ref path) if let Some ( def_id) = cx. qpath_res ( path, expr. hir_id ) . opt_def_id ( ) => {
6479 ( def_id, expr. span )
You can’t perform that action at this time.
0 commit comments