Skip to content

Commit

Permalink
Auto merge of rust-lang#102192 - matthiaskrgr:rollup-0ctjzco, r=matth…
Browse files Browse the repository at this point in the history
…iaskrgr

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
  • Loading branch information
bors committed Sep 23, 2022
2 parents 75dd959 + b59fd3c commit 6e81886
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions cargo-miri/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg_attr(bootstrap, feature(let_else))]
#![allow(clippy::useless_format, clippy::derive_partial_eq_without_eq, rustc::internal)]

#[macro_use]
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#![feature(is_some_with)]
#![feature(nonzero_ops)]
#![feature(local_key_cell_methods)]
#![cfg_attr(bootstrap, feature(let_else))]
// Configure clippy and other lints
#![allow(
clippy::collapsible_else_if,
Expand Down
22 changes: 22 additions & 0 deletions tests/pass/issues/issue-miri-2433.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#![feature(type_alias_impl_trait)]

trait T { type Item; }

type Alias<'a> = impl T<Item = &'a ()>;

struct S;
impl<'a> T for &'a S {
type Item = &'a ();
}

fn filter_positive<'a>() -> Alias<'a> {
&S
}

fn with_positive(fun: impl Fn(Alias<'_>)) {
fun(filter_positive());
}

fn main() {
with_positive(|_| ());
}

0 comments on commit 6e81886

Please sign in to comment.