Skip to content

Commit d9fb15c

Browse files
authored
r? @ghost changelog: none
2 parents 00e5e1b + 9aa70f2 commit d9fb15c

20 files changed

+32
-43
lines changed

clippy_lints/src/doc/broken_link.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use clippy_utils::diagnostics::span_lint;
2-
use pulldown_cmark::BrokenLink as PullDownBrokenLink;
32
use rustc_lint::LateContext;
3+
use rustc_resolve::rustdoc::pulldown_cmark::BrokenLink as PullDownBrokenLink;
44
use rustc_resolve::rustdoc::{DocFragment, source_span_for_markdown_range};
55
use rustc_span::{BytePos, Pos, Span};
66

clippy_lints/src/doc/mod.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@ use clippy_config::Conf;
44
use clippy_utils::attrs::is_doc_hidden;
55
use clippy_utils::diagnostics::{span_lint, span_lint_and_help, span_lint_and_then};
66
use clippy_utils::{is_entrypoint_fn, is_trait_impl_item};
7-
use pulldown_cmark::Event::{
8-
Code, DisplayMath, End, FootnoteReference, HardBreak, Html, InlineHtml, InlineMath, Rule, SoftBreak, Start,
9-
TaskListMarker, Text,
10-
};
11-
use pulldown_cmark::Tag::{BlockQuote, CodeBlock, FootnoteDefinition, Heading, Item, Link, Paragraph};
12-
use pulldown_cmark::{BrokenLink, CodeBlockKind, CowStr, Options, TagEnd};
137
use rustc_data_structures::fx::FxHashSet;
148
use rustc_errors::Applicability;
159
use rustc_hir::{Attribute, ImplItemKind, ItemKind, Node, Safety, TraitItemKind};
1610
use rustc_lint::{EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintContext};
11+
use rustc_resolve::rustdoc::pulldown_cmark::Event::{
12+
Code, DisplayMath, End, FootnoteReference, HardBreak, Html, InlineHtml, InlineMath, Rule, SoftBreak, Start,
13+
TaskListMarker, Text,
14+
};
15+
use rustc_resolve::rustdoc::pulldown_cmark::Tag::{
16+
BlockQuote, CodeBlock, FootnoteDefinition, Heading, Item, Link, Paragraph,
17+
};
18+
use rustc_resolve::rustdoc::pulldown_cmark::{BrokenLink, CodeBlockKind, CowStr, Options, TagEnd};
1719
use rustc_resolve::rustdoc::{
18-
DocFragment, add_doc_fragment, attrs_to_doc_fragments, main_body_opts, source_span_for_markdown_range,
19-
span_of_fragments,
20+
DocFragment, add_doc_fragment, attrs_to_doc_fragments, main_body_opts, pulldown_cmark,
21+
source_span_for_markdown_range, span_of_fragments,
2022
};
2123
use rustc_session::impl_lint_pass;
2224
use rustc_span::Span;

clippy_lints/src/future_not_send.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend {
9090
let ocx = ObligationCtxt::new_with_diagnostics(&infcx);
9191
let cause = traits::ObligationCause::misc(span, fn_def_id);
9292
ocx.register_bound(cause, cx.param_env, ret_ty, send_trait);
93-
let send_errors = ocx.select_all_or_error();
93+
let send_errors = ocx.evaluate_obligations_error_on_ambiguity();
9494

9595
// Allow errors that try to prove `Send` for types that "mention" a generic parameter at the "top
9696
// level".

clippy_lints/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
rustc::internal
2828
)]
2929

30-
// FIXME: switch to something more ergonomic here, once available.
31-
// (Currently there is no way to opt into sysroot crates without `extern crate`.)
32-
extern crate pulldown_cmark;
3330
extern crate rustc_abi;
3431
extern crate rustc_arena;
3532
extern crate rustc_ast;
@@ -53,8 +50,6 @@ extern crate rustc_session;
5350
extern crate rustc_span;
5451
extern crate rustc_target;
5552
extern crate rustc_trait_selection;
56-
extern crate smallvec;
57-
extern crate thin_vec;
5853

5954
#[macro_use]
6055
extern crate clippy_utils;

clippy_lints/src/methods/ip_constant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use clippy_utils::consts::{ConstEvalCtxt, Constant};
22
use clippy_utils::diagnostics::span_lint_and_then;
3+
use rustc_data_structures::smallvec::SmallVec;
34
use rustc_errors::Applicability;
45
use rustc_hir::{Expr, ExprKind, QPath, TyKind};
56
use rustc_lint::LateContext;
67
use rustc_span::sym;
7-
use smallvec::SmallVec;
88

