diff options
| author | bors <bors@rust-lang.org> | 2022-07-26 04:28:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-07-26 04:28:41 +0000 |
| commit | b629c85bd74dfb730a3e9308312b007c0bf027cb (patch) | |
| tree | fd1af610fe65c0dff7fb3ead05b43937e2b635a7 /compiler/rustc_codegen_cranelift/example/std_example.rs | |
| parent | daaae25022cedcd7ded230170cdf48cfb799f9a2 (diff) | |
| parent | a572f061c7a8c58aab67335f6b63a74cfc6e4973 (diff) | |
| download | rust-b629c85bd74dfb730a3e9308312b007c0bf027cb.tar.gz rust-b629c85bd74dfb730a3e9308312b007c0bf027cb.zip | |
Auto merge of #99745 - JohnTitor:rollup-lvrie64, r=JohnTitor
Rollup of 7 pull requests Successful merges: - #98211 (Implement `fs::get_path` for FreeBSD.) - #99353 (Slightly improve mismatched GAT where clause error) - #99593 (Suggest removing the tuple struct field for the unwrapped value) - #99615 (Remove some explicit `self.infcx` for `FnCtxt`, which already derefs into `InferCtxt`) - #99711 (Remove reachable coverage without counters) - #99718 (Avoid `&str`/`Symbol` to `String` conversions) - #99720 (Sync rustc_codegen_cranelift) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_cranelift/example/std_example.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/example/std_example.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_cranelift/example/std_example.rs b/compiler/rustc_codegen_cranelift/example/std_example.rs index 0a2bce2621d..0b5b6cd55d7 100644 --- a/compiler/rustc_codegen_cranelift/example/std_example.rs +++ b/compiler/rustc_codegen_cranelift/example/std_example.rs @@ -128,6 +128,25 @@ fn main() { 0 => loop {}, v => panic(v), }; + + if black_box(false) { + // Based on https://github.com/rust-lang/rust/blob/2f320a224e827b400be25966755a621779f797cc/src/test/ui/debuginfo/debuginfo_with_uninhabitable_field_and_unsized.rs + let _ = Foo::<dyn Send>::new(); + + #[allow(dead_code)] + struct Foo<T: ?Sized> { + base: Never, + value: T, + } + + impl<T: ?Sized> Foo<T> { + pub fn new() -> Box<Foo<T>> { + todo!() + } + } + + enum Never {} + } } fn panic(_: u128) { |
