Skip to content

Rollup of 7 pull requests #84535

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 32 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
259a368
fix name resolution for param defaults
lcnr Apr 18, 2021
7cb1dcd
loosen ordering restricts for `const_generics_defaults`
lcnr Apr 18, 2021
312b4fd
improve wf check for const param defaults
lcnr Apr 18, 2021
d3e0d2f
supply substs to anon consts in defaults
lcnr Apr 18, 2021
02a2fab
Cleanup `std::os`
CDirkx Mar 4, 2021
f728116
Move `std::sys::hermit::ext` to `std::os::hermit`
CDirkx Mar 4, 2021
4ac44ee
Move `std::sys::windows::ext` to `std::os::windows`
CDirkx Mar 4, 2021
6ca35de
Move `std::sys::unix::ext` to `std::os::unix`
CDirkx Mar 4, 2021
ba5fb6f
Move `std::sys::wasi::ext` to `std::os::wasi`
CDirkx Mar 4, 2021
3c139c7
Move `std::sys::sgx::ext` to `std::os::fortanix_sgx`
CDirkx Mar 4, 2021
7a74bf3
Rework `os` to avoid using `cfg_if!` with public items
CDirkx Apr 14, 2021
b5bed92
Allow documenting on `hermit`
CDirkx Apr 18, 2021
00c95a3
update Miri
RalfJung Apr 23, 2021
e4ce655
Handle pretty printing of `else if let` clauses
syvb Apr 23, 2021
fc97ce6
add tests for new behavior
syvb Apr 23, 2021
8629017
Add regression test
estebank Apr 24, 2021
64ee9cc
Recover trait import suggestion
estebank Apr 24, 2021
fb1fb7d
Tweak suggestion output
estebank Apr 24, 2021
0d52599
move core::hint::black_box under its own feature gate
RalfJung Apr 15, 2021
ad78b50
Implemented suggestion.
Apr 24, 2021
56c0fb6
fix sanitizer tests
RalfJung Apr 24, 2021
0e7489a
Added a test.
Apr 24, 2021
8bc81a0
Refactor.
Apr 24, 2021
05a5a11
More tests.
Apr 24, 2021
3b50461
One more test case.
Apr 24, 2021
70647f1
Rollup merge of #84200 - CDirkx:os, r=m-ou-se
Dylan-DPC Apr 25, 2021
e165b58
Rollup merge of #84216 - RalfJung:black-box, r=Mark-Simulacrum
Dylan-DPC Apr 25, 2021
ea1c221
Rollup merge of #84299 - lcnr:const-generics-defaults-name-res, r=varkor
Dylan-DPC Apr 25, 2021
8509ccb
Rollup merge of #84481 - RalfJung:miri, r=RalfJung
Dylan-DPC Apr 25, 2021
822c24c
Rollup merge of #84486 - Smittyvb:else-if-let-hir-pretty-print, r=pet…
Dylan-DPC Apr 25, 2021
d1e2564
Rollup merge of #84499 - estebank:issue-84272, r=jackh726
Dylan-DPC Apr 25, 2021
a48c332
Rollup merge of #84516 - torhovland:issue-84114, r=estebank
Dylan-DPC Apr 25, 2021
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
Prev Previous commit
Next Next commit
add tests for new behavior
  • Loading branch information
syvb committed Apr 23, 2021
commit fc97ce6daed320027a47c1a0ddb86c9242ebde0c
9 changes: 9 additions & 0 deletions src/test/ui/match/issue-82392.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// https://github.com/rust-lang/rust/issues/82329
// compile-flags: -Zunpretty=hir,typed
// check-pass

pub fn main() {
if true {
} else if let Some(a) = Some(3) {
}
}
20 changes: 20 additions & 0 deletions src/test/ui/match/issue-82392.stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#[prelude_import]
use ::std::prelude::rust_2015::*;
#[macro_use]
extern crate std;
// https://github.com/rust-lang/rust/issues/82329
// compile-flags: -Zunpretty=hir,typed
// check-pass

pub fn main() ({
(if (true as bool)
({ } as
()) else {match ((Some as
fn(i32) -> Option<i32> {Option::<i32>::Some})((3
as
i32))
as Option<i32>) {
Some(a) => { }
_ => { }
}} as ())
} as ())
18 changes: 18 additions & 0 deletions src/test/ui/match/issue-84434.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// https://github.com/rust-lang/rust/issues/84434
// check-pass

use std::path::Path;
struct A {
pub func: fn(check: bool, a: &Path, b: Option<&Path>),
}
const MY_A: A = A {
func: |check, a, b| {
if check {
let _ = ();
} else if let Some(parent) = b.and_then(|p| p.parent()) {
let _ = ();
}
},
};

fn main() {}