Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
fbb6a44
Emit thumb code on VEX V5
lewisfm Jul 4, 2026
383d557
Fix up suggested VEXos linker flags for thumb
lewisfm Jul 4, 2026
f9679fa
Split IncrCompSession out of Session
bjorn3 Jul 8, 2026
3313cd6
std: fix stack buffer overflow in Windows junction_point
devnexen Jun 19, 2026
7bf750e
set no_mangle_generic_items deny by default
HerrCai0907 Mar 30, 2026
ff04387
fix various tests
RalfJung Jul 24, 2026
7232830
std: move futex implementations into sys::sync::futex
valentynkit Jul 3, 2026
5b40f3d
std: connect sys::sync::futex and drop the pal declarations
valentynkit Jul 3, 2026
012c356
Select cache values to verify by key fingerprint, not value fingerprint
xmakro Jul 29, 2026
833ec34
[blocked] Link to proposed LLM policy in CONTRIBUTING and pull reques…
jyn514 Jun 18, 2026
ac1e5f4
Handle slice-tailed DSTs in autodiff type trees
Dnreikronos Aug 2, 2026
82317b3
Split `SpannedTypeVisitor` into its own crate, `rustc_ty_walk`
joshtriplett Aug 1, 2026
0f80d01
Bless bootstrap tests for new `rustc_ty_walk` crate
joshtriplett Aug 4, 2026
94df4bb
Add regression test for HRTB projection in closure return position
zakrad Jul 30, 2026
e3464ab
Avoid resolving path keywords outside TypeNS
mu001999 Aug 3, 2026
e0830fa
implement unsafe speculative flag to be used by `CmRefCell::borrow`, …
LorrensP-2158466 Aug 4, 2026
99e6288
Add regression test for opaque type with associated const equality bound
zakrad Aug 4, 2026
73f94b6
Make the `rustc_unsafe_specialization_marker` attribute actually `uns…
mejrs Aug 3, 2026
180c637
Remove rustc_middle dependency on rustc_hir_pretty
mejrs Aug 3, 2026
18e0dd9
Document zero-sized autodiff slice handling
Dnreikronos Aug 4, 2026
6794814
Add some tests for specialization.
jackh726 Aug 3, 2026
54877b4
rustc_codegen_ssa: Correctly apply the static `--jobs-backend` limit …
petrochenkov Aug 2, 2026
9956e2f
Do not forget to initialize jobserver if only linker is parallel
petrochenkov Aug 4, 2026
228bbb3
fix(bootstrap): Normalize the names of proc macro dependency crates
jamie-osec Aug 4, 2026
a6dfd0c
docs: fix typo in AllowExprMetavar comment
jewboi896-cmyk Aug 4, 2026
b568775
Update expect messages in tcp.rs doc examples to follow the style guide
CacinieP Aug 5, 2026
eace512
Suggest cast_signed for overflowing integer literals
YingqiDuan Aug 5, 2026
a91590b
move mir-opt miri tests to CI logic
RalfJung Aug 3, 2026
5b9efe2
Rework `smallest_range_containing` to handle duplicates
scottmcm Jul 30, 2026
31ce8e5
Register `coverage-map` and `coverage-run` aliases via a separate step
Zalathar Aug 3, 2026
a8e7de3
misc: change mentions of `compare_{method,type}_predicate_entailment`
ada4a Aug 1, 2026
c996983
rename `OutlivesPredicate` to `OutlivesClause`
ada4a Jul 29, 2026
b624bb4
Rollup merge of #154585 - HerrCai0907:fix/no_mangle_generic_items, r=…
JonathanBrouwer Aug 5, 2026
3e5c220
Rollup merge of #158147 - devnexen:windows_fs_oflow_fix, r=Darksonn
JonathanBrouwer Aug 5, 2026
898bcd3
Rollup merge of #160130 - xmakro:cleanup/deterministic-verify-samplin…
JonathanBrouwer Aug 5, 2026
df9c340
Rollup merge of #160343 - ada4a:push-oyyponlxmyxy, r=oli-obk
JonathanBrouwer Aug 5, 2026
da52a8e
Rollup merge of #160360 - mejrs:hir_pretty, r=nnethercote
JonathanBrouwer Aug 5, 2026
bebdd71
Rollup merge of #160387 - petrochenkov:backlimit, r=bjorn3
JonathanBrouwer Aug 5, 2026
1f9079e
Rollup merge of #160422 - RalfJung:miri-mir-opt-tests, r=Kobzol
JonathanBrouwer Aug 5, 2026
680da6f
Rollup merge of #160444 - mu001999-contrib:fix-160195, r=petrochenkov
JonathanBrouwer Aug 5, 2026
cdfc8c3
Rollup merge of #160510 - LorrensP-2158466:res-unsafe-speculative-fla…
JonathanBrouwer Aug 5, 2026
fe1faa1
Rollup merge of #155424 - jyn514:llm-policy, r=Mark-Simulacrum
JonathanBrouwer Aug 5, 2026
11ec353
Rollup merge of #158726 - valentynkit:sys-sync-futex, r=jhpratt
JonathanBrouwer Aug 5, 2026
d90c8e6
Rollup merge of #158762 - vexide:feat/vex-v5-thumb2, r=jieyouxu
JonathanBrouwer Aug 5, 2026
be41f3c
Rollup merge of #159225 - bjorn3:split_incr_comp_session, r=oli-obk
JonathanBrouwer Aug 5, 2026
0b91234
Rollup merge of #159820 - mejrs:specialization_marker, r=JonathanBrouwer
JonathanBrouwer Aug 5, 2026
c655138
Rollup merge of #160198 - scottmcm:redo-smallest_range_containing, r=…
JonathanBrouwer Aug 5, 2026
8f26f89
Rollup merge of #160362 - joshtriplett:ty-walk-crate, r=fee1-dead
JonathanBrouwer Aug 5, 2026
960d4e7
Rollup merge of #160390 - Dnreikronos:autodiff/slice_dst_typetree, r=…
JonathanBrouwer Aug 5, 2026
853fee0
Rollup merge of #160420 - YingqiDuan:fix-160403-cast-signed-suggestio…
JonathanBrouwer Aug 5, 2026
e2c89eb
Rollup merge of #160516 - zakrad:regr-test-34430, r=petrochenkov
JonathanBrouwer Aug 5, 2026
fbb1428
Rollup merge of #160520 - jackh726:specialization-tests, r=nikomatsakis
JonathanBrouwer Aug 5, 2026
80565e1
Rollup merge of #160522 - clubby789:normalize-proc-macro-deps, r=jiey…
JonathanBrouwer Aug 5, 2026
3f66a41
Rollup merge of #160523 - zakrad:regr-test-117923, r=nnethercote
JonathanBrouwer Aug 5, 2026
3a94fa2
Rollup merge of #160531 - jewboi896-cmyk:patch-1, r=ShoyuVanilla
JonathanBrouwer Aug 5, 2026
f1910ba
Rollup merge of #160538 - CacinieP:expect-tcp-precondition-style, r=j…
JonathanBrouwer Aug 5, 2026
32c1b4e
Rollup merge of #160548 - Zalathar:coverage-mode, r=jieyouxu
JonathanBrouwer Aug 5, 2026
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
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ c682aa162b0d41e21cc6748f4fecfe01efb69d1f
1fcae03369abb4c2cc180cd5a49e1f4440a81300
# Breaking up of compiletest runtest.rs
60600a6fa403216bfd66e04f948b1822f6450af7

# std: move futex implementations into sys::sync::futex
7232830d10b6af772e0e4670a2ff61dd23830ed8
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<!-- homu-ignore:start -->

- [ ] I did not use an LLM to create a change in this PR.
- [ ] I used an LLM to create a change in this PR, and I have explained below how it was used.

<!--
Please read our [LLM policy] before opening a PR,
and check one of the boxes above to indicate whether you've used an LLM.
If you do not check a box, a reviewer may ask you whether an LLM was involved.
LLM contributions are not banned, but are held to a higher standard of review and correctness.

[LLM policy]: https://forge.rust-lang.org/policies/llm-usage.html

If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.
Expand Down
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ that you read and understand the [rustc-dev-guide] before making a contribution.
talks about the different bots in the Rust ecosystem, the Rust development tools,
bootstrapping, the compiler architecture, source code representation, and more.

## LLM policy

We have a policy for how LLMs are allowed to be used in contributions to `rust-lang/rust`.
You can read it [on Forge][LLM policy].
For suggestions about how to use LLMs *well*, and how to review LLM-created PRs, see [the dev-guide][llm-guidance].

[LLM policy]: https://forge.rust-lang.org/policies/llm-usage.html
[llm-guidance]: https://rustc-dev-guide.rust-lang.org/llm-guidance.html

## [Getting help](https://rustc-dev-guide.rust-lang.org/getting-started.html#asking-questions)

There are many ways you can get help when you're stuck. Rust has two platforms for this:
Expand Down
15 changes: 13 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3954,6 +3954,7 @@ dependencies = [
"rustc_errors",
"rustc_expand",
"rustc_feature",
"rustc_hir",
"rustc_hir_analysis",
"rustc_hir_pretty",
"rustc_index",
Expand Down Expand Up @@ -4414,7 +4415,6 @@ dependencies = [
"rustc_graphviz",
"rustc_hashes",
"rustc_hir",
"rustc_hir_pretty",
"rustc_index",
"rustc_lint_defs",
"rustc_macros",
Expand Down Expand Up @@ -4621,7 +4621,7 @@ dependencies = [
"rustc_middle",
"rustc_session",
"rustc_span",
"rustc_ty_utils",
"rustc_ty_walk",
"tracing",
]

Expand Down Expand Up @@ -4908,6 +4908,17 @@ dependencies = [
"rustc_span",
"rustc_target",
"rustc_trait_selection",
"rustc_ty_walk",
"tracing",
]

[[package]]
name = "rustc_ty_walk"
version = "0.0.0"
dependencies = [
"rustc_hir",
"rustc_middle",
"rustc_span",
"tracing",
]

Expand Down
62 changes: 62 additions & 0 deletions compiler/rustc_abi/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,68 @@ fn align_constants() {
assert_eq!(Align::EIGHT, Align::from_bytes(8).unwrap());
}

#[test]
#[should_panic(expected = "Value 299 is too big for Size(1 bytes)")]
fn wrapping_range_smallest_range_containing_size_mismatch() {
WrappingRange::smallest_range_containing(200..300, Size::from_bytes(1));
}

#[test]
fn wrapping_range_smallest_range_containing() {
#[track_caller]
fn check(x: impl IntoIterator<Item = u128>, bytes: u64, start: u128, end: u128) {
assert_eq!(
WrappingRange::smallest_range_containing(x, Size::from_bytes(bytes)),
Some(WrappingRange { start, end }),
);
}

assert_eq!(WrappingRange::smallest_range_containing([], Size::from_bytes(1)), None);

check([7], 1, 7, 7);
check([7, 7, 7], 1, 7, 7);

check(0..=127, 1, 0, 127);
check((0..=127).chain([255]), 1, 255, 127);

check((-100..=100_i128).map(i128::cast_unsigned), 16, (-100_i128).cast_unsigned(), 100);

// A wraparound case that's not just "sort them as signed"
check([10, 100, 160, 220], 1, 100, 10);

check([0, 0xFF], 1, 0xFF, 0);
check([0, 0xFF], 2, 0, 0xFF);
check([0, 0xFFFF], 2, 0xFFFF, 0);
check([0, 0xFFFF], 4, 0, 0xFFFF);
check([0, 0xFFFFFFFF], 4, 0xFFFFFFFF, 0);
check([0, 0xFFFFFFFF], 8, 0, 0xFFFFFFFF);

check([100, 200], 1, 100, 200);
check([100, 200, 50], 1, 50, 200);
check([100, 200, 250], 1, 100, 250);
check([100, 200, 250, 50], 1, 200, 100);

check([200, 50], 1, 200, 50);
check([200, 50, 190], 1, 190, 50);
check([200, 50, 60], 1, 200, 60);
check([200, 50, 125], 1, 50, 200);

// The mem::Alignment case
check((0..64).map(|n| 1 << n), 8, 1, i64::MIN.cast_unsigned().into());

// Both `100..=228` and `..=228 | 100..` are the same size, but we pick the one without zero.
check([100, 228], 1, 100, 228);

// The wraparound one here is slightly smaller, so we pick it despite including zero.
// (The distance 10→96 is 86, compared to 85 for 96→181 and 181→10.)
check([10, 96, 181], 1, 96, 10);

// These 4 values are evenly spaced so all 4 candidate ranges have length 193:
// `(..=32) | (96..)`, `(..=96) | (160..)`, `(..=160) | (224..)`, and `32..=224`.
// We pick the last one as the only one that doesn't contain zero.
check([0xA0, 0xE0, 0x20, 0x60], 1, 0x20, 0xE0);
}

#[test]
fn wrapping_range_contains_range() {
let size16 = Size::from_bytes(16);
Expand Down
54 changes: 26 additions & 28 deletions compiler/rustc_abi/src/wrapping_range.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::fmt;
use std::ops::RangeFull;
use std::{fmt, iter};

use crate::Size;
#[cfg(feature = "nightly")]
Expand Down Expand Up @@ -149,51 +149,49 @@ impl WrappingRange {
///
/// # Examples
///
///
/// ```
/// use rustc_abi::{Size, WrappingRange};
///
/// let range = WrappingRange::smallest_range_containing([2, 6, 12, 4], Size::from_bytes(2));
/// assert_eq!(range.unwrap(), WrappingRange { start: 2, end: 12 });
/// let chain = std::iter::chain(10..20, 30..40);
/// let range = WrappingRange::smallest_range_containing(chain, Size::from_bytes(2));
/// assert_eq!(range.unwrap(), WrappingRange { start: 10, end: 39 });
///
/// let range = WrappingRange::smallest_range_containing(0..=127, Size::from_bytes(1));
/// assert_eq!(range.unwrap(), WrappingRange { start: 0, end: 127 });
/// let range = WrappingRange::smallest_range_containing([129, 128, 127], Size::from_bytes(1));
/// assert_eq!(range.unwrap(), WrappingRange { start: 127, end: 129 });
/// // Values don't need to be sorted nor unique
/// let range = WrappingRange::smallest_range_containing([3, 5, 3, 1, 3], Size::from_bytes(2));
/// assert_eq!(range.unwrap(), WrappingRange { start: 1, end: 5 });
///
/// // The size matters because it changes where the wrapping can happen:
/// let range = WrappingRange::smallest_range_containing([1, 254], Size::from_bytes(1));
/// assert_eq!(range.unwrap(), WrappingRange { start: 254, end: 1 });
/// let range = WrappingRange::smallest_range_containing([1, 254], Size::from_bytes(4));
/// assert_eq!(range.unwrap(), WrappingRange { start: 1, end: 254 });
///
/// // Both `100..=228` and `..=228 | 100..` are the same size, but we pick the one without zero.
/// let range = WrappingRange::smallest_range_containing([100, 228], Size::from_bytes(1));
/// assert_eq!(range.unwrap(), WrappingRange { start: 100, end: 228 });
/// // These 4 values are evenly spaced so all 4 candidate ranges have length 193:
/// // `(..=32) | (96..)`, `(..=96) | (160..)`, `(..=160) | (224..)`, and `32..=224`.
/// // We pick the last one as the only one that doesn't contain zero.
/// let range = WrappingRange::smallest_range_containing([0xA0, 0xE0, 0x20, 0x60], Size::from_bytes(1));
/// assert_eq!(range.unwrap(), WrappingRange { start: 0x20, end: 0xE0 });
/// ```
pub fn smallest_range_containing(
values: impl IntoIterator<Item = u128>,
size: Size,
) -> Option<Self> {
let mut values: Vec<_> = values.into_iter().collect();
let umax = size.unsigned_int_max();
for value in &values {
debug_assert!(*value <= umax, "Value {value:?} is too big for {size:?}");
}
values.sort_unstable();

// Having sorted all the values, every element is a possible start point for the
// range of values, up to the previous element (wrapping around the end of the vec).
// Look at all those candidates and pick the one that's as narrow as possible.
let pairs = std::iter::zip(values.iter().copied(), values.iter().copied().cycle().skip(1));
let ranges = pairs.map(|(end, start)| WrappingRange { start, end });
let smallest_range = ranges.min_by_key(|r| (r.width(size), r.start));
smallest_range
// The simple answer is the non-wraparound range `min..=max`.
let obvious_range = WrappingRange { start: *values.first()?, end: *values.last()? };

// Having sorted the inputs, one test is enough to double-check they all fit in `size`.
let max_input = obvious_range.end;
assert!(
max_input <= size.unsigned_int_max(),
"Value {max_input:?} is too big for {size:?}",
);

// But every `[.., end, start, ..]` is also a potential candidate for a wraparound
// range `(..=end) | (start..)`, so long as `start` and `end` aren't duplicates.
let wraparound_ranges = values
.array_windows::<2>()
.filter_map(|&[end, start]| (start != end).then_some(WrappingRange { start, end }));

// Pick whichever range is smallest. By putting the non-wraparound range first,
// it'll be preferred over a wraparound range with the same width.
iter::chain(iter::once(obvious_range), wraparound_ranges).min_by_key(|r| r.width(size))
}
}

