Skip to content

Commit daa90b9

Browse files
committed
Auto merge of #151459 - JonathanBrouwer:rollup-VecWQ0g, r=JonathanBrouwer
Rollup of 6 pull requests Successful merges: - #147426 ( tests/debuginfo/basic-stepping.rs: Add revisions `default-mir-passes`, `no-SingleUseConsts-mir-pass`) - #150880 (Remove old error emitter) - #151432 (use `deny(missing_docs)` for non-mir intrinsics) - #151444 (Move UI tests) - #151445 (Derive `Default` for `QueryArenas`) - #151453 (make `simd_insert_dyn` and `simd_extract_dyn` const) r? @ghost
2 parents 625b63f + 530eeff commit daa90b9

29 files changed

Lines changed: 166 additions & 3715 deletions

File tree

Cargo.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3865,7 +3865,6 @@ dependencies = [
38653865
"rustc_fluent_macro",
38663866
"rustc_hashes",
38673867
"rustc_index",
3868-
"rustc_lexer",
38693868
"rustc_lint_defs",
38703869
"rustc_macros",
38713870
"rustc_serialize",

compiler/rustc_const_eval/src/interpret/intrinsics/simd.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
3030
let dest = dest.force_mplace(self)?;
3131

3232
match intrinsic_name {
33-
sym::simd_insert => {
33+
sym::simd_insert | sym::simd_insert_dyn => {
3434
let index = u64::from(self.read_scalar(&args[1])?.to_u32()?);
3535
let elem = &args[2];
3636
let (input, input_len) = self.project_to_simd(&args[0])?;
@@ -39,7 +39,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
3939
// Bounds are not checked by typeck so we have to do it ourselves.
4040
if index >= input_len {
4141
throw_ub_format!(
42-
"`simd_insert` index {index} is out-of-bounds of vector with length {input_len}"
42+
"`{intrinsic_name}` index {index} is out-of-bounds of vector with length {input_len}"
4343
);
4444
}
4545

@@ -50,13 +50,13 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
5050
self.copy_op(&value, &place)?;
5151
}
5252
}
53-
sym::simd_extract => {
53+
sym::simd_extract | sym::simd_extract_dyn => {
5454
let index = u64::from(self.read_scalar(&args[1])?.to_u32()?);
5555
let (input, input_len) = self.project_to_simd(&args[0])?;
5656
// Bounds are not checked by typeck so we have to do it ourselves.
5757
if index >= input_len {
5858
throw_ub_format!(
59-
"`simd_extract` index {index} is out-of-bounds of vector with length {input_len}"
59+
"`{intrinsic_name}` index {index} is out-of-bounds of vector with length {input_len}"
6060
);
6161
}
6262
self.copy_op(&self.project_index(&input, index)?, &dest)?;

compiler/rustc_driver_impl/src/lib.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,10 +1534,11 @@ fn report_ice(
15341534
using_internal_features: &AtomicBool,
15351535
) {
15361536
let translator = default_translator();
1537-
let emitter = Box::new(rustc_errors::emitter::HumanEmitter::new(
1538-
stderr_destination(rustc_errors::ColorConfig::Auto),
1539-
translator,
1540-
));
1537+
let emitter =
1538+
Box::new(rustc_errors::annotate_snippet_emitter_writer::AnnotateSnippetEmitter::new(
1539+
stderr_destination(rustc_errors::ColorConfig::Auto),
1540+
translator,
1541+
));
15411542
let dcx = rustc_errors::DiagCtxt::new(emitter);
15421543
let dcx = dcx.handle();
15431544

compiler/rustc_errors/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ rustc_error_messages = { path = "../rustc_error_messages" }
1717
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
1818
rustc_hashes = { path = "../rustc_hashes" }
1919
rustc_index = { path = "../rustc_index" }
20-
rustc_lexer = { path = "../rustc_lexer" }
2120
rustc_lint_defs = { path = "../rustc_lint_defs" }
2221
rustc_macros = { path = "../rustc_macros" }
2322
rustc_serialize = { path = "../rustc_serialize" }

compiler/rustc_errors/src/diagnostic.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ use rustc_span::source_map::Spanned;
1515
use rustc_span::{DUMMY_SP, Span, Symbol};
1616
use tracing::debug;
1717

18-
use crate::snippet::Style;
1918
use crate::{
2019
CodeSuggestion, DiagCtxtHandle, DiagMessage, ErrCode, ErrorGuaranteed, ExplicitBug, Level,
21-
MultiSpan, StashKey, SubdiagMessage, Substitution, SubstitutionPart, SuggestionStyle,
20+
MultiSpan, StashKey, Style, SubdiagMessage, Substitution, SubstitutionPart, SuggestionStyle,
2221
Suggestions,
2322
};
2423

0 commit comments

Comments
 (0)