Skip to content

Rollup of 12 pull requests #139837

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

Closed
wants to merge 31 commits into from
Closed
Changes from 2 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b9754f9
Enable contracts for const functions
celinval Feb 25, 2025
3feac59
Fix unreachable expression warning
celinval Apr 8, 2025
8c86bb4
rustdoc: Output target feature information
willglynn Apr 4, 2025
13f1c84
Apply suggestions from code review
celinval Apr 10, 2025
7582554
Update target_features doc comment
willglynn Apr 12, 2025
86e2a07
opt-dist: use executable-extension for host llvm-profdata
ognevny Apr 12, 2025
a404015
std: sys: process: uefi: Use NULL stdin by default
Ayush1325 Apr 8, 2025
af25995
std: sys: stdio: uefi: Tread UNSUPPORTED Status as read(0)
Ayush1325 Apr 13, 2025
d994fef
std: sys: process: uefi: Allow specifying Stdin
Ayush1325 Apr 10, 2025
ed5f31a
Avoid unused clones in Cloned<I> and Copied<I>
thaliaarchi Apr 13, 2025
f3344ef
tests: use `compiletest-ignore-dir` for bootstrap self-tests
jieyouxu Apr 14, 2025
6a8718c
Add test for issue 34834
reddevilmidzy Apr 14, 2025
2c2c9df
drop global where-bounds before merging candidates
lcnr Apr 14, 2025
ce9d867
do not leak auto traits in item bounds
lcnr Apr 14, 2025
2e79f7c
move tests
lcnr Apr 14, 2025
836ea25
add RPITIT tests: method compat auto trait leakage
lcnr Apr 14, 2025
7ad1697
Allow const patterns of matches to contain pattern types
oli-obk Jan 24, 2025
c2712bc
ci: add runners for vanilla LLVM 20
cuviper Mar 12, 2025
9676d4a
std: add Output::exit_ok
lolbinarycat Apr 8, 2025
eea9048
Rollup merge of #138374 - celinval:issue-136925-const-contract, r=com…
Zalathar Apr 15, 2025
8c1f55b
Rollup merge of #138380 - cuviper:ci-llvm-20, r=Kobzol
Zalathar Apr 15, 2025
a295c7e
Rollup merge of #138393 - oli-obk:pattern-type-in-pattern, r=BoxyUwU
Zalathar Apr 15, 2025
e2d5382
Rollup merge of #139393 - willglynn:rustdoc_output_target_feature_inf…
Zalathar Apr 15, 2025
1373a2f
Rollup merge of #139517 - Ayush1325:uefi-cmd-stdin-null, r=joboet
Zalathar Apr 15, 2025
d179ea0
Rollup merge of #139554 - lolbinarycat:std-output-exit_ok, r=tgross35
Zalathar Apr 15, 2025
83cd669
Rollup merge of #139745 - thaliaarchi:iter-unused-clone-copy, r=joboet
Zalathar Apr 15, 2025
e668f8c
Rollup merge of #139757 - ognevny:opt-dist-hostllvm, r=Kobzol
Zalathar Apr 15, 2025
7771e67
Rollup merge of #139778 - reddevilmidzy:add-success-test, r=lcnr
Zalathar Apr 15, 2025
cdd69c9
Rollup merge of #139783 - jieyouxu:ignore-dir, r=Zalathar
Zalathar Apr 15, 2025
b2897d0
Rollup merge of #139789 - lcnr:opaques-auto-trait-leakage, r=compiler…
Zalathar Apr 15, 2025
7f3fec3
Rollup merge of #139791 - lcnr:ignore-global-where-bounds, r=compiler…
Zalathar Apr 15, 2025
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
30 changes: 30 additions & 0 deletions tests/ui/traits/associated_type_bound/hrtb-associated.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//@ check-pass
//! This test ensures that HRTB (higher-ranked trait bounds) on associated types
//! compile correctly. This was previously rejected by the compiler.
//! Related issue: <https://github.com/rust-lang/rust/issues/34834>

pub trait Provides<'a> {
type Item;
}

pub trait Selector: for<'a> Provides<'a> {
type Namespace: PartialEq + for<'a> PartialEq<<Self as Provides<'a>>::Item>;

fn get_namespace(&self) -> <Self as Provides>::Item;
}

pub struct MySelector;

impl<'a> Provides<'a> for MySelector {
type Item = &'a str;
}

impl Selector for MySelector {
type Namespace = String;

fn get_namespace(&self) -> &str {
unimplemented!()
}
}

fn main() {}