Expand Down
15 changes: 11 additions & 4 deletions compiler/rustc_attr_parsing/src/attributes/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::mem;
use rustc_feature::AttributeStability;

use super::prelude::*;
use crate::AttributeSafety;
use crate::attributes::{NoArgsAttributeParser, SingleAttributeParser};
use crate::context::AcceptContext;
use crate::parser::ArgParser;
Expand Down Expand Up @@ -98,12 +99,18 @@ impl NoArgsAttributeParser for RustcSpecializationTraitParser {
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcSpecializationTrait;
}

pub(crate) struct RustcUnsafeSpecializationMarkerParser;
impl NoArgsAttributeParser for RustcUnsafeSpecializationMarkerParser {
const PATH: &[Symbol] = &[sym::rustc_unsafe_specialization_marker];
pub(crate) struct RustcAllowLifetimeDependentSpecializationParser;
impl NoArgsAttributeParser for RustcAllowLifetimeDependentSpecializationParser {
const PATH: &[Symbol] = &[sym::rustc_allow_lifetime_dependent_specialization];
const ALLOWED_TARGETS: AllowedTargets<'_> = AllowedTargets::AllowList(&[Allow(Target::Trait)]);
const STABILITY: AttributeStability = unstable!(rustc_attrs);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcUnsafeSpecializationMarker;
const CREATE: fn(Span) -> AttributeKind =
|_| AttributeKind::RustcAllowLifetimeDependentSpecialization;
const SAFETY: AttributeSafety = AttributeSafety::Unsafe {
note: "this attribute requires `unsafe` because lifetime constraints from \
the implementations of the trait are not considered when specializing",
unsafe_since: None,
};
}

// Coherence
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ attribute_parsers!(
Single<WithoutArgs<RustcAllocatorParser>>,
Single<WithoutArgs<RustcAllocatorZeroedParser>>,
Single<WithoutArgs<RustcAllowIncoherentImplParser>>,
Single<WithoutArgs<RustcAllowLifetimeDependentSpecializationParser>>,
Single<WithoutArgs<RustcAsPtrParser>>,
Single<WithoutArgs<RustcCanonicalSymbolParser>>,
Single<WithoutArgs<RustcCaptureAnalysisParser>>,
Expand Down Expand Up @@ -355,7 +356,6 @@ attribute_parsers!(
Single<WithoutArgs<RustcStrictCoherenceParser>>,
Single<WithoutArgs<RustcTestEntrypointMarkerParser>>,
Single<WithoutArgs<RustcTrivialFieldReadsParser>>,
Single<WithoutArgs<RustcUnsafeSpecializationMarkerParser>>,
Single<WithoutArgs<SplatParser>>,
Single<WithoutArgs<ThreadLocalParser>>,
Single<WithoutArgs<TrackCallerParser>>,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ fn expr_to_lit<'sess>(
}
}

/// Whether expansions of `expr` metavariables from decrarative macros
/// Whether expansions of `expr` metavariables from declarative macros
/// are permitted. Used when parsing meta items; currently, only `cfg` predicates
/// enable this option
#[derive(Clone, Copy, PartialEq, Eq)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ struct CollectRegionConstraintsResult<'tcx> {
location_map: Rc<DenseLocationMap>,
universal_region_relations: Frozen<UniversalRegionRelations<'tcx>>,
region_bound_pairs: Frozen<RegionBoundPairs<'tcx>>,
known_type_outlives_obligations: Frozen<Vec<ty::PolyTypeOutlivesPredicate<'tcx>>>,
known_type_outlives_obligations: Frozen<Vec<ty::PolyTypeOutlivesClause<'tcx>>>,
constraints: MirTypeckRegionConstraints<'tcx>,
deferred_closure_requirements: DeferredClosureRequirements<'tcx>,
deferred_opaque_type_errors: Vec<DeferredOpaqueTypeError<'tcx>>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ pub(crate) fn apply_definition_site_hidden_types<'tcx>(
body: &Body<'tcx>,
universal_regions: &UniversalRegions<'tcx>,
region_bound_pairs: &RegionBoundPairs<'tcx>,
known_type_outlives_obligations: &[ty::PolyTypeOutlivesPredicate<'tcx>],
known_type_outlives_obligations: &[ty::PolyTypeOutlivesClause<'tcx>],
constraints: &mut MirTypeckRegionConstraints<'tcx>,
hidden_types: &mut FxIndexMap<LocalDefId, ty::DefinitionSiteHiddenType<'tcx>>,
opaque_types: &[(OpaqueTypeKey<'tcx>, ProvisionalHiddenType<'tcx>)],
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/type_check/canonical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub(crate) fn fully_perform_op_raw<'tcx, R: fmt::Debug, Op>(
body: &Body<'tcx>,
universal_regions: &UniversalRegions<'tcx>,
region_bound_pairs: &RegionBoundPairs<'tcx>,
known_type_outlives_obligations: &[ty::PolyTypeOutlivesPredicate<'tcx>],
known_type_outlives_obligations: &[ty::PolyTypeOutlivesClause<'tcx>],
constraints: &mut MirTypeckRegionConstraints<'tcx>,
locations: Locations,
category: ConstraintCategory<'tcx>,
Expand Down
15 changes: 7 additions & 8 deletions compiler/rustc_borrowck/src/type_check/constraint_conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub(crate) struct ConstraintConversion<'a, 'tcx> {
/// logic expecting to see (e.g.) `ReStatic`, and if we supplied
/// our special inference variable there, we would mess that up.
region_bound_pairs: &'a RegionBoundPairs<'tcx>,
known_type_outlives_obligations: &'a [ty::PolyTypeOutlivesPredicate<'tcx>],
known_type_outlives_obligations: &'a [ty::PolyTypeOutlivesClause<'tcx>],
locations: Locations,
span: Span,
category: ConstraintCategory<'tcx>,
Expand All @@ -47,7 +47,7 @@ impl<'a, 'tcx> ConstraintConversion<'a, 'tcx> {
infcx: &'a BorrowckInferCtxt<'tcx>,
universal_regions: &'a UniversalRegions<'tcx>,
region_bound_pairs: &'a RegionBoundPairs<'tcx>,
known_type_outlives_obligations: &'a [ty::PolyTypeOutlivesPredicate<'tcx>],
known_type_outlives_obligations: &'a [ty::PolyTypeOutlivesClause<'tcx>],
locations: Locations,
span: Span,
category: ConstraintCategory<'tcx>,
Expand Down Expand Up @@ -115,7 +115,7 @@ impl<'a, 'tcx> ConstraintConversion<'a, 'tcx> {
self.category = outlives_requirement.category;
self.span = outlives_requirement.blame_span;
self.convert(
ty::OutlivesPredicate(subject, outlived_region),
ty::OutlivesClause(subject, outlived_region),
self.category,
&Default::default(),
);
Expand All @@ -125,9 +125,9 @@ impl<'a, 'tcx> ConstraintConversion<'a, 'tcx> {

fn convert(
&mut self,
predicate: ty::ArgOutlivesPredicate<'tcx>,
clause: ty::ArgOutlivesClause<'tcx>,
constraint_category: ConstraintCategory<'tcx>,
higher_ranked_assumptions: &FxHashSet<ty::ArgOutlivesPredicate<'tcx>>,
higher_ranked_assumptions: &FxHashSet<ty::ArgOutlivesClause<'tcx>>,
) {
let tcx = self.infcx.tcx;
debug!("generate: constraints at: {:#?}", self.locations);
Expand All @@ -141,15 +141,14 @@ impl<'a, 'tcx> ConstraintConversion<'a, 'tcx> {
..
} = *self;

let pred = predicate;
// Constraint is implied by a coroutine's well-formedness.
if self.infcx.tcx.sess.opts.unstable_opts.higher_ranked_assumptions
&& higher_ranked_assumptions.contains(&pred)
&& higher_ranked_assumptions.contains(&clause)
{
return;
}

let ty::OutlivesPredicate(k1, r2) = pred;
let ty::OutlivesClause(k1, r2) = clause;
match k1.kind() {
GenericArgKind::Lifetime(r1) => {
let r1_vid = self.to_region_vid(r1);
Expand Down
Loading
Loading