forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#115442 - cuviper:beta-next, r=cuviper
[beta] backports - Contents of reachable statics is reachable rust-lang#115114 - Revert "Suggest using `Arc` on `!Send`/`!Sync` types" rust-lang#115311 - Stop emitting non-power-of-two vectors in (non-portable-SIMD) codegen rust-lang#115236 - Do not forget to pass DWARF fragment information to LLVM. rust-lang#115139 - rustdoc: use unicode-aware checks for redundant explicit link fastpath rust-lang#115070 r? cuviper
- Loading branch information
Showing
125 changed files
with
193 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// compile-flags: -g -Zmir-opt-level=0 -Zmir-enable-passes=+ScalarReplacementOfAggregates | ||
// compile-flags: -Cno-prepopulate-passes | ||
// | ||
// Tested offsets are only correct for x86_64. | ||
// only-x86_64 | ||
|
||
#![crate_type = "lib"] | ||
|
||
pub struct ExtraSlice<'input> { | ||
slice: &'input [u8], | ||
extra: u32, | ||
} | ||
|
||
#[no_mangle] | ||
pub fn extra(s: &[u8]) { | ||
// CHECK: void @extra( | ||
// CHECK: %slice.dbg.spill1 = alloca i32, | ||
// CHECK: %slice.dbg.spill = alloca { ptr, i64 }, | ||
// CHECK: %s.dbg.spill = alloca { ptr, i64 }, | ||
// CHECK: call void @llvm.dbg.declare(metadata ptr %s.dbg.spill, metadata ![[S_EXTRA:.*]], metadata !DIExpression()), | ||
// CHECK: call void @llvm.dbg.declare(metadata ptr %slice.dbg.spill, metadata ![[SLICE_EXTRA:.*]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 128)), | ||
// CHECK: call void @llvm.dbg.declare(metadata ptr %slice.dbg.spill1, metadata ![[SLICE_EXTRA]], metadata !DIExpression(DW_OP_LLVM_fragment, 128, 32)), | ||
let slice = ExtraSlice { slice: s, extra: s.len() as u32 }; | ||
} | ||
|
||
struct Zst; | ||
|
||
pub struct ZstSlice<'input> { | ||
slice: &'input [u8], | ||
extra: Zst, | ||
} | ||
|
||
#[no_mangle] | ||
pub fn zst(s: &[u8]) { | ||
// The field `extra` is a ZST. The fragment for the field `slice` encompasses the whole | ||
// variable, so is not a fragment. In that case, the variable must have no fragment. | ||
|
||
// CHECK: void @zst( | ||
// CHECK-NOT: call void @llvm.dbg.declare(metadata ptr %slice.dbg.spill, metadata !{}, metadata !DIExpression(DW_OP_LLVM_fragment, | ||
// CHECK: call void @llvm.dbg.declare(metadata ptr %{{.*}}, metadata ![[SLICE_ZST:.*]], metadata !DIExpression()), | ||
// CHECK-NOT: call void @llvm.dbg.declare(metadata ptr %{{.*}}, metadata ![[SLICE_ZST]], | ||
let slice = ZstSlice { slice: s, extra: Zst }; | ||
} | ||
|
||
// CHECK: ![[S_EXTRA]] = !DILocalVariable(name: "s", | ||
// CHECK: ![[SLICE_EXTRA]] = !DILocalVariable(name: "slice", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// check-pass | ||
|
||
/// [`…foo`] [`…bar`] [`Err`] | ||
pub struct Broken {} | ||
|
||
/// [`…`] [`…`] [`Err`] | ||
pub struct Broken2 {} | ||
|
||
/// [`…`][…] [`…`][…] [`Err`] | ||
pub struct Broken3 {} | ||
|
||
/// […………………………][Broken3] | ||
pub struct Broken4 {} | ||
|
||
/// [Broken3][…………………………] | ||
pub struct Broken5 {} | ||
|
||
pub struct Err; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.