diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-08-26 01:49:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-26 01:49:03 +0200 |
| commit | c6e00680ac74ab027f7bf6b29bdf9fbee79ef8b0 (patch) | |
| tree | fccddd9ff09ced3a37391da5a97c39bb1563f6d7 | |
| parent | a8a242c0ec5dc8b8e3810d702c3654537108b5de (diff) | |
| parent | e7f11b6913eb1549847be2173a20d08f3cbf46ff (diff) | |
| download | rust-c6e00680ac74ab027f7bf6b29bdf9fbee79ef8b0.tar.gz rust-c6e00680ac74ab027f7bf6b29bdf9fbee79ef8b0.zip | |
Rollup merge of #129544 - mu001999-contrib:dead-code/clean, r=compiler-errors
Removes dead code from the compiler Detected by #128637
| -rw-r--r-- | compiler/rustc_incremental/messages.ftl | 2 | ||||
| -rw-r--r-- | compiler/rustc_incremental/src/errors.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_passes/messages.ftl | 4 | ||||
| -rw-r--r-- | compiler/rustc_passes/src/errors.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_transmute/src/maybe_transmutable/query_context.rs | 6 | ||||
| -rw-r--r-- | library/alloc/tests/boxed.rs | 1 |
6 files changed, 2 insertions, 25 deletions
diff --git a/compiler/rustc_incremental/messages.ftl b/compiler/rustc_incremental/messages.ftl index de2177ebb6e..2a65101d360 100644 --- a/compiler/rustc_incremental/messages.ftl +++ b/compiler/rustc_incremental/messages.ftl @@ -99,6 +99,4 @@ incremental_unrecognized_depnode = unrecognized `DepNode` variant: {$name} incremental_unrecognized_depnode_label = dep-node label `{$label}` not recognized -incremental_write_dep_graph = failed to write dependency graph to `{$path}`: {$err} - incremental_write_new = failed to write {$name} to `{$path}`: {$err} diff --git a/compiler/rustc_incremental/src/errors.rs b/compiler/rustc_incremental/src/errors.rs index b68c149d398..c6f8b99bcd6 100644 --- a/compiler/rustc_incremental/src/errors.rs +++ b/compiler/rustc_incremental/src/errors.rs @@ -273,13 +273,6 @@ pub struct LoadDepGraph { } #[derive(Diagnostic)] -#[diag(incremental_write_dep_graph)] -pub struct WriteDepGraph<'a> { - pub path: &'a Path, - pub err: std::io::Error, -} - -#[derive(Diagnostic)] #[diag(incremental_move_dep_graph)] pub struct MoveDepGraph<'a> { pub from: &'a Path, diff --git a/compiler/rustc_passes/messages.ftl b/compiler/rustc_passes/messages.ftl index b377c9f52d6..e7f208d5ad5 100644 --- a/compiler/rustc_passes/messages.ftl +++ b/compiler/rustc_passes/messages.ftl @@ -481,10 +481,6 @@ passes_must_not_suspend = `must_not_suspend` attribute should be applied to a struct, enum, union, or trait .label = is not a struct, enum, union, or trait -passes_must_use_async = - `must_use` attribute on `async` functions applies to the anonymous `Future` returned by the function, not the value within - .label = this attribute does nothing, the `Future`s returned by async functions are already `must_use` - passes_must_use_no_effect = `#[must_use]` has no effect when applied to {$article} {$target} diff --git a/compiler/rustc_passes/src/errors.rs b/compiler/rustc_passes/src/errors.rs index f6a57b7d098..1202351bdcd 100644 --- a/compiler/rustc_passes/src/errors.rs +++ b/compiler/rustc_passes/src/errors.rs @@ -372,13 +372,6 @@ pub struct FfiConstInvalidTarget { } #[derive(LintDiagnostic)] -#[diag(passes_must_use_async)] -pub struct MustUseAsync { - #[label] - pub span: Span, -} - -#[derive(LintDiagnostic)] #[diag(passes_must_use_no_effect)] pub struct MustUseNoEffect { pub article: &'static str, diff --git a/compiler/rustc_transmute/src/maybe_transmutable/query_context.rs b/compiler/rustc_transmute/src/maybe_transmutable/query_context.rs index 95373916a71..f8b59bdf326 100644 --- a/compiler/rustc_transmute/src/maybe_transmutable/query_context.rs +++ b/compiler/rustc_transmute/src/maybe_transmutable/query_context.rs @@ -4,7 +4,6 @@ use crate::layout; pub(crate) trait QueryContext { type Def: layout::Def; type Ref: layout::Ref; - type Scope: Copy; } #[cfg(test)] @@ -28,20 +27,17 @@ pub(crate) mod test { impl QueryContext for UltraMinimal { type Def = Def; type Ref = !; - type Scope = (); } } #[cfg(feature = "rustc")] mod rustc { - use rustc_middle::ty::{Ty, TyCtxt}; + use rustc_middle::ty::TyCtxt; use super::*; impl<'tcx> super::QueryContext for TyCtxt<'tcx> { type Def = layout::rustc::Def<'tcx>; type Ref = layout::rustc::Ref<'tcx>; - - type Scope = Ty<'tcx>; } } diff --git a/library/alloc/tests/boxed.rs b/library/alloc/tests/boxed.rs index faee64b2f67..bfc31a626fa 100644 --- a/library/alloc/tests/boxed.rs +++ b/library/alloc/tests/boxed.rs @@ -59,6 +59,7 @@ fn box_deref_lval() { assert_eq!(x.get(), 1000); } +#[allow(unused)] pub struct ConstAllocator; unsafe impl Allocator for ConstAllocator { |
