diff options
| author | bors <bors@rust-lang.org> | 2022-06-28 18:36:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-06-28 18:36:42 +0000 |
| commit | 830880640304ba8699c5f9a0c4665c38a3271963 (patch) | |
| tree | a984e46bf7b5e06a3b688797ffb1af6f30dd7bc9 /compiler | |
| parent | 94e93749ab00539a11e90426ea87382c433530a8 (diff) | |
| parent | 164c98e447aa1b6aadcaaebf4c218fa28ff07830 (diff) | |
| download | rust-830880640304ba8699c5f9a0c4665c38a3271963.tar.gz rust-830880640304ba8699c5f9a0c4665c38a3271963.zip | |
Auto merge of #98632 - matthiaskrgr:rollup-peg868d, r=matthiaskrgr
Rollup of 11 pull requests Successful merges: - #98548 (rustdoc-json: Allow Typedef to be different in sanity assert) - #98560 (Add regression test for #85907) - #98564 (Remove references to `./tmp` in-tree) - #98602 (Add regression test for #80074) - #98606 (:arrow_up: rust-analyzer) - #98609 (Fix ICE for associated constant generics) - #98611 (Fix glob import ICE in rustdoc JSON format) - #98617 (Remove feature `const_option` from std) - #98619 (Fix mir-opt wg name) - #98621 (llvm-wrapper: adapt for removal of the ASanGlobalsMetadataAnalysis LLVM API) - #98623 (fix typo in comment) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_lexer/src/unescape.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 2 | ||||
| -rw-r--r-- | compiler/rustc_span/src/source_map.rs | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_lexer/src/unescape.rs b/compiler/rustc_lexer/src/unescape.rs index 97f9588ae1e..3da6bc14622 100644 --- a/compiler/rustc_lexer/src/unescape.rs +++ b/compiler/rustc_lexer/src/unescape.rs @@ -238,7 +238,7 @@ fn scan_escape(chars: &mut Chars<'_>, mode: Mode) -> Result<char, EscapeError> { c.to_digit(16).ok_or(EscapeError::InvalidCharInUnicodeEscape)?; n_digits += 1; if n_digits > 6 { - // Stop updating value since we're sure that it's is incorrect already. + // Stop updating value since we're sure that it's incorrect already. continue; } let digit = digit as u32; diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 38fddbdba54..0f4973ebf71 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -985,7 +985,9 @@ LLVMRustOptimizeWithNewPassManager( if (SanitizerOptions->SanitizeAddress) { OptimizerLastEPCallbacks.push_back( [SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level) { +#if LLVM_VERSION_LT(15, 0) MPM.addPass(RequireAnalysisPass<ASanGlobalsMetadataAnalysis, Module>()); +#endif #if LLVM_VERSION_GE(14, 0) AddressSanitizerOptions opts = AddressSanitizerOptions{ /*CompileKernel=*/false, diff --git a/compiler/rustc_span/src/source_map.rs b/compiler/rustc_span/src/source_map.rs index 95ea7029617..227127aed50 100644 --- a/compiler/rustc_span/src/source_map.rs +++ b/compiler/rustc_span/src/source_map.rs @@ -956,7 +956,7 @@ impl SourceMap { } pub fn generate_fn_name_span(&self, span: Span) -> Option<Span> { - let prev_span = self.span_extend_to_prev_str(span, "fn", true, true).unwrap_or(span); + let prev_span = self.span_extend_to_prev_str(span, "fn", true, true)?; if let Ok(snippet) = self.span_to_snippet(prev_span) { debug!( "generate_fn_name_span: span={:?}, prev_span={:?}, snippet={:?}", |
