Removes dead code from the compiler · rust-lang/rust@1317d54 (original) (raw)
File tree
6 files changed
lines changed
- rustc_transmute/src/maybe_transmutable
6 files changed
lines changed
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -99,6 +99,4 @@ incremental_unrecognized_depnode = unrecognized `DepNode` variant: {$name} | ||
| 99 | 99 | |
| 100 | 100 | incremental_unrecognized_depnode_label = dep-node label `{$label}` not recognized |
| 101 | 101 | |
| 102 | -incremental_write_dep_graph = failed to write dependency graph to `{$path}`: {$err} | |
| 103 | - | |
| 104 | 102 | incremental_write_new = failed to write {$name} to `{$path}`: {$err} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -272,13 +272,6 @@ pub struct LoadDepGraph { | ||
| 272 | 272 | pub err: std::io::Error, |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | -#[derive(Diagnostic)] | |
| 276 | -#[diag(incremental_write_dep_graph)] | |
| 277 | -pub struct WriteDepGraph<'a> { | |
| 278 | -pub path: &'a Path, | |
| 279 | -pub err: std::io::Error, | |
| 280 | -} | |
| 281 | - | |
| 282 | 275 | #[derive(Diagnostic)] |
| 283 | 276 | #[diag(incremental_move_dep_graph)] |
| 284 | 277 | pub struct MoveDepGraph<'a> { |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -474,10 +474,6 @@ passes_must_not_suspend = | ||
| 474 | 474 | `must_not_suspend` attribute should be applied to a struct, enum, or trait |
| 475 | 475 | .label = is not a struct, enum, or trait |
| 476 | 476 | |
| 477 | -passes_must_use_async = | |
| 478 | - `must_use` attribute on `async` functions applies to the anonymous `Future` returned by the function, not the value within | |
| 479 | - .label = this attribute does nothing, the `Future`s returned by async functions are already `must_use` | |
| 480 | - | |
| 481 | 477 | passes_must_use_no_effect = |
| 482 | 478 | `#[must_use]` has no effect when applied to {$article} {$target} |
| 483 | 479 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -371,13 +371,6 @@ pub struct FfiConstInvalidTarget { | ||
| 371 | 371 | pub attr_span: Span, |
| 372 | 372 | } |
| 373 | 373 | |
| 374 | -#[derive(LintDiagnostic)] | |
| 375 | -#[diag(passes_must_use_async)] | |
| 376 | -pub struct MustUseAsync { | |
| 377 | -#[label] | |
| 378 | -pub span: Span, | |
| 379 | -} | |
| 380 | - | |
| 381 | 374 | #[derive(LintDiagnostic)] |
| 382 | 375 | #[diag(passes_must_use_no_effect)] |
| 383 | 376 | pub struct MustUseNoEffect { |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -4,7 +4,6 @@ use crate::layout; | ||
| 4 | 4 | pub(crate) trait QueryContext { |
| 5 | 5 | type Def: layout::Def; |
| 6 | 6 | type Ref: layout::Ref; |
| 7 | -type Scope: Copy; | |
| 8 | 7 | } |
| 9 | 8 | |
| 10 | 9 | #[cfg(test)] |
| @@ -28,20 +27,17 @@ pub(crate) mod test { | ||
| 28 | 27 | impl QueryContext for UltraMinimal { |
| 29 | 28 | type Def = Def; |
| 30 | 29 | type Ref = !; |
| 31 | -type Scope = (); | |
| 32 | 30 | } |
| 33 | 31 | } |
| 34 | 32 | |
| 35 | 33 | #[cfg(feature = "rustc")] |
| 36 | 34 | mod rustc { |
| 37 | -use rustc_middle::ty::{Ty, TyCtxt}; | |
| 35 | +use rustc_middle::ty::TyCtxt; | |
| 38 | 36 | |
| 39 | 37 | use super::*; |
| 40 | 38 | |
| 41 | 39 | impl<'tcx> super::QueryContext for TyCtxt<'tcx> { |
| 42 | 40 | type Def = layout::rustc::Def<'tcx>; |
| 43 | 41 | type Ref = layout::rustc::Ref<'tcx>; |
| 44 | - | |
| 45 | -type Scope = Ty<'tcx>; | |
| 46 | 42 | } |
| 47 | 43 | } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -59,6 +59,7 @@ fn box_deref_lval() { | ||
| 59 | 59 | assert_eq!(x.get(), 1000); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | +#[allow(unused)] | |
| 62 | 63 | pub struct ConstAllocator; |
| 63 | 64 | |
| 64 | 65 | unsafe impl Allocator for ConstAllocator { |