-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 36 pull requests #40418
Closed
Closed
Rollup of 36 pull requests #40418
Conversation
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
Some annotations like the "test" annotations might be of interest for other projects, especially rls. Export all attributes in a new attributes item.
Remove the AST structure
This is all in rustbuild already.
This is all not used any more
All of these should be handled by rustbuild in sanity.rs right now.
All of this should already be vendored in rustbuild if necessary or otherwise it's just not used.
This is not used any more
None of this is used by rustbuild any more
This commit removes detection of CFG_OSTYPE and CFG_CPUTYPE from the configure script, which means that the default value of `--build` is no longer present in the configure script. All this logic is now available in rustbuild itself, so there's no need to duplicate it.
In recent months there have been a few different people investigating how to make a plugin that registers a MIR-pass – one that isn’t intended to be eventually merged into rustc proper. The interface to register MIR passes was added primarily for miri (& later was found to make prototyping of rustc-proper MIR passes a tiny bit faster). Since miri does not use this interface anymore it seems like a good time to remove this "feature". For prototyping purposes a similar interface can be added by developers themselves in their custom rustc build.
similar to GCC's __attribute((used))__. This attribute prevents LLVM from optimizing away a non-exported symbol, within a compilation unit (object file), when there are no references to it. This is better explained with an example: ``` #[used] static LIVE: i32 = 0; static REFERENCED: i32 = 0; static DEAD: i32 = 0; fn internal() {} pub fn exported() -> &'static i32 { &REFERENCED } ``` Without optimizations, LLVM pretty much preserves all the static variables and functions within the compilation unit. ``` $ rustc --crate-type=lib --emit=obj symbols.rs && nm -C symbols.o 0000000000000000 t drop::h1be0f8f27a2ba94a 0000000000000000 r symbols::REFERENCED::hb3bdfd46050bc84c 0000000000000000 r symbols::DEAD::hc2ea8f9bd06f380b 0000000000000000 r symbols::LIVE::h0970cf9889edb56e 0000000000000000 T symbols::exported::h6f096c2b1fc292b2 0000000000000000 t symbols::internal::h0ac1aadbc1e3a494 ``` With optimizations, LLVM will drop dead code. Here `internal` is dropped because it's not a exported function/symbol (i.e. not `pub`lic). `DEAD` is dropped for the same reason. `REFERENCED` is preserved, even though it's not exported, because it's referenced by the `exported` function. Finally, `LIVE` survives because of the `#[used]` attribute even though it's not exported or referenced. ``` $ rustc --crate-type=lib -C opt-level=3 --emit=obj symbols.rs && nm -C symbols.o 0000000000000000 r symbols::REFERENCED::hb3bdfd46050bc84c 0000000000000000 r symbols::LIVE::h0970cf9889edb56e 0000000000000000 T symbols::exported::h6f096c2b1fc292b2 ``` Note that the linker knows nothing about `#[used]` and will drop `LIVE` because no other object references to it. ``` $ echo 'fn main() {}' >> symbols.rs $ rustc symbols.rs && nm -C symbols | grep LIVE ``` At this time, `#[used]` only works on `static` variables.
When declaring nested unsafe blocks (`unsafe {unsafe {}}`) that trigger the "unnecessary `unsafe` block" error, point out the enclosing `unsafe block` or `unsafe fn` that makes it unnecessary.
This commit fixes rust-lang#38749 by building documentation for the `proc_macro` crate by default for configured hosts. Unfortunately did not turn out to be a trivial fix. Currently rustbuild generates documentation into multiple locations: one for std, one for test, and one for rustc. The initial fix for this issue simply actually executed `cargo doc -p proc_macro` which was otherwise completely elided before. Unfortunately rustbuild was the left to merge two documentation trees together. One for the standard library and one for the rustc tree (which only had docs for the `proc_macro` crate). Rustdoc itself knows how to merge documentation files (specifically around search indexes, etc) but rustbuild was unaware of this, so an initial fix ended up destroying the sidebar and the search bar from the libstd docs. To solve this issue the method of documentation has been tweaked slightly in rustbuild. The build system will not use symlinks (or directory junctions on Windows) to generate all documentation into the same location initially. This'll rely on rustdoc's logic to weave together all the output and ensure that it ends up all consistent. Closes rust-lang#38749
They report their `uname -m` as armv8l rather than aarch64. Patch originally by Matthias Klose <doko@debian.org>
travis: Attempt to debug sccache failures I can't find anything that'd cause unexpected EOF in the source, so let's try taking a look at the error logs on failures.
rustc: Exit quickly on only `--emit dep-info` This commit alters the compiler to exit quickly if the only output being emitted is `dep-info`, which doesn't need a lot of other information to generate. Closes rust-lang#40328
…akis Update syntax for `pub(restricted)` Update the syntax before stabilization. cc rust-lang#32409 r? @nikomatsakis
save-analysis: cope with lack of method data after a type error Fixes rust-lang#39957 r? @eddyb
Fix missing backtick typo Fixes rendering of the end of the `Configure and Make` section.
Improve the LLVM IR we generate for trivial functions, especially #[naked] ones. These two small changes fix edef1c/libfringe#68: * Don't emit ZST allocas, such as when returning `()` * Don't emit a branch from LLVM's entry block to MIR's `START_BLOCK` unless needed * That is, if a loop branches back to it, although I'm not sure that's even valid MIR
Give spans to individual path segments in AST And use these spans in path resolution diagnostics. The spans are spans of identifiers in segments, not whole segments. I'm not sure what spans are more useful in general, but identifier spans are a better fit for resolve errors. HIR still doesn't have spans. Fixes rust-lang#38927 (comment) rust-lang#38890 (comment) r? @nrc @eddyb
Do not bother creating StorageLive for TyNever Keeps MIR cleaner, `StorageLive(_: !)` makes no sense anyway. r? @eddyb
Fix UB in repr(packed) tests r? @arielb1 cc rust-lang#37609 and rust-lang#27060
Box docs: no allocation is done for ZSTs. Updated to add a small bit saying that ZSTs don't actually allocate on `Box::new`.
emit !align attributes on stores of operand pairs This avoids another case of missing-align UB. cc rust-lang#40373 r? @eddyb
…or, r=alexcrichton Distinguish the ways `CStr::from_bytes_with_nul` can fail
Implement placement-in protocol for `VecDeque` CC rust-lang#30172 r? @nagisa
Update gdbr tests gdb will now reliably detect the lanugage as rust even before any code is run.
fix rust-lang#40294 obligation cause.body_id is not always a NodeExpr Hello! This fixes rust-lang#40294 and moves tests related to rust-lang#38812 to a much more sensible directory. Thanks to @nikomatsakis and @eddyb
Some changes occurred in HTML/CSS. |
r? @nrc (rust_highfive has picked a reviewer for you, use r? to override) |
gonna make another |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
proc_macro
#40199, Restore creating the channel-rust-$channel-date.txt files #40225, Remove ability for plugins to register a MIR pass #40239, LLVM: Update submodule to include SRet support patch for MSP430. #40257, Fix emscripten test detection #40259, rustbuild: expose LLVM_PARALLEL_LINK_JOBS #40277, Clean up rustdoc css #40278, Fix incorrect span label formatting #40287, Don't put Cargo into the rustc workspace #40297, first pass at isolating dep-graph tasks #40308, Expect macro defs in save-analysis and add expn info to spans for att… #40311, Allow lints to check Bodys directly #40315, Disallow subtyping between T and U in T: Unsize<U>. #40319, travis: Attempt to debug sccache failures #40324, rustc: Exit quickly on only--emit dep-info
#40336, Update syntax forpub(restricted)
#40340, save-analysis: cope with lack of method data after a type error #40344, Fix missing backtick typo #40345, Improve the LLVM IR we generate for trivial functions, especially #[naked] ones. #40367, Give spans to individual path segments in AST #40369, Do not bother creating StorageLive for TyNever #40372, Fix UB in repr(packed) tests #40373, Box docs: no allocation is done for ZSTs. #40379, emit !align attributes on stores of operand pairs #40385, Distinguish the waysCStr::from_bytes_with_nul
can fail #40386, Implement placement-in protocol forVecDeque
#40389, Update gdbr tests #40400, fix #40294 obligation cause.body_id is not always a NodeExpr #40404ast::ItemKind::MacroDef
, simplify hygiene info #40220, Support armhf abi on 64-bit ARM cpus #40261, rustbuild: Add option for enabling partial LLVM rebuilds #40329, Remove internal liblog #40347