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#90282 - matthiaskrgr:rollup-c6trbff, r=matthi…
…askrgr Rollup of 4 pull requests Successful merges: - rust-lang#89581 (Add -Z no-unique-section-names to reduce ELF header bloat.) - rust-lang#90196 (Fix and extent ControlFlow `traverse_inorder` example) - rust-lang#90255 (:arrow_up: rust-analyzer) - rust-lang#90266 (Prevent duplicate caller bounds candidates by exposing default substs in Unevaluated) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
11 changed files
with
84 additions
and
5 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
9 changes: 9 additions & 0 deletions
9
src/doc/unstable-book/src/compiler-flags/no-unique-section-names.md
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,9 @@ | ||
# `no-unique-section-names` | ||
|
||
------------------------ | ||
|
||
This flag currently applies only to ELF-based targets using the LLVM codegen backend. It prevents the generation of unique ELF section names for each separate code and data item when `-Z function-sections` is also in use, which is the default for most targets. This option can reduce the size of object files, and depending on the linker, the final ELF binary as well. | ||
|
||
For example, a function `func` will by default generate a code section called `.text.func`. Normally this is fine because the linker will merge all those `.text.*` sections into a single one in the binary. However, starting with [LLVM 12](https://github.com/llvm/llvm-project/commit/ee5d1a04), the backend will also generate unique section names for exception handling, so you would see a section name of `.gcc_except_table.func` in the object file and potentially in the final ELF binary, which could add significant bloat to programs that contain many functions. | ||
|
||
This flag instructs LLVM to use the same `.text` and `.gcc_except_table` section name for each function, and it is analogous to Clang's `-fno-unique-section-names` option. |
9 changes: 9 additions & 0 deletions
9
src/test/ui/const-generics/expose-default-substs-param-env.rs
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,9 @@ | ||
// build-pass | ||
|
||
#![feature(generic_const_exprs)] | ||
#![allow(unused_braces, incomplete_features)] | ||
|
||
pub trait Foo<const N: usize> {} | ||
pub trait Bar: Foo<{ 1 }> { } | ||
|
||
fn main() {} |
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,16 @@ | ||
// build-pass | ||
|
||
#![feature(generic_const_exprs)] | ||
#![allow(unused_braces, incomplete_features)] | ||
|
||
pub trait AnotherTrait{ | ||
const ARRAY_SIZE: usize; | ||
} | ||
pub trait Shard<T: AnotherTrait>: | ||
AsMut<[[u8; T::ARRAY_SIZE]]> | ||
where | ||
[(); T::ARRAY_SIZE]: Sized | ||
{ | ||
} | ||
|
||
fn main() {} |
Submodule rust-analyzer
updated
from 91cbda to 1f4769