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 9 pull requests #110201

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a047064
Revert "Don't recover lifetimes/labels containing emojis as character…
compiler-errors Apr 10, 2023
53a4003
Switch all job names to include core count
Mark-Simulacrum Mar 19, 2023
3153eaa
Trim down core counts for fast builders
Mark-Simulacrum Apr 10, 2023
677357d
Fix typos in compiler
DaniPopes Apr 10, 2023
f06640d
Update ty_utils_never_to_any_not_supported diagnostic message
DaniPopes Apr 10, 2023
40f12c6
Revert method-not-found-generic-arg-elision test bless
DaniPopes Apr 10, 2023
dd28cfb
rustdoc: remove redundant expandSection code from main.js
notriddle Apr 10, 2023
6da8cb1
rustdoc: use CSS `overscroll-behavior` instead of JavaScript
notriddle Apr 10, 2023
5716ae6
Introduce `Region::get_name_or_anon`.
nnethercote Apr 11, 2023
1eb5390
Fix `RegionCtxt::preference_value`.
nnethercote Apr 11, 2023
bd7f301
Use the existing `static` and `env` symbols instead of interning.
nnethercote Apr 11, 2023
7975779
Add `sym::anon`.
nnethercote Apr 11, 2023
0465201
Use `itertools::Either` instead of own `EitherIter` impl
WaffleLapkin Apr 11, 2023
a329592
Use `SSO_ARRAY_SIZE` instead of `8` in `SsoHashMap` impl
WaffleLapkin Apr 11, 2023
a11053a
Remove orphaned remove_dir_all implementation from rust-installer
Noratrieb Apr 11, 2023
cecb901
Add Offset binary op to custom mir
cbeuw Apr 11, 2023
b56deeb
Rollup merge of #110135 - compiler-errors:revert-108031, r=davidtwco
compiler-errors Apr 11, 2023
a78a9dd
Rollup merge of #110142 - Mark-Simulacrum:reduce-core-counts, r=pietr…
compiler-errors Apr 11, 2023
efb613e
Rollup merge of #110153 - DaniPopes:compiler-typos, r=Nilstrieb
compiler-errors Apr 11, 2023
de6e9cf
Rollup merge of #110162 - notriddle:notriddle/main-js-expand, r=Guill…
compiler-errors Apr 11, 2023
a0a03e1
Rollup merge of #110165 - notriddle:notriddle/overscroll-behavior, r=…
compiler-errors Apr 11, 2023
8019a1d
Rollup merge of #110175 - nnethercote:symbol-cleanups, r=jackh726
compiler-errors Apr 11, 2023
ad17c3d
Rollup merge of #110182 - WaffleLapkin:neither, r=Nilstrieb
compiler-errors Apr 11, 2023
d301576
Rollup merge of #110188 - Nilstrieb:remove-remove-dir-all, r=jyn514
compiler-errors Apr 11, 2023
5eb6805
Rollup merge of #110190 - cbeuw:mir-offset, r=oli-obk
compiler-errors Apr 11, 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
72 changes: 36 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,70 +181,70 @@ jobs:
- ARM64
- linux
- name: arm-android
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: armhf-gnu
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-aarch64-linux
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-android
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-arm-linux
os: ubuntu-20.04-16core-64gb
env: {}
- name: dist-armhf-linux
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-armv7-linux
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-i586-gnu-i586-i686-musl
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-i686-linux
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-mips-linux
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-mips64-linux
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-mips64el-linux
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-mipsel-linux
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-powerpc-linux
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-powerpc64-linux
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-powerpc64le-linux
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-riscv64-linux
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-s390x-linux
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-various-1
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-various-2
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-x86_64-freebsd
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-x86_64-illumos
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-x86_64-linux
os: ubuntu-20.04-16core-64gb
Expand All @@ -254,10 +254,10 @@ jobs:
IMAGE: dist-x86_64-linux
os: ubuntu-20.04-16core-64gb
- name: dist-x86_64-musl
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: dist-x86_64-netbsd
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: i686-gnu
os: ubuntu-20.04-16core-64gb
Expand All @@ -266,51 +266,51 @@ jobs:
os: ubuntu-20.04-16core-64gb
env: {}
- name: mingw-check
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: test-various
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: wasm32
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: x86_64-gnu
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: x86_64-gnu-stable
env:
IMAGE: x86_64-gnu
RUST_CI_OVERRIDE_RELEASE_CHANNEL: stable
CI_ONLY_WHEN_CHANNEL: nightly
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
- name: x86_64-gnu-aux
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: x86_64-gnu-debug
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: x86_64-gnu-distcheck
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: x86_64-gnu-llvm-15
env:
RUST_BACKTRACE: 1
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
- name: x86_64-gnu-llvm-14
env:
RUST_BACKTRACE: 1
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
- name: x86_64-gnu-llvm-14-stage1
env:
RUST_BACKTRACE: 1
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
- name: x86_64-gnu-nopt
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
env: {}
- name: x86_64-gnu-tools
env:
DEPLOY_TOOLSTATES_JSON: toolstates-linux.json
os: ubuntu-20.04-16core-64gb
os: ubuntu-20.04-8core-32gb
- name: dist-x86_64-apple
env:
SCRIPT: "./x.py dist bootstrap --include-default-paths --host=x86_64-apple-darwin --target=x86_64-apple-darwin"
Expand Down
3 changes: 1 addition & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2768,13 +2768,11 @@ dependencies = [
"anyhow",
"clap 3.2.20",
"flate2",
"lazy_static",
"num_cpus",
"rayon",
"remove_dir_all",
"tar",
"walkdir",
"winapi",
"xz2",
]

