Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 12 pull requests #109490

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0d8a0c5
Rename LinesAnyMap to LinesMap
KamilaBorowska Aug 9, 2022
cef81dc
Fix handling of trailing bare CR in str::lines
KamilaBorowska Aug 9, 2022
2d927cc
Explain the "no-error" io::Error case
workingjubilee Jan 17, 2023
102c8fa
Render source page layout with Askama
clubby789 Mar 12, 2023
6639538
Remove VecMap
compiler-errors Mar 17, 2023
0f32fd8
Remove irrelevant docs on error kinds
workingjubilee Mar 17, 2023
27e9ee9
move Option::as_slice to intrinsic
llogiq Mar 15, 2023
2ec7f6c
refactor `fn bootstrap::builder::Builder::compiler_for`
onur-ozkan Mar 18, 2023
572c56c
Update links for custom discriminants.
ehuss Jan 19, 2023
20dc532
Remove Ty::is_region_ptr
mu001999 Mar 20, 2023
9da1da9
Allow optional RET type annotation
cbeuw Mar 20, 2023
9dc275b
Add documentation for `type RET = ...`
cbeuw Mar 20, 2023
d3a5541
rustdoc: Cleanup parent module tracking for doc links
petrochenkov Mar 18, 2023
0f45d85
rustdoc: Factor out some doc link resolution code into a separate fun…
petrochenkov Mar 21, 2023
dfbf610
Set LLVM `LLVM_UNREACHABLE_OPTIMIZE` to `OFF`
ids1024 Mar 20, 2023
4212c1b
Add `safe` to number rendering
clubby789 Mar 21, 2023
df034b0
Change text -> rust,ignore highlighting in sanitizer.md
tgross35 Mar 10, 2023
f592849
Rollup merge of #100311 - xfix:lines-fix-handling-of-bare-cr, r=Chris…
Dylan-DPC Mar 22, 2023
979f472
Rollup merge of #106964 - workingjubilee:crouching-ioerror-hidden-doc…
Dylan-DPC Mar 22, 2023
68864e2
Rollup merge of #108997 - tgross35:patch-1, r=JohnTitor
Dylan-DPC Mar 22, 2023
a9cb27d
Rollup merge of #109179 - llogiq:intrinsically-option-as-slice, r=eholk
Dylan-DPC Mar 22, 2023
07b2721
Rollup merge of #109187 - clubby789:askama-source, r=GuillaumeGomez
Dylan-DPC Mar 22, 2023
1fc0377
Rollup merge of #109280 - compiler-errors:no-vec-map, r=Mark-Simulacrum
Dylan-DPC Mar 22, 2023
46a3442
Rollup merge of #109295 - ozkanonur:issue-109286, r=ozkanonur
Dylan-DPC Mar 22, 2023
b3e6cbb
Rollup merge of #109312 - petrochenkov:docice5, r=GuillaumeGomez
Dylan-DPC Mar 22, 2023
1fc2357
Rollup merge of #109317 - ehuss:discriminant-link-fix, r=Nilstrieb
Dylan-DPC Mar 22, 2023
9749318
Rollup merge of #109373 - ids1024:llvm-unreachable-optimize, r=ozkanonur
Dylan-DPC Mar 22, 2023
7297fe4
Rollup merge of #109378 - MU001999:master, r=scottmcm
Dylan-DPC Mar 22, 2023
4aba0a0
Rollup merge of #109392 - cbeuw:composite-ret, r=JakobDegen
Dylan-DPC Mar 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
&& !self.upvars.is_empty()
{
item_msg = access_place_desc;
debug_assert!(
self.body.local_decls[ty::CAPTURE_STRUCT_LOCAL].ty.is_region_ptr()
);
debug_assert!(self.body.local_decls[ty::CAPTURE_STRUCT_LOCAL].ty.is_ref());
debug_assert!(is_closure_or_generator(
Place::ty_from(
the_place_err.local,
Expand Down Expand Up @@ -470,11 +468,8 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
{
let local_decl = &self.body.local_decls[local];

let (pointer_sigil, pointer_desc) = if local_decl.ty.is_region_ptr() {
("&", "reference")
} else {
("*const", "pointer")
};
let (pointer_sigil, pointer_desc) =
if local_decl.ty.is_ref() { ("&", "reference") } else { ("*const", "pointer") };

match self.local_names[local] {
Some(name) if !local_decl.from_compiler_desugaring() => {
Expand Down Expand Up @@ -1258,7 +1253,7 @@ fn suggest_ampmut<'tcx>(
(
suggestability,
highlight_span,
if local_decl.ty.is_region_ptr() {
if local_decl.ty.is_ref() {
format!("&mut {}", ty_mut.ty)
} else {
format!("*mut {}", ty_mut.ty)
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_borrowck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ extern crate tracing;

use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
use rustc_data_structures::graph::dominators::Dominators;
use rustc_data_structures::vec_map::VecMap;
use rustc_errors::{Diagnostic, DiagnosticBuilder, DiagnosticMessage, SubdiagnosticMessage};
use rustc_hir as hir;
use rustc_hir::def_id::LocalDefId;
Expand Down Expand Up @@ -141,7 +140,7 @@ fn mir_borrowck(tcx: TyCtxt<'_>, def: ty::WithOptConstParam<LocalDefId>) -> &Bor
debug!("Skipping borrowck because of injected body");
// Let's make up a borrowck result! Fun times!
let result = BorrowCheckResult {
concrete_opaque_types: VecMap::new(),
concrete_opaque_types: FxIndexMap::default(),
closure_requirements: None,
used_mut_upvars: SmallVec::new(),
tainted_by_errors: None,
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_borrowck/src/nll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#![deny(rustc::diagnostic_outside_of_impl)]
//! The entry point of the NLL borrow checker.

use rustc_data_structures::vec_map::VecMap;
use rustc_data_structures::fx::FxIndexMap;
use rustc_hir::def_id::LocalDefId;
use rustc_index::vec::IndexVec;
use rustc_middle::mir::{create_dump_file, dump_enabled, dump_mir, PassWhere};
Expand Down Expand Up @@ -44,7 +44,7 @@ pub type PoloniusOutput = Output<RustcFacts>;
/// closure requirements to propagate, and any generated errors.
pub(crate) struct NllOutput<'tcx> {
pub regioncx: RegionInferenceContext<'tcx>,
pub opaque_type_values: VecMap<LocalDefId, OpaqueHiddenType<'tcx>>,
pub opaque_type_values: FxIndexMap<LocalDefId, OpaqueHiddenType<'tcx>>,
pub polonius_input: Option<Box<AllFacts>>,
pub polonius_output: Option<Rc<PoloniusOutput>>,
pub opt_closure_req: Option<ClosureRegionRequirements<'tcx>>,
Expand Down Expand Up @@ -377,7 +377,7 @@ pub(super) fn dump_annotation<'tcx>(
body: &Body<'tcx>,
regioncx: &RegionInferenceContext<'tcx>,
closure_region_requirements: &Option<ClosureRegionRequirements<'tcx>>,
opaque_type_values: &VecMap<LocalDefId, OpaqueHiddenType<'tcx>>,
opaque_type_values: &FxIndexMap<LocalDefId, OpaqueHiddenType<'tcx>>,
errors: &mut crate::error::BorrowckErrors<'tcx>,
) {
let tcx = infcx.tcx;
Expand Down
7 changes: 3 additions & 4 deletions compiler/rustc_borrowck/src/region_infer/opaque_types.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
use rustc_data_structures::vec_map::VecMap;
use rustc_errors::ErrorGuaranteed;
use rustc_hir::def_id::LocalDefId;
use rustc_hir::OpaqueTyOrigin;
Expand Down Expand Up @@ -61,9 +60,9 @@ impl<'tcx> RegionInferenceContext<'tcx> {
pub(crate) fn infer_opaque_types(
&self,
infcx: &InferCtxt<'tcx>,
opaque_ty_decls: VecMap<OpaqueTypeKey<'tcx>, (OpaqueHiddenType<'tcx>, OpaqueTyOrigin)>,
) -> VecMap<LocalDefId, OpaqueHiddenType<'tcx>> {
let mut result: VecMap<LocalDefId, OpaqueHiddenType<'tcx>> = VecMap::new();
opaque_ty_decls: FxIndexMap<OpaqueTypeKey<'tcx>, (OpaqueHiddenType<'tcx>, OpaqueTyOrigin)>,
) -> FxIndexMap<LocalDefId, OpaqueHiddenType<'tcx>> {
let mut result: FxIndexMap<LocalDefId, OpaqueHiddenType<'tcx>> = FxIndexMap::default();

let member_constraints: FxIndexMap<_, _> = self
.member_constraints
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_borrowck/src/type_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use either::Either;
use hir::OpaqueTyOrigin;
use rustc_data_structures::frozen::Frozen;
use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
use rustc_data_structures::vec_map::VecMap;
use rustc_hir as hir;
use rustc_hir::def::DefKind;
use rustc_hir::def_id::LocalDefId;
Expand Down Expand Up @@ -894,7 +893,7 @@ pub(crate) struct MirTypeckResults<'tcx> {
pub(crate) constraints: MirTypeckRegionConstraints<'tcx>,
pub(crate) universal_region_relations: Frozen<UniversalRegionRelations<'tcx>>,
pub(crate) opaque_type_values:
VecMap<OpaqueTypeKey<'tcx>, (OpaqueHiddenType<'tcx>, OpaqueTyOrigin)>,
FxIndexMap<OpaqueTypeKey<'tcx>, (OpaqueHiddenType<'tcx>, OpaqueTyOrigin)>,
}

/// A collection of region constraints that must be satisfied for the
Expand Down
4 changes: 1 addition & 3 deletions compiler/rustc_codegen_cranelift/src/vtable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ pub(crate) fn get_ptr_and_method_ref<'tcx>(
) -> (Pointer, Value) {
let (ptr, vtable) = 'block: {
if let Abi::Scalar(_) = arg.layout().abi {
'descend_newtypes: while !arg.layout().ty.is_unsafe_ptr()
&& !arg.layout().ty.is_region_ptr()
{
'descend_newtypes: while !arg.layout().ty.is_unsafe_ptr() && !arg.layout().ty.is_ref() {
for i in 0..arg.layout().fields.count() {
let field = arg.value_field(fx, mir::Field::new(i));
if !field.layout().is_zst() {
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_ssa/src/mir/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
//
// This is also relevant for `Pin<&mut Self>`, where we need to peel the `Pin`.
'descend_newtypes: while !op.layout.ty.is_unsafe_ptr()
&& !op.layout.ty.is_region_ptr()
&& !op.layout.ty.is_ref()
{
for i in 0..op.layout.fields.count() {
let field = op.extract_field(bx, i);
Expand Down Expand Up @@ -959,7 +959,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
Immediate(_) => {
// See comment above explaining why we peel these newtypes
'descend_newtypes: while !op.layout.ty.is_unsafe_ptr()
&& !op.layout.ty.is_region_ptr()
&& !op.layout.ty.is_ref()
{
for i in 0..op.layout.fields.count() {
let field = op.extract_field(bx, i);
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_data_structures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ pub mod sync;
pub mod tiny_list;
pub mod transitive_relation;
pub mod vec_linked_list;
pub mod vec_map;
pub mod work_queue;
pub use atomic_ref::AtomicRef;
pub mod frozen;
Expand Down
192 changes: 0 additions & 192 deletions compiler/rustc_data_structures/src/vec_map.rs

This file was deleted.

48 changes: 0 additions & 48 deletions compiler/rustc_data_structures/src/vec_map/tests.rs

This file was deleted.

Loading