Skip to content

Commit 6e81886

Browse files
committed
Auto merge of rust-lang#102192 - matthiaskrgr:rollup-0ctjzco, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - rust-lang#102094 (Add missing documentation for `bool::from_str`) - rust-lang#102115 (Add examples to `bool::then` and `bool::then_some`) - rust-lang#102134 (Detect panic strategy using `rustc --print cfg`) - rust-lang#102137 (Don't convert valtree to constvalue during normalization) - rust-lang#102148 (add regression test for miri issue 2433) - rust-lang#102158 (rustdoc: clean up CSS/DOM for deprecation warnings) - rust-lang#102177 (Fix a typo in `std`'s root docs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 75dd959 + b59fd3c commit 6e81886

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

cargo-miri/src/main.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![cfg_attr(bootstrap, feature(let_else))]
12
#![allow(clippy::useless_format, clippy::derive_partial_eq_without_eq, rustc::internal)]
23

34
#[macro_use]

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#![feature(is_some_with)]
1111
#![feature(nonzero_ops)]
1212
#![feature(local_key_cell_methods)]
13+
#![cfg_attr(bootstrap, feature(let_else))]
1314
// Configure clippy and other lints
1415
#![allow(
1516
clippy::collapsible_else_if,

tests/pass/issues/issue-miri-2433.rs

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#![feature(type_alias_impl_trait)]
2+
3+
trait T { type Item; }
4+
5+
type Alias<'a> = impl T<Item = &'a ()>;
6+
7+
struct S;
8+
impl<'a> T for &'a S {
9+
type Item = &'a ();
10+
}
11+
12+
fn filter_positive<'a>() -> Alias<'a> {
13+
&S
14+
}
15+
16+
fn with_positive(fun: impl Fn(Alias<'_>)) {
17+
fun(filter_positive());
18+
}
19+
20+
fn main() {
21+
with_positive(|_| ());
22+
}

0 commit comments

Comments
 (0)