Expand Down Expand Up @@ -4575,6 +4573,7 @@ dependencies = [
"elsa",
"ena",
"indexmap",
"itertools",
"jobserver",
"libc",
"measureme",
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast/src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl FormatArguments {
}
if !matches!(arg.kind, FormatArgumentKind::Captured(..)) {
// This is an explicit argument.
// Make sure that all arguments so far are explcit.
// Make sure that all arguments so far are explicit.
assert_eq!(
self.num_explicit_args,
self.arguments.len(),
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ pub struct AsyncNonMoveClosureNotSupported {

#[derive(Diagnostic, Clone, Copy)]
#[diag(ast_lowering_functional_record_update_destructuring_assignment)]
pub struct FunctionalRecordUpdateDestructuringAssignemnt {
pub struct FunctionalRecordUpdateDestructuringAssignment {
#[primary_span]
#[suggestion(code = "", applicability = "machine-applicable")]
pub span: Span,
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_ast_lowering/src/expr.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::errors::{
AsyncGeneratorsNotSupported, AsyncNonMoveClosureNotSupported, AwaitOnlyInAsyncFnAndBlocks,
BaseExpressionDoubleDot, ClosureCannotBeStatic, FunctionalRecordUpdateDestructuringAssignemnt,
BaseExpressionDoubleDot, ClosureCannotBeStatic, FunctionalRecordUpdateDestructuringAssignment,
GeneratorTooManyParameters, InclusiveRangeWithNoEnd, NotSupportedForLifetimeBinderAsyncClosure,
UnderscoreExprLhsAssign,
};
Expand Down Expand Up @@ -434,7 +434,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
// `if let pat = val` or `if foo && let pat = val`, as we _do_ want `val` to live beyond the
// condition in this case.
//
// In order to mantain the drop behavior for the non `let` parts of the condition,
// In order to maintain the drop behavior for the non `let` parts of the condition,
// we still wrap them in terminating scopes, e.g. `if foo && let pat = val` essentially
// gets transformed into `if { let _t = foo; _t } && let pat = val`
match &cond.kind {
Expand Down Expand Up @@ -1232,7 +1232,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
);
let fields_omitted = match &se.rest {
StructRest::Base(e) => {
self.tcx.sess.emit_err(FunctionalRecordUpdateDestructuringAssignemnt {
self.tcx.sess.emit_err(FunctionalRecordUpdateDestructuringAssignment {
span: e.span,
});
true
Expand Down
32 changes: 17 additions & 15 deletions compiler/rustc_borrowck/src/constraints/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::{
/// The construct graph organizes the constraints by their end-points.
/// It can be used to view a `R1: R2` constraint as either an edge `R1
/// -> R2` or `R2 -> R1` depending on the direction type `D`.
pub(crate) struct ConstraintGraph<D: ConstraintGraphDirecton> {
pub(crate) struct ConstraintGraph<D: ConstraintGraphDirection> {
_direction: D,
first_constraints: IndexVec<RegionVid, Option<OutlivesConstraintIndex>>,
next_constraints: IndexVec<OutlivesConstraintIndex, Option<OutlivesConstraintIndex>>,
Expand All @@ -25,7 +25,7 @@ pub(crate) type ReverseConstraintGraph = ConstraintGraph<Reverse>;

/// Marker trait that controls whether a `R1: R2` constraint
/// represents an edge `R1 -> R2` or `R2 -> R1`.
pub(crate) trait ConstraintGraphDirecton: Copy + 'static {
pub(crate) trait ConstraintGraphDirection: Copy + 'static {
fn start_region(c: &OutlivesConstraint<'_>) -> RegionVid;
fn end_region(c: &OutlivesConstraint<'_>) -> RegionVid;
fn is_normal() -> bool;
Expand All @@ -38,7 +38,7 @@ pub(crate) trait ConstraintGraphDirecton: Copy + 'static {
#[derive(Copy, Clone, Debug)]
pub(crate) struct Normal;

impl ConstraintGraphDirecton for Normal {
impl ConstraintGraphDirection for Normal {
fn start_region(c: &OutlivesConstraint<'_>) -> RegionVid {
c.sup
}
Expand All @@ -59,7 +59,7 @@ impl ConstraintGraphDirecton for Normal {
#[derive(Copy, Clone, Debug)]
pub(crate) struct Reverse;

impl ConstraintGraphDirecton for Reverse {
impl ConstraintGraphDirection for Reverse {
fn start_region(c: &OutlivesConstraint<'_>) -> RegionVid {
c.sub
}
Expand All @@ -73,7 +73,7 @@ impl ConstraintGraphDirecton for Reverse {
}
}

impl<D: ConstraintGraphDirecton> ConstraintGraph<D> {
impl<D: ConstraintGraphDirection> ConstraintGraph<D> {
/// Creates a "dependency graph" where each region constraint `R1:
/// R2` is treated as an edge `R1 -> R2`. We use this graph to
/// construct SCCs for region inference but also for error
Expand Down Expand Up @@ -133,15 +133,15 @@ impl<D: ConstraintGraphDirecton> ConstraintGraph<D> {
}
}

pub(crate) struct Edges<'s, 'tcx, D: ConstraintGraphDirecton> {
pub(crate) struct Edges<'s, 'tcx, D: ConstraintGraphDirection> {
graph: &'s ConstraintGraph<D>,
constraints: &'s OutlivesConstraintSet<'tcx>,
pointer: Option<OutlivesConstraintIndex>,
next_static_idx: Option<usize>,
static_region: RegionVid,
}

impl<'s, 'tcx, D: ConstraintGraphDirecton> Iterator for Edges<'s, 'tcx, D> {
impl<'s, 'tcx, D: ConstraintGraphDirection> Iterator for Edges<'s, 'tcx, D> {
type Item = OutlivesConstraint<'tcx>;

fn next(&mut self) -> Option<Self::Item> {
Expand Down Expand Up @@ -174,13 +174,13 @@ impl<'s, 'tcx, D: ConstraintGraphDirecton> Iterator for Edges<'s, 'tcx, D> {
/// This struct brings together a constraint set and a (normal, not
/// reverse) constraint graph. It implements the graph traits and is
/// usd for doing the SCC computation.
pub(crate) struct RegionGraph<'s, 'tcx, D: ConstraintGraphDirecton> {
pub(crate) struct RegionGraph<'s, 'tcx, D: ConstraintGraphDirection> {
set: &'s OutlivesConstraintSet<'tcx>,
constraint_graph: &'s ConstraintGraph<D>,
static_region: RegionVid,
}

impl<'s, 'tcx, D: ConstraintGraphDirecton> RegionGraph<'s, 'tcx, D> {
impl<'s, 'tcx, D: ConstraintGraphDirection> RegionGraph<'s, 'tcx, D> {
/// Creates a "dependency graph" where each region constraint `R1:
/// R2` is treated as an edge `R1 -> R2`. We use this graph to
/// construct SCCs for region inference but also for error
Expand All @@ -202,35 +202,37 @@ impl<'s, 'tcx, D: ConstraintGraphDirecton> RegionGraph<'s, 'tcx, D> {
}
}

pub(crate) struct Successors<'s, 'tcx, D: ConstraintGraphDirecton> {
pub(crate) struct Successors<'s, 'tcx, D: ConstraintGraphDirection> {
edges: Edges<'s, 'tcx, D>,
}

impl<'s, 'tcx, D: ConstraintGraphDirecton> Iterator for Successors<'s, 'tcx, D> {
impl<'s, 'tcx, D: ConstraintGraphDirection> Iterator for Successors<'s, 'tcx, D> {
type Item = RegionVid;

fn next(&mut self) -> Option<Self::Item> {
self.edges.next().map(|c| D::end_region(&c))
}
}

impl<'s, 'tcx, D: ConstraintGraphDirecton> graph::DirectedGraph for RegionGraph<'s, 'tcx, D> {
impl<'s, 'tcx, D: ConstraintGraphDirection> graph::DirectedGraph for RegionGraph<'s, 'tcx, D> {
type Node = RegionVid;
}

impl<'s, 'tcx, D: ConstraintGraphDirecton> graph::WithNumNodes for RegionGraph<'s, 'tcx, D> {
impl<'s, 'tcx, D: ConstraintGraphDirection> graph::WithNumNodes for RegionGraph<'s, 'tcx, D> {
fn num_nodes(&self) -> usize {
self.constraint_graph.first_constraints.len()
}
}

impl<'s, 'tcx, D: ConstraintGraphDirecton> graph::WithSuccessors for RegionGraph<'s, 'tcx, D> {
impl<'s, 'tcx, D: ConstraintGraphDirection> graph::WithSuccessors for RegionGraph<'s, 'tcx, D> {
fn successors(&self, node: Self::Node) -> <Self as graph::GraphSuccessors<'_>>::Iter {
self.outgoing_regions(node)
}
}

impl<'s, 'tcx, D: ConstraintGraphDirecton> graph::GraphSuccessors<'_> for RegionGraph<'s, 'tcx, D> {
impl<'s, 'tcx, D: ConstraintGraphDirection> graph::GraphSuccessors<'_>
for RegionGraph<'s, 'tcx, D>
{
type Item = RegionVid;
type Iter = Successors<'s, 'tcx, D>;
}
4 changes: 1 addition & 3 deletions compiler/rustc_borrowck/src/renumber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,10 @@ impl RegionCtxt {
/// Used to determine the representative of a component in the strongly connected
/// constraint graph
pub(crate) fn preference_value(self) -> usize {
let _anon = Symbol::intern("anon");

match self {
RegionCtxt::Unknown => 1,
RegionCtxt::Existential(None) => 2,
RegionCtxt::Existential(Some(_anon)) | RegionCtxt::Free(_anon) => 2,
RegionCtxt::Existential(Some(_)) | RegionCtxt::Free(_) => 2,
RegionCtxt::Location(_) => 3,
RegionCtxt::TyContext(_) => 4,
_ => 5,
Expand Down
Loading