Skip to content

Rollup of 8 pull requests #129663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
21dd88f
exit: explain our expectations for the exit handlers registered in a …
RalfJung Aug 25, 2024
43fe7c1
library: Stabilize new_uninit for Box, Rc, and Arc
workingjubilee Aug 22, 2024
0b1fd5d
compiler: Remove feature(new_uninit)
workingjubilee Aug 22, 2024
ae88be4
miri: Remove feature(new_uninit)
workingjubilee Aug 22, 2024
56d8611
Fix tidy
compiler-errors Jul 22, 2024
38e62b9
Use unsafe extern blocks throughout the compiler
compiler-errors Aug 26, 2024
e81fad2
Add `warn(unreachable_pub)` to `rustc_driver_impl`.
nnethercote Aug 27, 2024
d607cfb
Add `warn(unreachable_pub)` to `rustc_error_codes`.
nnethercote Aug 27, 2024
2b56212
Add `warn(unreachable_pub)` to `rustc_error_messages`.
nnethercote Aug 27, 2024
5fd503a
Add `warn(unreachable_pub)` to `rustc_errors`.
nnethercote Aug 27, 2024
df5fbf0
Add `warn(unreachable_pub)` to `rustc_expand`.
nnethercote Aug 27, 2024
0d8d05c
Add `warn(unreachable_pub)` to `rustc_feature`.
nnethercote Aug 27, 2024
a510813
Add `warn(unreachable_pub)` to `rustc_fluent_macro`.
nnethercote Aug 27, 2024
fa18140
Add `warn(unreachable_pub)` to `rustc_graphviz`.
nnethercote Aug 27, 2024
bffa224
Add `warn(unreachable_pub)` to `rustc_hir`.
nnethercote Aug 27, 2024
5acf4e7
Add `warn(unreachable_pub)` to `rustc_hir_analysis`.
nnethercote Aug 27, 2024
3aae994
Add `warn(unreachable_pub)` to `rustc_hir_pretty`.
nnethercote Aug 27, 2024
7fc0444
Add `warn(unreachable_pub)` to `rustc_hir_typeck`.
nnethercote Aug 27, 2024
969f970
Fix typos in floating-point primitive type docs
beetrees Aug 27, 2024
d054835
Reflow a couple of paragraphs in floating-point primitive docs
beetrees Aug 27, 2024
37becf7
Add `warn(unreachable_pub)` to `rustc_incremental`.
nnethercote Aug 27, 2024
46fe09f
Add `warn(unreachable_pub)` to `rustc_index`.
nnethercote Aug 27, 2024
6887927
Add `warn(unreachable_pub)` to `rustc_infer`.
nnethercote Aug 27, 2024
a941a4b
Add `warn(unreachable_pub)` to `rustc_interface`.
nnethercote Aug 27, 2024
6c84c55
Add `warn(unreachable_pub)` to `rustc_lexer`.
nnethercote Aug 27, 2024
f102841
Add `warn(unreachable_pub)` to `rustc_lint`.
nnethercote Aug 27, 2024
e7f1922
Add `warn(unreachable_pub)` to `rustc_lint_defs`.
nnethercote Aug 27, 2024
22cdd63
Add `warn(unreachable_pub)` to `rustc_llvm`.
nnethercote Aug 27, 2024
ab7b03e
ABI compat check: detect unadjusted ABI mismatches
RalfJung Aug 27, 2024
ab4a743
fix Pointer to reference conversion docs
RalfJung Aug 27, 2024
1990361
Rollup merge of #129401 - workingjubilee:partial-initialization-of-st…
matthiaskrgr Aug 27, 2024
a6225c0
Rollup merge of #129581 - RalfJung:exit, r=joshtriplett
matthiaskrgr Aug 27, 2024
3e7d007
Rollup merge of #129634 - compiler-errors:tidy-2024, r=albertlarsan68
matthiaskrgr Aug 27, 2024
3c61ccc
Rollup merge of #129635 - compiler-errors:unsafe-blocks, r=spastorino
matthiaskrgr Aug 27, 2024
93992f1
Rollup merge of #129645 - beetrees:fix-float-docs, r=tgross35
matthiaskrgr Aug 27, 2024
b4aa7c3
Rollup merge of #129648 - nnethercote:unreachable_pub-2, r=Urgau
matthiaskrgr Aug 27, 2024
92a4bb7
Rollup merge of #129649 - RalfJung:unadjusted-abi-mismatch, r=petroch…
matthiaskrgr Aug 27, 2024
8d6aafa
Rollup merge of #129652 - RalfJung:ptr-to-ref, r=traviscross
matthiaskrgr Aug 27, 2024
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
Prev Previous commit
Next Next commit
Add warn(unreachable_pub) to rustc_incremental.
  • Loading branch information
nnethercote committed Aug 27, 2024
commit 37becf7bdcff5037cbb214277eb74ef17d8527f0
4 changes: 2 additions & 2 deletions compiler/rustc_incremental/src/assert_dep_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ use {rustc_ast as ast, rustc_graphviz as dot, rustc_hir as hir};
use crate::errors;

