Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
9379da6
Don't imply incorrect things about `Global` in the docs of `System`
maxdexh Sep 25, 2026
06660e6
simplify and clarify fs::set_permissions_nofollow tests
RalfJung Sep 30, 2026
afc0663
add Android support based on fallback path
RalfJung Sep 30, 2026
56bb244
Correctly link to enum variants when present in `Cache::external_path…
GuillaumeGomez Oct 2, 2026
73b2a84
Move `rustdoc-html` tests into the right location
GuillaumeGomez Oct 3, 2026
d78744a
Remove `@ !has` annotations from `tests/rustdoc-html/reexport/doc-hid…
GuillaumeGomez Oct 3, 2026
c1259d2
Point at found impl in "not general enough"
estebank Sep 30, 2026
3862c50
Tweak "not general enough" rendering
estebank Sep 30, 2026
cf56d12
Tweak wording
estebank Sep 30, 2026
ca762cf
Remove redundant information
estebank Sep 30, 2026
337f98d
Tweak note to include trait/impl when appropriate
estebank Sep 30, 2026
f296fdf
implement FCW for `rustc_allowed_through_unstable_modules` items
mejrs Oct 3, 2026
4a652b0
Rollup merge of #163161 - mejrs:deprecated_intrinsic_imports, r=nneth…
JonathanBrouwer Oct 3, 2026
a4b1785
Rollup merge of #163613 - estebank:not-general-enough, r=JonathanBrouwer
JonathanBrouwer Oct 3, 2026
f68e90a
Rollup merge of #163342 - maxdexh:global-and-system-are-not-the-same,…
JonathanBrouwer Oct 3, 2026
de5e281
Rollup merge of #163548 - RalfJung:set_permissions_nofollow-tests, r=…
JonathanBrouwer Oct 3, 2026
09abbb3
Rollup merge of #163682 - GuillaumeGomez:jump-to-variant, r=Urgau
JonathanBrouwer Oct 3, 2026
a8ecd3a
Rollup merge of #163703 - GuillaumeGomez:clean-rustdoc-html-tests, r=…
JonathanBrouwer Oct 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions compiler/rustc_error_messages/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ impl From<Span> for MultiSpan {
}
}

impl From<Option<Span>> for MultiSpan {
fn from(span: Option<Span>) -> MultiSpan {
MultiSpan::from_spans(span.into_iter().collect())
}
}

impl From<Vec<Span>> for MultiSpan {
fn from(spans: Vec<Span>) -> MultiSpan {
MultiSpan::from_spans(spans)
Expand Down
26 changes: 26 additions & 0 deletions compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ pub mod hardwired {
UNREACHABLE_PATTERNS,
UNSAFE_ATTR_OUTSIDE_UNSAFE,
UNSAFE_OP_IN_UNSAFE_FN,
UNSTABLE_IMPORTS,
UNSTABLE_NAME_COLLISIONS,
UNSTABLE_SYNTAX_PRE_EXPANSION,
UNSUPPORTED_CALLING_CONVENTIONS,
Expand Down Expand Up @@ -5857,3 +5858,28 @@ declare_lint! {
"`repr(C, align)` types nested inside `repr(C, packed)` types \
do not always have a C-compatible layout",
}

declare_lint! {
/// The `unstable_imports` lints detects imports that go through unstable modules.
///
/// ### Example
///
/// ```rust
/// use core::intrinsics::transmute;
/// ```
///
/// {{produces}}
///
/// ### Explanation
///
/// Previous versions of Rust accidentally allowed certain imports through unstable modules
/// because stability information of modules was not correctly accounted for if the imported
/// item was stable itself.
pub UNSTABLE_IMPORTS,
Deny,
"lints on accidentally allowed unstable imports",
@future_incompatible = FutureIncompatibleInfo {
reason: fcw!(FutureReleaseError # 163160),
report_in_deps: true,
};
}
2 changes: 1 addition & 1 deletion compiler/rustc_macros/src/diagnostics/subdiagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ impl<'parent, 'a> SubdiagnosticDeriveVariantBuilder<'parent, 'a> {
let binding = info.binding.binding.clone();
// FIXME(#100717): support `Option<Span>` on `primary_span` like in the
// diagnostic derive
if !matches!(info.ty, FieldInnerTy::Plain(_)) {
if !matches!(info.ty, FieldInnerTy::Plain(_) | FieldInnerTy::Option(_)) {
throw_invalid_attr!(attr, |diag| {
let diag = diag.note("there must be exactly one primary span");

Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_passes/src/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ use rustc_hir::{
UsePath, Variant,
};
use rustc_lint_defs::builtin::{
DEPRECATED, DUPLICATE_FEATURES, INEFFECTIVE_UNSTABLE_REEXPORTS,
INEFFECTIVE_UNSTABLE_TRAIT_IMPL, STABLE_FEATURES,
DUPLICATE_FEATURES, INEFFECTIVE_UNSTABLE_REEXPORTS, INEFFECTIVE_UNSTABLE_TRAIT_IMPL,
STABLE_FEATURES, UNSTABLE_IMPORTS,
};
use rustc_middle::hir::nested_filter;
use rustc_middle::middle::lib_features::{FeatureStability, LibFeatures};
Expand Down Expand Up @@ -1079,7 +1079,7 @@ impl<'tcx> Checker<'tcx> {
suggestion,
};
self.tcx.emit_node_span_lint(
DEPRECATED,
UNSTABLE_IMPORTS,
id,
method_span.unwrap_or(span),
diag,
Expand Down
Loading
Loading