99
use super::IP_CONSTANT;
1010

clippy_lints/src/unnested_or_patterns.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use rustc_ast::PatKind::*;
99
use rustc_ast::mut_visit::*;
1010
use rustc_ast::{self as ast, DUMMY_NODE_ID, Mutability, Pat, PatKind};
1111
use rustc_ast_pretty::pprust;
12+
use rustc_data_structures::thin_vec::{ThinVec, thin_vec};
1213
use rustc_errors::Applicability;
1314
use rustc_lint::{EarlyContext, EarlyLintPass};
1415
use rustc_session::impl_lint_pass;
@@ -17,7 +18,6 @@ use rustc_span::DUMMY_SP;
1718
use std::boxed::Box;
1819
use std::cell::Cell;
1920
use std::mem;
20-
use thin_vec::{ThinVec, thin_vec};
2121

2222
declare_clippy_lint! {
2323
/// ### What it does

clippy_utils/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This crate is only guaranteed to build with this `nightly` toolchain:
88

99
<!-- begin autogenerated nightly -->
1010
```
11-
nightly-2025-10-06
11+
nightly-2025-10-16
1212
```
1313
<!-- end autogenerated nightly -->
1414

clippy_utils/src/consts.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
//! executable MIR bodies, so we have to do this instead.
55
#![expect(clippy::float_cmp)]
66

7+
use crate::res::MaybeDef;
78
use crate::source::{SpanRangeExt, walk_span_to_context};
8-
use crate::{clip, is_direct_expn_of, paths, sext, sym, unsext};
9+
use crate::{clip, is_direct_expn_of, sext, sym, unsext};
910

1011
use rustc_abi::Size;
1112
use rustc_apfloat::Float;
@@ -805,10 +806,10 @@ impl<'tcx> ConstEvalCtxt<'tcx> {
805806
| sym::i128_legacy_const_max
806807
)
807808
) || self.tcx.opt_parent(did).is_some_and(|parent| {
808-
paths::F16_CONSTS.matches(&self.tcx, parent)
809-
|| paths::F32_CONSTS.matches(&self.tcx, parent)
810-
|| paths::F64_CONSTS.matches(&self.tcx, parent)
811-
|| paths::F128_CONSTS.matches(&self.tcx, parent)
809+
parent.is_diag_item(&self.tcx, sym::f16_consts_mod)
810+
|| parent.is_diag_item(&self.tcx, sym::f32_consts_mod)
811+
|| parent.is_diag_item(&self.tcx, sym::f64_consts_mod)
812+
|| parent.is_diag_item(&self.tcx, sym::f128_consts_mod)
812813
})) =>
813814
{
814815
did

clippy_utils/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
// FIXME: switch to something more ergonomic here, once available.
2727
// (Currently there is no way to opt into sysroot crates without `extern crate`.)
28-
extern crate indexmap;
2928
extern crate rustc_abi;
3029
extern crate rustc_ast;
3130
extern crate rustc_attr_parsing;
@@ -49,7 +48,6 @@ extern crate rustc_mir_dataflow;
4948
extern crate rustc_session;
5049
extern crate rustc_span;
5150
extern crate rustc_trait_selection;
52-
extern crate smallvec;
5351

5452
pub mod ast_utils;
5553
pub mod attrs;
@@ -93,6 +91,7 @@ use rustc_abi::Integer;
9391
use rustc_ast::ast::{self, LitKind, RangeLimits};
9492
use rustc_ast::join_path_syms;
9593
use rustc_data_structures::fx::FxHashMap;
94+
use rustc_data_structures::indexmap;
9695
use rustc_data_structures::packed::Pu128;
9796
use rustc_data_structures::unhash::UnindexMap;
9897
use rustc_hir::LangItem::{OptionNone, OptionSome, ResultErr, ResultOk};

clippy_utils/src/msrvs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ use crate::sym;
22
use rustc_ast::Attribute;
33
use rustc_ast::attr::AttributeExt;
44
use rustc_attr_parsing::parse_version;
5+
use rustc_data_structures::smallvec::SmallVec;
56
use rustc_hir::RustcVersion;
67
use rustc_lint::LateContext;
78
use rustc_session::Session;
89
use rustc_span::Symbol;
910
use serde::Deserialize;
10-
use smallvec::SmallVec;
1111
use std::iter::once;
1212
use std::sync::atomic::{AtomicBool, Ordering};
1313

0 commit comments

Comments
 (0)