#[allow(missing_docs)]
pub fn assert_dep_graph(tcx: TyCtxt<'_>) {
pub(crate) fn assert_dep_graph(tcx: TyCtxt<'_>) {
tcx.dep_graph.with_ignore(|| {
if tcx.sess.opts.unstable_opts.dump_dep_graph {
tcx.dep_graph.with_query(dump_graph);
Expand Down Expand Up @@ -261,7 +261,7 @@ fn dump_graph(query: &DepGraphQuery) {
}

#[allow(missing_docs)]
pub struct GraphvizDepGraph(FxIndexSet<DepKind>, Vec<(DepKind, DepKind)>);
struct GraphvizDepGraph(FxIndexSet<DepKind>, Vec<(DepKind, DepKind)>);

impl<'a> dot::GraphWalk<'a> for GraphvizDepGraph {
type Node = DepKind;
Expand Down
82 changes: 41 additions & 41 deletions compiler/rustc_incremental/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,36 @@ use rustc_span::{Span, Symbol};

#[derive(Diagnostic)]
#[diag(incremental_unrecognized_depnode)]
pub struct UnrecognizedDepNode {
pub(crate) struct UnrecognizedDepNode {
#[primary_span]
pub span: Span,
pub name: Symbol,
}

#[derive(Diagnostic)]
#[diag(incremental_missing_depnode)]
pub struct MissingDepNode {
pub(crate) struct MissingDepNode {
#[primary_span]
pub span: Span,
}

#[derive(Diagnostic)]
#[diag(incremental_missing_if_this_changed)]
pub struct MissingIfThisChanged {
pub(crate) struct MissingIfThisChanged {
#[primary_span]
pub span: Span,
}

#[derive(Diagnostic)]
#[diag(incremental_ok)]
pub struct Ok {
pub(crate) struct Ok {
#[primary_span]
pub span: Span,
}

#[derive(Diagnostic)]
#[diag(incremental_no_path)]
pub struct NoPath {
pub(crate) struct NoPath {
#[primary_span]
pub span: Span,
pub target: Symbol,
Expand All @@ -44,7 +44,7 @@ pub struct NoPath {

#[derive(Diagnostic)]
#[diag(incremental_assertion_auto)]
pub struct AssertionAuto<'a> {
pub(crate) struct AssertionAuto<'a> {
#[primary_span]
pub span: Span,
pub name: &'a str,
Expand All @@ -53,139 +53,139 @@ pub struct AssertionAuto<'a> {

#[derive(Diagnostic)]
#[diag(incremental_undefined_clean_dirty_assertions_item)]
pub struct UndefinedCleanDirtyItem {
pub(crate) struct UndefinedCleanDirtyItem {
#[primary_span]
pub span: Span,
pub kind: String,
}

#[derive(Diagnostic)]
#[diag(incremental_undefined_clean_dirty_assertions)]
pub struct UndefinedCleanDirty {
pub(crate) struct UndefinedCleanDirty {
#[primary_span]
pub span: Span,
pub kind: String,
}

#[derive(Diagnostic)]
#[diag(incremental_repeated_depnode_label)]
pub struct RepeatedDepNodeLabel<'a> {
pub(crate) struct RepeatedDepNodeLabel<'a> {
#[primary_span]
pub span: Span,
pub label: &'a str,
}

#[derive(Diagnostic)]
#[diag(incremental_unrecognized_depnode_label)]
pub struct UnrecognizedDepNodeLabel<'a> {
pub(crate) struct UnrecognizedDepNodeLabel<'a> {
#[primary_span]
pub span: Span,
pub label: &'a str,
}

#[derive(Diagnostic)]
#[diag(incremental_not_dirty)]
pub struct NotDirty<'a> {
pub(crate) struct NotDirty<'a> {
#[primary_span]
pub span: Span,
pub dep_node_str: &'a str,
}

#[derive(Diagnostic)]
#[diag(incremental_not_clean)]
pub struct NotClean<'a> {
pub(crate) struct NotClean<'a> {
#[primary_span]
pub span: Span,
pub dep_node_str: &'a str,
}

#[derive(Diagnostic)]
#[diag(incremental_not_loaded)]
pub struct NotLoaded<'a> {
pub(crate) struct NotLoaded<'a> {
#[primary_span]
pub span: Span,
pub dep_node_str: &'a str,
}

#[derive(Diagnostic)]
#[diag(incremental_unknown_item)]
pub struct UnknownItem {
pub(crate) struct UnknownItem {
#[primary_span]
pub span: Span,
pub name: Symbol,
}

#[derive(Diagnostic)]
#[diag(incremental_no_cfg)]
pub struct NoCfg {
pub(crate) struct NoCfg {
#[primary_span]
pub span: Span,
}

#[derive(Diagnostic)]
#[diag(incremental_associated_value_expected_for)]
pub struct AssociatedValueExpectedFor {
pub(crate) struct AssociatedValueExpectedFor {
#[primary_span]
pub span: Span,
pub ident: Ident,
}

#[derive(Diagnostic)]
#[diag(incremental_associated_value_expected)]
pub struct AssociatedValueExpected {
pub(crate) struct AssociatedValueExpected {
#[primary_span]
pub span: Span,
}

#[derive(Diagnostic)]
#[diag(incremental_unchecked_clean)]
pub struct UncheckedClean {
pub(crate) struct UncheckedClean {
#[primary_span]
pub span: Span,
}

#[derive(Diagnostic)]
#[diag(incremental_delete_old)]
pub struct DeleteOld<'a> {
pub(crate) struct DeleteOld<'a> {
pub name: &'a str,
pub path: PathBuf,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_create_new)]
pub struct CreateNew<'a> {
pub(crate) struct CreateNew<'a> {
pub name: &'a str,
pub path: PathBuf,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_write_new)]
pub struct WriteNew<'a> {
pub(crate) struct WriteNew<'a> {
pub name: &'a str,
pub path: PathBuf,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_canonicalize_path)]
pub struct CanonicalizePath {
pub(crate) struct CanonicalizePath {
pub path: PathBuf,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_create_incr_comp_dir)]
pub struct CreateIncrCompDir<'a> {
pub(crate) struct CreateIncrCompDir<'a> {
pub tag: &'a str,
pub path: &'a Path,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_create_lock)]
pub struct CreateLock<'a> {
pub(crate) struct CreateLock<'a> {
pub lock_err: std::io::Error,
pub session_dir: &'a Path,
#[note(incremental_lock_unsupported)]
Expand All @@ -197,113 +197,113 @@ pub struct CreateLock<'a> {

#[derive(Diagnostic)]
#[diag(incremental_delete_lock)]
pub struct DeleteLock<'a> {
pub(crate) struct DeleteLock<'a> {
pub path: &'a Path,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_hard_link_failed)]
pub struct HardLinkFailed<'a> {
pub(crate) struct HardLinkFailed<'a> {
pub path: &'a Path,
}

#[derive(Diagnostic)]
#[diag(incremental_delete_partial)]
pub struct DeletePartial<'a> {
pub(crate) struct DeletePartial<'a> {
pub path: &'a Path,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_delete_full)]
pub struct DeleteFull<'a> {
pub(crate) struct DeleteFull<'a> {
pub path: &'a Path,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_finalize)]
pub struct Finalize<'a> {
pub(crate) struct Finalize<'a> {
pub path: &'a Path,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_invalid_gc_failed)]
pub struct InvalidGcFailed<'a> {
pub(crate) struct InvalidGcFailed<'a> {
pub path: &'a Path,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_finalized_gc_failed)]
pub struct FinalizedGcFailed<'a> {
pub(crate) struct FinalizedGcFailed<'a> {
pub path: &'a Path,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_session_gc_failed)]
pub struct SessionGcFailed<'a> {
pub(crate) struct SessionGcFailed<'a> {
pub path: &'a Path,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_assert_not_loaded)]
pub struct AssertNotLoaded;
pub(crate) struct AssertNotLoaded;

#[derive(Diagnostic)]
#[diag(incremental_assert_loaded)]
pub struct AssertLoaded;
pub(crate) struct AssertLoaded;

#[derive(Diagnostic)]
#[diag(incremental_delete_incompatible)]
pub struct DeleteIncompatible {
pub(crate) struct DeleteIncompatible {
pub path: PathBuf,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_load_dep_graph)]
pub struct LoadDepGraph {
pub(crate) struct LoadDepGraph {
pub path: PathBuf,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_move_dep_graph)]
pub struct MoveDepGraph<'a> {
pub(crate) struct MoveDepGraph<'a> {
pub from: &'a Path,
pub to: &'a Path,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_create_dep_graph)]
pub struct CreateDepGraph<'a> {
pub(crate) struct CreateDepGraph<'a> {
pub path: &'a Path,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_copy_workproduct_to_cache)]
pub struct CopyWorkProductToCache<'a> {
pub(crate) struct CopyWorkProductToCache<'a> {
pub from: &'a Path,
pub to: &'a Path,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_delete_workproduct)]
pub struct DeleteWorkProduct<'a> {
pub(crate) struct DeleteWorkProduct<'a> {
pub path: &'a Path,
pub err: std::io::Error,
}

#[derive(Diagnostic)]
#[diag(incremental_corrupt_file)]
pub struct CorruptFile<'a> {
pub(crate) struct CorruptFile<'a> {
pub path: &'a Path,
}
1 change: 1 addition & 0 deletions compiler/rustc_incremental/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(rustdoc_internals)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

mod assert_dep_graph;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_incremental/src/persist/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use rustc_macros::{Decodable, Encodable};
use rustc_middle::dep_graph::{WorkProduct, WorkProductId};

#[derive(Debug, Encodable, Decodable)]
pub struct SerializedWorkProduct {
pub(crate) struct SerializedWorkProduct {
/// node that produced the work-product
pub id: WorkProductId,

Expand Down
Loading