- 29 1月, 2022 1 次提交
-
-
由 woppopo 提交于
-
- 28 1月, 2022 1 次提交
-
-
由 woppopo 提交于
-
- 26 1月, 2022 1 次提交
-
-
由 woppopo 提交于
`const_allocate`: Returns a null pointer at runtime.
-
- 23 1月, 2022 3 次提交
-
-
由 woppopo 提交于
-
由 bors 提交于
Update hashbrown to 0.12.0 [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md#v0120---2022-01-17)
-
由 bors 提交于
Rollup of 9 pull requests Successful merges: - #85967 (add support for the l4-bender linker on the x86_64-unknown-l4re-uclibc tier 3 target) - #92828 (Print a helpful message if unwinding aborts when it reaches a nounwind function) - #93012 (Update pulldown-cmark version to fix markdown list issue) - #93116 (Simplify use of `map_or`) - #93132 (Increase the format version of rustdoc-json-types) - #93147 (Interner cleanups) - #93153 (Reject unsupported naked functions) - #93170 (Add missing GUI test explanations) - #93172 (rustdoc: remove dashed underline under main heading) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
- 22 1月, 2022 27 次提交
-
-
由 Matthias Krüger 提交于
rustdoc: remove dashed underline under main heading This was removed in #92797 but accidentally re-introduced by a bad merge in #92861. r? ```@camelid```
-
由 Matthias Krüger 提交于
Add missing GUI test explanations Some GUI tests didn't have a global explanation about what they were testing. This fixes it. r? ```@jsha```
-
由 Matthias Krüger 提交于
Reject unsupported naked functions Transition unsupported naked functions future incompatibility lint into an error: * Naked functions must contain a single inline assembly block. Introduced as future incompatibility lint in 1.50 #79653. Change into an error fixes a soundness issue described in #32489. * Naked functions must not use any forms of inline attribute. Introduced as future incompatibility lint in 1.56 #87652. Closes #32490. Closes #32489. r? ```@Amanieu``` ```@npmccallum``` ```@joshtriplett```
-
由 Matthias Krüger 提交于
Interner cleanups Improve some code that I have found confusing. r? ```@lcnr```
-
由 Matthias Krüger 提交于
Increase the format version of rustdoc-json-types PR https://github.com/rust-lang/rust/pull/87648 changed `rustdoc-json-types` without increasing the format version. https://github.com/rust-lang/rust/commit/e7529d6a3867ed1692818702b40814ee992eba2d#diff-ede26372490522288745c5b3df2b6b2a1cc913dcd09b29af3a49935afe00c7e6 This PR increase the format version by +1 and move the `FORMAT_VERSION` constant to the start of the file to hopefully make it more clear that `rustdoc-json-types` is versioned.
-
由 Matthias Krüger 提交于
Simplify use of `map_or`
-
由 Matthias Krüger 提交于
Update pulldown-cmark version to fix markdown list issue Fixes #92971. r? ```@camelid```
-
由 Matthias Krüger 提交于
Print a helpful message if unwinding aborts when it reaches a nounwind function This is implemented by routing `TerminatorKind::Abort` back through the panic handler, but with a special flag in the `PanicInfo` which indicates that the panic handler should *not* attempt to unwind the stack and should instead abort immediately. This is useful for the planned change in https://github.com/rust-lang/lang-team/issues/97 which would make `Drop` impls `nounwind` by default. ### Code ```rust #![feature(c_unwind)] fn panic() { panic!() } extern "C" fn nounwind() { panic(); } fn main() { nounwind(); } ``` ### Before ``` $ ./test thread 'main' panicked at 'explicit panic', test.rs:4:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Illegal instruction (core dumped) ``` ### After ``` $ ./test thread 'main' panicked at 'explicit panic', test.rs:4:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace thread 'main' panicked at 'panic in a function that cannot unwind', test.rs:7:1 stack backtrace: 0: 0x556f8f86ec9b - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hdccefe11a6ac4396 1: 0x556f8f88ac6c - core::fmt::write::he152b28c41466ebb 2: 0x556f8f85d6e2 - std::io::Write::write_fmt::h0c261480ab86f3d3 3: 0x556f8f8654fa - std::panicking::default_hook::{{closure}}::h5d7346f3ff7f6c1b 4: 0x556f8f86512b - std::panicking::default_hook::hd85803a1376cac7f 5: 0x556f8f865a91 - std::panicking::rust_panic_with_hook::h4dc1c5a3036257ac 6: 0x556f8f86f079 - std::panicking::begin_panic_handler::{{closure}}::hdda1d83c7a9d34d2 7: 0x556f8f86edc4 - std::sys_common::backtrace::__rust_end_short_backtrace::h5b70ed0cce71e95f 8: 0x556f8f865592 - rust_begin_unwind 9: 0x556f8f85a764 - core::panicking::panic_no_unwind::h2606ab3d78c87899 10: 0x556f8f85b910 - test::nounwind::hade6c7ee65050347 11: 0x556f8f85b936 - test::main::hdc6e02cb36343525 12: 0x556f8f85b7e3 - core::ops::function::FnOnce::call_once::h4d02663acfc7597f 13: 0x556f8f85b739 - std::sys_common::backtrace::__rust_begin_short_backtrace::h071d40135adb0101 14: 0x556f8f85c149 - std::rt::lang_start::{{closure}}::h70dbfbf38b685e93 15: 0x556f8f85c791 - std::rt::lang_start_internal::h798f1c0268d525aa 16: 0x556f8f85c131 - std::rt::lang_start::h476a7ee0a0bb663f 17: 0x556f8f85b963 - main 18: 0x7f64c0822b25 - __libc_start_main 19: 0x556f8f85ae8e - _start 20: 0x0 - <unknown> thread panicked while panicking. aborting. Aborted (core dumped) ```
-
由 Matthias Krüger 提交于
add support for the l4-bender linker on the x86_64-unknown-l4re-uclibc tier 3 target This PR contains the work by ```@humenda``` to update support for the `x86_64-unknown-l4re-uclibc` tier 3 target (published at [humenda/rust](https://github.com/humenda/rust)), rebased and adapted to current rust in follow up commits by myself. The publishing of the rebased changes is authorized and preferred by the original author. As the goal was to distort the original work as little as possible, individual commits introduce changes that are incompatible to the newer code base that the changes were rebased on. These incompatibilities have been remedied in follow up commits, so that the PR as a whole should result in a clean update of the target. If you prefer another strategy to mainline these changes while preserving attribution, please let me know.
-
由 Amanieu d'Antras 提交于
-
由 bors 提交于
Rollup of 10 pull requests Successful merges: - #91965 (Add more granular `--exclude` in `x.py`) - #92467 (Ensure that early-bound function lifetimes are always 'local') - #92586 (Set the allocation MIN_ALIGN for espidf to 4.) - #92835 (Improve error message for key="value" cfg arguments.) - #92843 (Improve string concatenation suggestion) - #92963 (Implement tuple array diagnostic) - #93046 (Use let_else in even more places) - #93109 (Improve `Arc` and `Rc` documentation) - #93134 (delete `Stdin::split` forwarder) - #93139 (rustdoc: fix overflow-wrap for table layouts) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Matthias Krüger 提交于
rustdoc: fix overflow-wrap for table layouts For all table layouts, set overflow-wrap: break-word. Fixes #93135 Demo: https://rustdoc.crud.net/jsha/fix-wrapped-names/std/intrinsics/index.html#functions (Compare vs https://doc.rust-lang.org/nightly/std/intrinsics/index.html - you may have to make your browser narrower to see the effect) r? `@Nemo157`
-
由 Matthias Krüger 提交于
delete `Stdin::split` forwarder Part of #87096. Delete the `Stdin::split` forwarder because it's seen as too niche to expose at this level. `@rustbot` label T-libs-api A-io
-
由 Matthias Krüger 提交于
Improve `Arc` and `Rc` documentation This makes two changes (I can split the PR if necessary, but the changes are pretty small): 1. A bunch of trait implementations claimed to be zero cost; however, they use the `Arc<T>: From<Box<T>>` impl which is definitely not free, especially for large dynamically sized `T`. 2. The code in deferred initialization examples unnecessarily used excessive amounts of `unsafe`. This has been reduced.
-
由 Matthias Krüger 提交于
Use let_else in even more places Followup of #89933, #91018, #91481.
-
由 Matthias Krüger 提交于
Implement tuple array diagnostic Fixes https://github.com/rust-lang/rust/issues/92089
-
由 Matthias Krüger 提交于
Improve string concatenation suggestion Before: error[E0369]: cannot add `&str` to `&str` --> file.rs:2:22 | 2 | let _x = "hello" + " world"; | ------- ^ -------- &str | | | | | `+` cannot be used to concatenate two `&str` strings | &str | help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | 2 | let _x = "hello".to_owned() + " world"; | ~~~~~~~~~~~~~~~~~~ After: error[E0369]: cannot add `&str` to `&str` --> file.rs:2:22 | 2 | let _x = "hello" + " world"; | ------- ^ -------- &str | | | | | `+` cannot be used to concatenate two `&str` strings | &str | = note: string concatenation requires an owned `String` on the left help: create an owned `String` from a string reference | 2 | let _x = "hello".to_owned() + " world"; | +++++++++++
-
由 Matthias Krüger 提交于
Improve error message for key="value" cfg arguments. Hi, I ran into difficulties using the `--cfg` flag syntax, first hit when googling for the error was issue https://github.com/rust-lang/rust/issues/66450. Reading that issue, it sounded like the best way to improve the experience was to improve the error message, this is low risk and doesn't introduce any additional argument parsing. The issue mentions that it is entirely dependent on the shell, while this may be true, I think guiding the the user into the realization that the quotes may need to be escaped is helpful. The two suggested escapings both work in Bash and in the Windows command prompt. fyi `@ehuss`
-
由 Matthias Krüger 提交于
Set the allocation MIN_ALIGN for espidf to 4. Closes https://github.com/esp-rs/rust/issues/99. cc: `@ivmarkov`
-
由 Matthias Krüger 提交于
Ensure that early-bound function lifetimes are always 'local' During borrowchecking, we treat any free (early-bound) regions on the 'defining type' as `RegionClassification::External`. According to the doc comments, we should only have 'external' regions when checking a closure/generator. However, a plain function can also have some if its regions be considered 'early bound' - this occurs when the region is constrained by an argument, appears in a `where` clause, or in an opaque type. This was causing us to incorrectly mark these regions as 'external', which caused some diagnostic code to act as if we were referring to a 'parent' region from inside a closure. This PR marks all instantiated region variables as 'local' when we're borrow-checking something other than a closure/generator/inline-const.
-
由 Matthias Krüger 提交于
Add more granular `--exclude` in `x.py` x.py has support for excluding some steps from the current invocation, but unfortunately that's not granular enough: some steps have the same name in different modules, and that prevents excluding only *some* of them. As a practical example, let's say you need to run everything in `./x.py test` except for the standard library tests, as those tests require IPv6 and need to be executed on a separate machine. Before this commit, if you were to just run this: ./x.py test --exclude library/std ...the invocation would eventually fail, as that would not only exclude running the tests for the standard library (`library/std` in the `test` module), it would also exclude generating its documentation (`library/std` in the `doc` module), breaking linkchecker. This commit adds support to the `--exclude` flag for prefixing paths with the name of the module their step is defined in, allowing the user to choose which module to exclude from: ./x.py test --exclude test::library/std This maintains backward compatibility with existing invocations, while allowing more ganular exclusion. Examples of the behavior: | `--exclude` | Docs | Tests | | ------------------- | ------- | ------- | | `library/std` | Skipped | Skipped | | `doc::library/std` | Skipped | Run | | `test::library/std` | Run | Skipped | Note that this PR only changes the `--exclude` flag, and not in other `x.py` arguments or flags yet. In the implementation I tried to limit the impact this would have with rustbuild as a whole as much as possible. The module name is extracted from the step by parsing the result of `std::any::type_name()`: unfortunately that output can change at any point in time, but IMO it's better than having to annotate all the existing and future `Step` implementations with the module name. I added a test to ensure the parsing works as expected, so hopefully if anyone makes changes to the output of `std::any::type_name()` they'll also notice they have to update rustbuild. r? `@Mark-Simulacrum`
-
由 bors 提交于
Override rustc version in ui and mir-opt tests to get stable hashes Building a dozen separate regexps for each test in compiletest consumes significant amounts of CPU cycles. UI test timings on my machine: OLD: 39.63s NEW: 30.27s
-
由 Jacob Hoffman-Andrews 提交于
-
由 Guillaume Gomez 提交于
-
由 bors 提交于
Update Linux runners to Ubuntu 20.04 r? `@Mark-Simulacrum`
-
由 Amanieu d'Antras 提交于
-
由 Amanieu d'Antras 提交于
-
- 21 1月, 2022 7 次提交
-
-
由 Vadim Petrochenkov 提交于
-
由 Benjamin Lamowski 提交于
- Fix style errors. - L4-bender does not yet support dynamic linking. - Stack unwinding is not yet supported for x86_64-unknown-l4re-uclibc. For now, just abort on panics. - Use GNU-style linker options where possible. As suggested by review: - Use standard GNU-style ld syntax for relro flags. - Use standard GNU-style optimization flags and logic. - Use standard GNU-style ld syntax for --subsystem. - Don't read environment variables in L4Bender linker. Thanks to CARGO_ENCODED_RUSTFLAGS introduced in #9601, l4-bender's arguments can now be passed from the L4Re build system without resorting to custom parsing of environment variables.
-
由 Amanieu d'Antras 提交于
-
由 Sebastian Humenda 提交于
-
由 bors 提交于
Remove a `Span` from `hir::ExprKind::MethodCall` It's just a copy of `MethodCall.0.ident.span`.
-
由 Cameron Steffen 提交于
-
由 bors 提交于
Update some rustc dependencies to deduplicate them This PR updates `rand` and `itertools` in rustc (not the whole workspace) in order to deduplicate them (and hopefully slightly improve compile times). ~~Currently, `object` is still duplicated, but https://github.com/rust-lang/thorin/pull/15 and updating `thorin` in the future will remove the use of version 0.27.~~ Update: Thorin 0.2 has now been released, and this PR updates `rustc_codegen_ssa` to use it and deduplicate the `object` crate. There's a final tiny rustc dependency, `cfg-if`, which will be left: as both versions 0.1.x and 1.0 looked to be heavily depended on, they will require a few cascading updates to be removed.
-