-
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 11 pull requests #81406
Rollup of 11 pull requests #81406
Commits on Jan 10, 2021
-
Add
unwrap_unchecked()
methods forOption
andResult
In particular: - `unwrap_unchecked()` for `Option`. - `unwrap_unchecked()` and `unwrap_err_unchecked()` for `Result`. These complement other `*_unchecked()` methods in `core` etc. Currently there are a couple of places it may be used inside rustc (`LinkedList`, `BTree`). It is also easy to find other repositories with similar functionality. Fixes rust-lang#48278. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Configuration menu - View commit details
-
Copy full SHA for 679f6f3 - Browse repository at this point
Copy the full SHA 679f6f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 76299b3 - Browse repository at this point
Copy the full SHA 76299b3View 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 def0e9b - Browse repository at this point
Copy the full SHA def0e9bView commit details -
Move test to
src/test/ui/consts/
Apparently `tidy` has a hard limit of 2830 tests in the `src/test/ui/issues/` directory, and this test hit that limit. `src/test/ui/consts/` is probably a better location anyway.
Configuration menu - View commit details
-
Copy full SHA for a7b7a43 - Browse repository at this point
Copy the full SHA a7b7a43View 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
-
Make
-Z time-passes
less noisy- Add the module name to `pre_AST_expansion_passes` and don't make it a verbose event (since it normally doesn't take very long, and it's emitted many times) - Don't make the following rustdoc events verbose; they're emitted many times. + build_extern_trait_impl + build_local_trait_impl + build_primitive_trait_impl + get_auto_trait_impls + get_blanket_trait_impls - Remove `get_auto_trait_and_blanket_synthetic_impls`; it's wholly covered by get_{auto,blanket}_trait_impls and not very useful.
Configuration menu - View commit details
-
Copy full SHA for 3b8f1b7 - Browse repository at this point
Copy the full SHA 3b8f1b7View commit details
Commits on Jan 24, 2021
-
Fix spelling in documentation for error E0207
I have trouble parsing the the wording "type parameter parameter".
Configuration menu - View commit details
-
Copy full SHA for 1d03648 - Browse repository at this point
Copy the full SHA 1d03648View commit details
Commits on Jan 25, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 2be1993 - Browse repository at this point
Copy the full SHA 2be1993View commit details -
rustc_codegen_ssa: use wall time for codegen_to_LLVM_IR time-passes e…
…ntry Use elapsed wall time spent on codegen_to_LLVM_IR for all CGUs as a whole, rather than the sum for each CGU (the distinction matters for parallel builds, where some CGUs are processed in parallel).
Configuration menu - View commit details
-
Copy full SHA for 59195a2 - Browse repository at this point
Copy the full SHA 59195a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 088c89d - Browse repository at this point
Copy the full SHA 088c89dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 042facb - Browse repository at this point
Copy the full SHA 042facbView commit details -
Link the reference about undefined behavior
Suggested-by: Mara Bos <m-ou.se@m-ou.se> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Configuration menu - View commit details
-
Copy full SHA for 0140dac - Browse repository at this point
Copy the full SHA 0140dacView commit details -
Configuration menu - View commit details
-
Copy full SHA for 01250fc - Browse repository at this point
Copy the full SHA 01250fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c0a52d - Browse repository at this point
Copy the full SHA 1c0a52dView 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 b8852d4 - Browse repository at this point
Copy the full SHA b8852d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for fdd592a - Browse repository at this point
Copy the full SHA fdd592aView commit details
Commits on Jan 26, 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 4ace4e6 - Browse repository at this point
Copy the full SHA 4ace4e6View commit details -
Rollup merge of rust-lang#80876 - ojeda:option-result-unwrap_unchecke…
…d, r=m-ou-se Add `unwrap_unchecked()` methods for `Option` and `Result` In particular: - `unwrap_unchecked()` for `Option`. - `unwrap_unchecked()` and `unwrap_err_unchecked()` for `Result`. These complement other `*_unchecked()` methods in `core` etc. Currently there are a couple of places it may be used inside rustc (`LinkedList`, `BTree`). It is also easy to find other repositories with similar functionality. Fixes rust-lang#48278.
Configuration menu - View commit details
-
Copy full SHA for 544c07b - Browse repository at this point
Copy the full SHA 544c07bView commit details -
Rollup merge of rust-lang#80900 - camelid:readpointerasbytes-ice, r=o…
…li-obk Fix ICE with `ReadPointerAsBytes` validation error Fixes rust-lang#79690. r? `````@oli-obk`````
Configuration menu - View commit details
-
Copy full SHA for 541a73f - Browse repository at this point
Copy the full SHA 541a73fView 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 5e28acc - Browse repository at this point
Copy the full SHA 5e28accView commit details -
Rollup merge of rust-lang#81195 - estebank:suggest-bound-on-trait-wit…
…h-params, r=oli-obk Account for generics when suggesting bound Fix rust-lang#81175.
Configuration menu - View commit details
-
Copy full SHA for b78f52d - Browse repository at this point
Copy the full SHA b78f52dView commit details -
Rollup merge of rust-lang#81284 - jyn514:impl-times, r=wesleywiser
Make `-Z time-passes` less noisy - Add the module name to `pre_AST_expansion_passes` and don't make it a verbose event (since it normally doesn't take very long, and it's emitted many times) - Don't make the following rustdoc events verbose; they're emitted many times. + build_extern_trait_impl + build_local_trait_impl + build_primitive_trait_impl + get_auto_trait_impls + get_blanket_trait_impls - Remove the `get_auto_trait_and_blanket_synthetic_impls` rustdoc event; it's wholly covered by get_{auto,blanket}_trait_impls and not very useful. I found this while working on rust-lang#81275 but it's independent of those changes.
Configuration menu - View commit details
-
Copy full SHA for 76f4a04 - Browse repository at this point
Copy the full SHA 76f4a04View commit details -
Rollup merge of rust-lang#81299 - GuillaumeGomez:fix-eslint-detected-…
…bugs, r=Nemo157 Fix some bugs reported by eslint Simply went into `src/librustdoc/html/static/` and ran `eslint *.js` in case you want to reproduce. :) r? `````@Nemo157`````
Configuration menu - View commit details
-
Copy full SHA for 796bd53 - Browse repository at this point
Copy the full SHA 796bd53View commit details -
Rollup merge of rust-lang#81353 - jockbert:spelling_in_e0207, r=petro…
…chenkov Fix spelling in documentation for error E0207 I have trouble parsing the the wording "type parameter parameter".
Configuration menu - View commit details
-
Copy full SHA for da955bc - Browse repository at this point
Copy the full SHA da955bcView commit details -
Rollup merge of rust-lang#81369 - tgnottingham:codegen-to-llvm-ir-wal…
…l-time, r=lcnr rustc_codegen_ssa: use wall time for codegen_to_LLVM_IR time-passes entry Use elapsed wall time spent on codegen_to_LLVM_IR for all CGUs as a whole, rather than the sum for each CGU (the distinction matters for parallel builds, where some CGUs are processed in parallel).
Configuration menu - View commit details
-
Copy full SHA for 766afeb - Browse repository at this point
Copy the full SHA 766afebView commit details -
Rollup merge of rust-lang#81389 - ehuss:rustdoc-cmark-extensions, r=G…
…uillaumeGomez rustdoc: Document CommonMark extensions. This updates the rustdoc book to include some documentation on the CommonMark extensions that rustdoc supports.
Configuration menu - View commit details
-
Copy full SHA for 07ade39 - Browse repository at this point
Copy the full SHA 07ade39View commit details -
Rollup merge of rust-lang#81399 - ehuss:update-books, r=ehuss
Update books ## nomicon 7 commits in a8584998eacdea7106a1dfafcbf6c1c06fcdf925..bbf06ad39d1f45654047e9596b750cc6e6d1b693 2021-01-06 12:49:49 -0500 to 2021-01-22 07:07:31 -0800 - Fix alloc link in exotic-sizes for local docs (rust-lang/nomicon#255) - Remove TODO - Fix small punctuation error - Arc revisions (Clone atomic explanation) (pt2/3(+?)) - Fix Arc Clone - Arc revisions (pt1/2(+?)) - Simple Arc implementation (without Weak refs) ## reference 5 commits in 50af691f838937c300b47812d0507c6d88c14f97..f02b09eb6e8af340ad1256a54adb7aae2ff3163e 2021-01-12 21:19:20 -0800 to 2021-01-22 01:53:02 -0800 - Fix missing space (rust-lang/reference#941) - Start documenting name resolution. (rust-lang/reference#937) - Fix plural and delete spurious words in comparison ops (rust-lang/reference#932) - Document execution order (rust-lang/reference#888) - Compound operator expressions (rust-lang/reference#915) ## book 3 commits in ac57a0ddd23d173b26731ccf939f3ba729753275..e724bd826580ff95df48a8533af7dec1080693d4 2021-01-09 14:18:45 -0500 to 2021-01-20 08:19:49 -0600 - Fixes rust-lang/book#2417. Get the index from user input instead of a const. (rust-lang/book#2566) - Turn off the playground in a bunch more lib.rs inclusions (rust-lang/book#2569) - Merge pull request rust-lang/book#2567 from rust-lang/rust-1.49 ## rust-by-example 1 commits in 03e23af01f0b4f83a3a513da280e1ca92587f2ec..f633769acef68574427a6fae6c06f13bc2199573 2021-01-09 10:20:28 -0300 to 2021-01-13 20:58:25 -0300 - Fixed styling on closure example (rust-lang/rust-by-example#1405)
Configuration menu - View commit details
-
Copy full SHA for 554f8c3 - Browse repository at this point
Copy the full SHA 554f8c3View commit details