| Age | Commit message (Collapse) | Author | Lines |
|
|
|
The section as written did not cover all cases, and left some of them
implicit. Rewrite it to systematically cover all cases. Place examples
immediately following the corresponding case.
In the process, reorder to move the simplest cases first: start with
single-line and add progressively more line breaks.
This does not change the meaning of the section at all, and in
particular does not change the defined style for let-else statements.
|
|
|
|
|
|
Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
Remove `box_free` lang item
This PR removes the `box_free` lang item, replacing it with `Box`'s `Drop` impl. Box dropping is still slightly magic because the contained value is still dropped by the compiler.
|
|
|
|
|
|
|
|
Along with replacing fvdl uses with the equivalent ffx commands, this
also switches from using the install path for libstd-*.so and
libtest-*.so to using the build directory (now passed on the command
line). The user no longer needs to run x.py install before running tests
now, and the correct libstd and libtest are detected on run instead of
startup so the test runner can handle recompilations after starting the
testing environment.
|
|
|
|
Add chapter in rustdoc book for re-exports and add a regression test for `#[doc(hidden)]` behaviour
Fixes https://github.com/rust-lang/rust/issues/109449.
Fixes https://github.com/rust-lang/rust/issues/53417.
After the discussion in #109697, I made a few PRs to fix a few corner cases:
* https://github.com/rust-lang/rust/pull/112178
* https://github.com/rust-lang/rust/pull/112108
* https://github.com/rust-lang/rust/pull/111997
With this I think I covered all cases. Only thing missing at this point was a chapter covering re-exports in the rustdoc book.
r? `@notriddle`
|
|
|
|
* Fix typo
* Fix typo in typo fix
* add missing word
---------
Co-authored-by: Tshepang Mbambo <tshepang@gmail.com>
|
|
|
|
Because tiny CGUs make compilation less efficient *and* result in worse
generated code.
We don't do this when the number of CGUs is explicitly given, because
there are times when the requested number is very important, as
described in some comments within the commit. So the commit also
introduces a `CodegenUnits` type that distinguishes between default
values and user-specified values.
This change has a roughly neutral effect on walltimes across the
rustc-perf benchmarks; there are some speedups and some slowdowns. But
it has significant wins for most other metrics on numerous benchmarks,
including instruction counts, cycles, binary size, and max-rss. It also
reduces parallelism, which is good for reducing jobserver competition
when multiple rustc processes are running at the same time. It's smaller
benchmarks that benefit the most; larger benchmarks already have CGUs
that are all larger than the minimum size.
Here are some example before/after CGU sizes for opt builds.
- html5ever
- CGUs: 16, mean size: 1196.1, sizes: [3908, 2992, 1706, 1652, 1572,
1136, 1045, 948, 946, 938, 579, 471, 443, 327, 286, 189]
- CGUs: 4, mean size: 4396.0, sizes: [6706, 3908, 3490, 3480]
- libc
- CGUs: 12, mean size: 35.3, sizes: [163, 93, 58, 53, 37, 8, 2 (x6)]
- CGUs: 1, mean size: 424.0, sizes: [424]
- tt-muncher
- CGUs: 5, mean size: 1819.4, sizes: [8508, 350, 198, 34, 7]
- CGUs: 1, mean size: 9075.0, sizes: [9075]
Note that CGUs of size 100,000+ aren't unusual in larger programs.
|
|
|
|
|
|
|
|
|
|
Write to stdout if `-` is given as output file
With this PR, if `-o -` or `--emit KIND=-` is provided, output will be written to stdout instead. Binary output (those of type `obj`, `llvm-bc`, `link` and `metadata`) being written this way will result in an error unless stdout is not a tty. Multiple output types going to stdout will trigger an error too, as they will all be mixded together.
This implements https://github.com/rust-lang/compiler-team/issues/431
The idea behind the changes is to introduce an `OutFileName` enum that represents the output - be it a real path or stdout - and to use this enum along the code paths that handle different output types.
|
|
Force all native libraries to be statically linked when linking a static binary
Previously, `#[link]` without an explicit `kind = "static"` would confuse the linker and end up producing a dynamically linked library because of the `-Bdynamic` flag. However this binary would not work correctly anyways since it was linked with startup code for a static binary.
This PR solves this by forcing all native libraries to be statically linked when the output is a static binary that cannot link to dynamic libraries anyways.
Fixes #108878
Fixes #102993
|
|
|
|
Improved std support for ps vita target
Fixed a couple of things in std support for ps vita via Vita SDK newlib oss implementation:
- Added missing hardware features to target spec
- Compile in thumb by default (newlib is also compiled in thumb)
- Fixed fs calls. Vita newlib has a not-very-posix dirent. Also vita does not expose inodes, it's stubbed as 0 in stat, and I'm stubbing it here for dirent (because vita newlibs's dirent doesn't even have that field)
- Enabled signal handlers for panic unwinding
- Dropped static link requirement from the platform support md. Also, rearranged sections to better stick with the template.
|
|
If `-o -` or `--emit KIND=-` is provided, output will be written
to stdout instead. Binary output (`obj`, `llvm-bc`, `link` and
`metadata`) being written this way will result in an error unless
stdout is not a tty. Multiple output types going to stdout will
trigger an error too, as they will all be mixded together.
|
|
Rollup of 8 pull requests
Successful merges:
- #111250 (Add Terminator conversion from MIR to SMIR, part #2)
- #112310 (Add new Tier-3 targets: `loongarch64-unknown-none*`)
- #112334 (Add myself to highfive rotation)
- #112340 (remove `TyCtxt::has_error_field` helper method)
- #112343 (Prevent emitting `missing_docs` for `pub extern crate`)
- #112350 (Avoid duplicate type sanitization of local decls in borrowck)
- #112356 (Fix comment for `get_region_var_origins`)
- #112358 (Remove default visitor impl in region constraint generation)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
MCP: https://github.com/rust-lang/compiler-team/issues/628
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Demanglers should be prepared for any arbitrary length number.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Stabilize inline asm for LoongArch64
This PR is used to tracking for stabilize `inline asm` for LoongArch64.
**Status**
- [x] https://github.com/rust-lang/rust/pull/111237
- [x] https://github.com/rust-lang/rust/pull/111332
- [ ] https://github.com/rust-lang/reference/pull/1357
Any others I missed?
r? `@Amanieu`
|
|
This is slightly patterned after what OpenBSD has done.
This is a step along the path to reduce the number and amount
of diffs that pkgsrc carries around for rust, and this documents
also some parts which have not yet been upstreamed (mipsel-*).
|
|
Adds support for LLVM [SafeStack] which provides backward edge control
flow protection by separating the stack into two parts: data which is
only accessed in provable safe ways is allocated on the normal stack
(the "safe stack") and all other data is placed in a separate allocation
(the "unsafe stack").
SafeStack support is enabled by passing `-Zsanitizer=safestack`.
[SafeStack]: https://clang.llvm.org/docs/SafeStack.html
|