diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2023-05-06 09:09:34 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-06 09:09:34 +0900 |
| commit | 393e285e14fcc8477d74ed3919460e7a53d2fbe1 (patch) | |
| tree | fd24353ab5363e21ad3aa21817734c9e7388bcaf /compiler/rustc_span/src | |
| parent | d97cef099e4df4f9eb8a04065c6092672cb330f6 (diff) | |
| parent | 6077fdd219c521a6f039c7fe3e5aacfa15757edc (diff) | |
| download | rust-393e285e14fcc8477d74ed3919460e7a53d2fbe1.tar.gz rust-393e285e14fcc8477d74ed3919460e7a53d2fbe1.zip | |
Rollup merge of #111261 - compiler-errors:error-guaranteed-should-be-scarier-to-construct, r=BoxyUwU
Mark `ErrorGuaranteed` constructor as deprecated so people don't use it You should never ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever use this function unless you know what you're doing, so make it harder to accidentally use it! Alternatives are to change the name to sound scarier, make it `unsafe` (though it's not really a soundness thing), or work on deeper refactors to make it private. r? `@BoxyUwU`
Diffstat (limited to 'compiler/rustc_span/src')
| -rw-r--r-- | compiler/rustc_span/src/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs index 341cc61fd1c..5654a3979a0 100644 --- a/compiler/rustc_span/src/lib.rs +++ b/compiler/rustc_span/src/lib.rs @@ -2199,6 +2199,7 @@ 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. + #[deprecated = "`Session::delay_span_bug` should be preferred over this function"] pub fn unchecked_claim_error_was_emitted() -> Self { ErrorGuaranteed(()) } |
