-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 10 pull requests #81493
Rollup of 10 pull requests #81493
Commits on Dec 20, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 8553aee - Browse repository at this point
Copy the full SHA 8553aeeView commit details
Commits on Jan 18, 2021
-
Reset LateContext enclosing body in nested items
Prevents LateContext::maybe_typeck_results() from returning data in a nested item without a body. Consequently, LateContext::qpath_res is less likely to ICE when called in a nested item. Would have prevented rust-lang/rust-clippy#4545, presumably.
Configuration menu - View commit details
-
Copy full SHA for 63a1eee - Browse repository at this point
Copy the full SHA 63a1eeeView commit details -
Query for TypeckResults in LateContext::qpath_res
Actually fulfills the documented guarantees.
Configuration menu - View commit details
-
Copy full SHA for 21fb586 - Browse repository at this point
Copy the full SHA 21fb586View commit details -
Configuration menu - View commit details
-
Copy full SHA for eaba3da - Browse repository at this point
Copy the full SHA eaba3daView commit details
Commits on Jan 23, 2021
-
Configuration menu - View commit details
-
Copy full SHA for f241c10 - Browse repository at this point
Copy the full SHA f241c10View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5aa625b - Browse repository at this point
Copy the full SHA 5aa625bView commit details
Commits on Jan 24, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 48f9dbf - Browse repository at this point
Copy the full SHA 48f9dbfView commit details
Commits on Jan 25, 2021
-
Point to span of upvar making closure FnMut
Add expected error Add comment Tweak comment wording Fix after rebase to updated master Fix after rebase to updated master Distinguish mutation in normal and move closures Tweak error message Fix error message for nested closures Refactor code showing mutated upvar in closure Remove debug assert B
Configuration menu - View commit details
-
Copy full SHA for 26b4baf - Browse repository at this point
Copy the full SHA 26b4bafView commit details
Commits on Jan 27, 2021
-
Configuration menu - View commit details
-
Copy full SHA for c689b97 - Browse repository at this point
Copy the full SHA c689b97View commit details -
Configuration menu - View commit details
-
Copy full SHA for 428bc14 - Browse repository at this point
Copy the full SHA 428bc14View commit details -
Configuration menu - View commit details
-
Copy full SHA for 28f6cab - Browse repository at this point
Copy the full SHA 28f6cabView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c28069 - Browse repository at this point
Copy the full SHA 3c28069View commit details -
Configuration menu - View commit details
-
Copy full SHA for cca4eea - Browse repository at this point
Copy the full SHA cca4eeaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3076e25 - Browse repository at this point
Copy the full SHA 3076e25View commit details -
Configuration menu - View commit details
-
Copy full SHA for 67b78a0 - Browse repository at this point
Copy the full SHA 67b78a0View commit details
Commits on Jan 28, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 74f26a1 - Browse repository at this point
Copy the full SHA 74f26a1View commit details -
rustdoc: Render HRTB correctly for bare functions
The angle brackets were not rendered, so code like this: some_func: for<'a> fn(val: &'a i32) -> i32 would be rendered as: some_func: fn'a(val: &'a i32) -> i32 However, rendering with angle brackets is still invalid syntax: some_func: fn<'a>(val: &'a i32) -> i32 so now it renders correctly as: some_func: for<'a> fn(val: &'a i32) -> i32 ----- However, note that this code: some_trait: dyn for<'a> Trait<'a> will still render as: some_trait: dyn Trait<'a> which is not invalid syntax, but is still unclear. Unfortunately I think it's hard to fix that case because there isn't enough information in the `rustdoc::clean::Type` that this code operates on. Perhaps that case can be fixed in a later PR.
Configuration menu - View commit details
-
Copy full SHA for cd8dcee - Browse repository at this point
Copy the full SHA cd8dceeView commit details -
Add
SEMICOLON_IN_EXPRESSIONS_FROM_MACROS
lintcc rust-lang#79813 This PR adds an allow-by-default future-compatibility lint `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS`. It fires when a trailing semicolon in a macro body is ignored due to the macro being used in expression position: ```rust macro_rules! foo { () => { true; // WARN } } fn main() { let val = match true { true => false, _ => foo!() }; } ``` The lint takes its level from the macro call site, and can be allowed for a particular macro by adding `#[allow(semicolon_in_expressions_from_macros)]`. The lint is set to warn for all internal rustc crates (when being built by a stage1 compiler). After the next beta bump, we can enable the lint for the bootstrap compiler as well.
Configuration menu - View commit details
-
Copy full SHA for f902551 - Browse repository at this point
Copy the full SHA f902551View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3aa8456 - Browse repository at this point
Copy the full SHA 3aa8456View commit details -
rustc: Stabilize
-Zrun-dsymutil
as-Csplit-debuginfo
This commit adds a new stable codegen option to rustc, `-Csplit-debuginfo`. The old `-Zrun-dsymutil` flag is deleted and now subsumed by this stable flag. Additionally `-Zsplit-dwarf` is also subsumed by this flag but still requires `-Zunstable-options` to actually activate. The `-Csplit-debuginfo` flag takes one of three values: * `off` - This indicates that split-debuginfo from the final artifact is not desired. This is not supported on Windows and is the default on Unix platforms except macOS. On macOS this means that `dsymutil` is not executed. * `packed` - This means that debuginfo is desired in one location separate from the main executable. This is the default on Windows (`*.pdb`) and macOS (`*.dSYM`). On other Unix platforms this subsumes `-Zsplit-dwarf=single` and produces a `*.dwp` file. * `unpacked` - This means that debuginfo will be roughly equivalent to object files, meaning that it's throughout the build directory rather than in one location (often the fastest for local development). This is not the default on any platform and is not supported on Windows. Each target can indicate its own default preference for how debuginfo is handled. Almost all platforms default to `off` except for Windows and macOS which default to `packed` for historical reasons. Some equivalencies for previous unstable flags with the new flags are: * `-Zrun-dsymutil=yes` -> `-Csplit-debuginfo=packed` * `-Zrun-dsymutil=no` -> `-Csplit-debuginfo=unpacked` * `-Zsplit-dwarf=single` -> `-Csplit-debuginfo=packed` * `-Zsplit-dwarf=split` -> `-Csplit-debuginfo=unpacked` Note that `-Csplit-debuginfo` still requires `-Zunstable-options` for non-macOS platforms since split-dwarf support was *just* implemented in rustc. There's some more rationale listed on rust-lang#79361, but the main gist of the motivation for this commit is that `dsymutil` can take quite a long time to execute in debug builds and provides little benefit. This means that incremental compile times appear that much worse on macOS because the compiler is constantly running `dsymutil` over every single binary it produces during `cargo build` (even build scripts!). Ideally rustc would switch to not running `dsymutil` by default, but that's a problem left to get tackled another day. Closes rust-lang#79361
Configuration menu - View commit details
-
Copy full SHA for a124043 - Browse repository at this point
Copy the full SHA a124043View commit details
Commits on Jan 29, 2021
-
Rollup merge of rust-lang#79570 - alexcrichton:split-debuginfo, r=bjorn3
rustc: Stabilize `-Zrun-dsymutil` as `-Csplit-debuginfo` This commit adds a new stable codegen option to rustc, `-Csplit-debuginfo`. The old `-Zrun-dsymutil` flag is deleted and now subsumed by this stable flag. Additionally `-Zsplit-dwarf` is also subsumed by this flag but still requires `-Zunstable-options` to actually activate. The `-Csplit-debuginfo` flag takes one of three values: * `off` - This indicates that split-debuginfo from the final artifact is not desired. This is not supported on Windows and is the default on Unix platforms except macOS. On macOS this means that `dsymutil` is not executed. * `packed` - This means that debuginfo is desired in one location separate from the main executable. This is the default on Windows (`*.pdb`) and macOS (`*.dSYM`). On other Unix platforms this subsumes `-Zsplit-dwarf=single` and produces a `*.dwp` file. * `unpacked` - This means that debuginfo will be roughly equivalent to object files, meaning that it's throughout the build directory rather than in one location (often the fastest for local development). This is not the default on any platform and is not supported on Windows. Each target can indicate its own default preference for how debuginfo is handled. Almost all platforms default to `off` except for Windows and macOS which default to `packed` for historical reasons. Some equivalencies for previous unstable flags with the new flags are: * `-Zrun-dsymutil=yes` -> `-Csplit-debuginfo=packed` * `-Zrun-dsymutil=no` -> `-Csplit-debuginfo=unpacked` * `-Zsplit-dwarf=single` -> `-Csplit-debuginfo=packed` * `-Zsplit-dwarf=split` -> `-Csplit-debuginfo=unpacked` Note that `-Csplit-debuginfo` still requires `-Zunstable-options` for non-macOS platforms since split-dwarf support was *just* implemented in rustc. There's some more rationale listed on rust-lang#79361, but the main gist of the motivation for this commit is that `dsymutil` can take quite a long time to execute in debug builds and provides little benefit. This means that incremental compile times appear that much worse on macOS because the compiler is constantly running `dsymutil` over every single binary it produces during `cargo build` (even build scripts!). Ideally rustc would switch to not running `dsymutil` by default, but that's a problem left to get tackled another day. Closes rust-lang#79361
Configuration menu - View commit details
-
Copy full SHA for d9e56f4 - Browse repository at this point
Copy the full SHA d9e56f4View commit details -
Rollup merge of rust-lang#79819 - Aaron1011:feature/macro-trailing-se…
…micolon, r=petrochenkov Add `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` lint cc rust-lang#79813 This PR adds an allow-by-default future-compatibility lint `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS`. It fires when a trailing semicolon in a macro body is ignored due to the macro being used in expression position: ```rust macro_rules! foo { () => { true; // WARN } } fn main() { let val = match true { true => false, _ => foo!() }; } ``` The lint takes its level from the macro call site, and can be allowed for a particular macro by adding `#[allow(macro_trailing_semicolon)]`. The lint is set to warn for all internal rustc crates (when being built by a stage1 compiler). After the next beta bump, we can enable the lint for the bootstrap compiler as well.
Configuration menu - View commit details
-
Copy full SHA for 4003a73 - Browse repository at this point
Copy the full SHA 4003a73View commit details -
Rollup merge of rust-lang#79991 - camelid:rustdoc-for-lifetime, r=Gui…
…llaumeGomez,jyn514 rustdoc: Render HRTB correctly for bare functions The angle brackets were not rendered, so code like this: some_func: for<'a> fn(val: &'a i32) -> i32 would be rendered as: some_func: fn'a(val: &'a i32) -> i32 However, rendering with angle brackets is still invalid syntax: some_func: fn<'a>(val: &'a i32) -> i32 so now it renders correctly as: some_func: for<'a> fn(val: &'a i32) -> i32 ----- However, note that this code: some_trait: dyn for<'a> Trait<'a> will still render as: some_trait: dyn Trait<'a> which is not invalid syntax, but is still unclear. Unfortunately I think it's hard to fix that case because there isn't enough information in the `rustdoc::clean::Type` that this code operates on. Perhaps that case can be fixed in a later PR. r? ``@jyn514``
Configuration menu - View commit details
-
Copy full SHA for 3eac643 - Browse repository at this point
Copy the full SHA 3eac643View commit details -
Rollup merge of rust-lang#80215 - visigoth:issue-80202-fix, r=estebank
Use -target when linking binaries for Mac Catalyst When running `rustc` with `-target x86_64-apple-ios-macabi`, the linker eventually gets run with `-arch x86_64`, because the linker back end splits the LLVM target triple and uses the first token as the target architecture. However, this does not work for the Mac Catalyst ABI, which is a separate target from Darwin. Specifying the full target triple with `-target` allows Mac Catalyst binaries to link and run. closes rust-lang#80202
Configuration menu - View commit details
-
Copy full SHA for a3c060c - Browse repository at this point
Copy the full SHA a3c060cView commit details -
Rollup merge of rust-lang#81158 - 1000teslas:issue-80313-fix, r=Aaron…
…1011 Point to span of upvar making closure FnMut For rust-lang#80313.
Configuration menu - View commit details
-
Copy full SHA for 4283623 - Browse repository at this point
Copy the full SHA 4283623View commit details -
Rollup merge of rust-lang#81176 - camsteffen:qpath-res, r=oli-obk
Improve safety of `LateContext::qpath_res` This is my first rustc code change, inspired by hacking on clippy! The first change is to clear cached `TypeckResults` from `LateContext` when visiting a nested item. I took a hint from [here](https://github.com/rust-lang/rust/blob/5e91c4ecc09312d8b63d250a432b0f3ef83f1df7/compiler/rustc_privacy/src/lib.rs#L1300). Clippy has a `qpath_res` util function to avoid a possible ICE in `LateContext::qpath_res`. But the docs of `LateContext::qpath_res` promise no ICE. So this updates the `LateContext` method to keep its promises, and removes the util function. Related: rust-lang/rust-clippy#4545 CC ````````````@eddyb```````````` since you've done related work CC ````````````@flip1995```````````` FYI
Configuration menu - View commit details
-
Copy full SHA for 0c5fcce - Browse repository at this point
Copy the full SHA 0c5fcceView commit details -
Rollup merge of rust-lang#81287 - CraftSpider:json-crate, r=jyn514,Gu…
…illaumeGomez Split rustdoc JSON types into separately versioned crate For now just an in-tree change. In the future, this may be exposed as a standalone crate with standard semver.
Configuration menu - View commit details
-
Copy full SHA for 788036d - Browse repository at this point
Copy the full SHA 788036dView commit details -
Rollup merge of rust-lang#81306 - SkiFire13:fuse-flatten, r=cuviper
Fuse inner iterator in FlattenCompat and improve related tests Fixes rust-lang#81248
Configuration menu - View commit details
-
Copy full SHA for 94e093a - Browse repository at this point
Copy the full SHA 94e093aView commit details -
Rollup merge of rust-lang#81333 - RalfJung:const-err-simplify, r=oli-obk
clean up some const error reporting around promoteds These are some error reporting simplifications enabled by rust-lang#80579. Further simplifications are possible but could be blocked on making `const_err` a hard error. r? ``````@oli-obk``````
Configuration menu - View commit details
-
Copy full SHA for 046a414 - Browse repository at this point
Copy the full SHA 046a414View commit details -
Rollup merge of rust-lang#81459 - probablykasper:text-selection-fix, …
…r=Nemo157 Fix rustdoc text selection for page titles Fixes text selection of page titles by placing the `h1.fqn span.in-band` element before `h1.fqn span.out-of-band`. Before vs after: https://user-images.githubusercontent.com/11315492/105768203-55708700-5f5c-11eb-924b-4e7527ffe147.mp4 Retry of PR rust-lang#81397 due to merge conflicts confusing me. Recreated the same changes as in that PR, but now when I run `./x.py doc library/std`, no changes I make to `src/librustdoc/html/render/mod.rs` to the file are reflected in the built doc files, even if I delete the `build` folder. I'm guessing there's some cache I'm missing? r? `@Nemo157`
Configuration menu - View commit details
-
Copy full SHA for 2b4fa3d - Browse repository at this point
Copy the full SHA 2b4fa3dView commit details