Skip to content

Commit aeaa849

Browse files
authored
Rollup merge of #155319 - nnethercote:rm-dead-error-structs, r=Kivooeo
Remove dead diagnostic structs. One of these has a "FIXME(autodiff): I should get used somewhere" comment, but I figure YAGNI applies and it's so small that reinstating it if necessary would be trivial. r? @Kivooeo
2 parents e20fc9c + f093767 commit aeaa849

2 files changed

Lines changed: 0 additions & 25 deletions

File tree

compiler/rustc_metadata/src/errors.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -233,16 +233,6 @@ pub struct ConflictingAllocErrorHandler {
233233
)]
234234
pub struct GlobalAllocRequired;
235235

236-
#[derive(Diagnostic)]
237-
#[diag(
238-
"the crate `{$crate_name}` cannot depend on a crate that needs {$needs_crate_name}, but it depends on `{$deps_crate_name}`"
239-
)]
240-
pub struct NoTransitiveNeedsDep<'a> {
241-
pub crate_name: Symbol,
242-
pub needs_crate_name: &'a str,
243-
pub deps_crate_name: Symbol,
244-
}
245-
246236
#[derive(Diagnostic)]
247237
#[diag("failed to write {$filename}: {$err}")]
248238
pub struct FailedWriteError {

compiler/rustc_middle/src/error.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,6 @@ pub(crate) struct OpaqueHiddenTypeMismatch<'tcx> {
3636
pub sub: TypeMismatchReason,
3737
}
3838

39-
#[derive(Diagnostic)]
40-
#[diag("we don't support unions yet: '{$ty_name}'")]
41-
pub struct UnsupportedUnion {
42-
pub ty_name: String,
43-
}
44-
45-
// FIXME(autodiff): I should get used somewhere
46-
#[derive(Diagnostic)]
47-
#[diag("reading from a `Duplicated` const {$ty} is unsafe")]
48-
pub struct AutodiffUnsafeInnerConstRef<'tcx> {
49-
#[primary_span]
50-
pub span: Span,
51-
pub ty: Ty<'tcx>,
52-
}
53-
5439
#[derive(Subdiagnostic)]
5540
pub enum TypeMismatchReason {
5641
#[label("this expression supplies two conflicting concrete types for the same opaque type")]

0 commit comments

Comments
 (0)