diff options
| author | Michael Goulet <michael@errs.io> | 2023-02-22 21:19:42 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-02-25 19:46:36 +0000 |
| commit | a772a6fc2ad9ab0872af238fe2e641dcf379a2cd (patch) | |
| tree | 1eaa346d9036e415a072914b941f1b8d697b46d0 /compiler/rustc_errors/src | |
| parent | dcca6a375bd4eddb3deea7038ebf29d02af53b48 (diff) | |
| download | rust-a772a6fc2ad9ab0872af238fe2e641dcf379a2cd.tar.gz rust-a772a6fc2ad9ab0872af238fe2e641dcf379a2cd.zip | |
Add ErrorGuaranteed to HIR TyKind::Err
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index edec8cce92f..18c824d8b4e 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -42,7 +42,7 @@ pub use rustc_error_messages::{ pub use rustc_lint_defs::{pluralize, Applicability}; use rustc_macros::fluent_messages; use rustc_span::source_map::SourceMap; -use rustc_span::HashStableContext; +pub use rustc_span::ErrorGuaranteed; use rustc_span::{Loc, Span}; use std::borrow::Cow; @@ -1846,17 +1846,3 @@ pub enum TerminalUrl { Yes, Auto, } - -/// Useful type to use with `Result<>` indicate that an error has already -/// been reported to the user, so no need to continue checking. -#[derive(Clone, Copy, Debug, Encodable, Decodable, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[derive(HashStable_Generic)] -pub struct ErrorGuaranteed(()); - -impl ErrorGuaranteed { - /// To be used only if you really know what you are doing... ideally, we would find a way to - /// eliminate all calls to this method. - pub fn unchecked_claim_error_was_emitted() -> Self { - ErrorGuaranteed(()) - } -} |
