profile
viewpoint

cjgillot/rtti 2

Implementation of multimethods in C++.

cjgillot/cacolac 0

Gyrokinetic linear analysis based on trajectory computation

cjgillot/ChefDep 0

Logiciel pour le suivi du dépannage à la 12F

cjgillot/fipy 0

FiPy is a Finite Volume PDE solver written in Python

cjgillot/fruits 0

Plus de fruits :)

cjgillot/mycas 0

A small symbolic manipulation library inspired from GiNaC.

cjgillot/openfisca-france 0

French tax and benefit system for OpenFisca

cjgillot/rust 0

A safe, concurrent, practical language.

cjgillot/rust-analyzer 0

An experimental Rust compiler front-end for IDEs

cjgillot/salsa 0

A generic framework for on-demand, incrementalized computation. Inspired by adapton, glimmer, and rustc's query system.

delete branch cjgillot/rust

delete branch : remacro

delete time in 2 days

Pull request review commentrust-lang/rust

Replace `DepKind` by trait objects

 impl<'a, 'tcx> Decodable<CacheDecoder<'a, 'tcx>> for &'tcx [Span] { //- ENCODING -------------------------------------------------------------------  /// This trait is a hack to work around specialization bug #55243.-trait OpaqueEncoder: Encoder {+pub trait OpaqueEncoder: Encoder {

This trait is a hack. Ideally, all E: OpaqueEncoder should be E = opaque::Encoder. It needs to be public because it appears in CacheEncoder, which is public because it appears in DepKindTrait. Removing E: OpaqueEncoder from CacheEncoder definition breaks specialization (I don't know why).

cjgillot

comment created time in 2 days

PullRequestReviewEvent

Pull request review commentrust-lang/rust

Replace `DepKind` by trait objects

 rustc_dep_node_append!([define_dep_nodes!][ <'tcx>     [] CompileCodegenUnit(Symbol), ]); +impl DepKindTrait for dep_kind::Null {

Those DepKinds are not associated to queries. This requires a special workaround for force_from_dep_node and try_load_from_on_disk_cache.

cjgillot

comment created time in 2 days

PullRequestReviewEvent

Pull request review commentrust-lang/rust

Replace `DepKind` by trait objects

 macro_rules! define_dep_kinds {                 #[allow(unused_lifetimes)]                 type Key<$tcx> = ($($tuple_arg_ty),*); +                // FIXME: This match is just a workaround for incremental bugs and should+                // be removed. https://github.com/rust-lang/rust/issues/62649 is one such+                // bug that must be fixed before removing this.+                match self.index() {

I agree this was a bad idea.

cjgillot

comment created time in 2 days

PullRequestReviewEvent

push eventcjgillot/rust

Camille GILLOT

commit sha f06e3d96de446dc1e9ac27df1c40e1f7caf4f5f0

Rename macro parameter.

view details

Camille GILLOT

commit sha 42baef9e8ba83040c021d4cd0b3ba6528aea56b6

Move DepNodeExt outside of the macro.

view details

Camille GILLOT

commit sha 41720afcc71bcd3e52ce3910e811b0f8910b6123

Sanitize DEP_KINDS arrays.

view details

push time in 2 days

pull request commentrust-lang/rust

[Draft] Move query definitions into `rustc_query_system`

FWIW, when I created rustc_query_system, I wanted to have the DepGraph parametered by the DepContext, instead of the DepKind. This required to have DepGraph<TyCtxt<'_>> with a lifetime parameter, which caused lifetime variance problems. The read_deps and with_deps functions in DepKind trait are the middle ground I found at the time.

Julian-Wollersberger

comment created time in 3 days

Pull request review commentrust-lang/rust

[Draft] Move query definitions into `rustc_query_system`

 pub fn rustc_queries(input: TokenStream) -> TokenStream {                 }             }         }+        #[macro_export]         macro_rules! rustc_cached_queries {             ($($macro:tt)*) => {                 $($macro)*(#cached_queries);             }         } -        #query_description_stream+        #[macro_export]+        macro_rules! query_description_stream {+            // capture all needed `use` statements.+            ($($uses:tt)*) => {+                $($uses)*

You can surround thins expansion by an ad-hoc module to avoid polluting the namespace.

Julian-Wollersberger

comment created time in 3 days

PullRequestReviewEvent

PR opened rust-lang/rust

Replace `DepKind` by trait objects

Most of the code depending on DepNodes just matches on their DepKind. This PR replaces those matches by trait objects, using a unit struct for each DepKind variant.

Everything still has to be declared inside rustc_middle, but the need for the macros is significantly reduced. I would have preferred defining the trait inside rustc_query_system, but this needs more work.

cc @Julian-Wollersberger

Based on #77830 for the first few commits.

+641 -410

0 comment

15 changed files

pr created time in 3 days

create barnchcjgillot/rust

branch : ddk

created branch time in 3 days

push eventcjgillot/rust

Camille GILLOT

commit sha 94d5340b007411f7d89f968bb824b52e5b1933ae

Shrink interface.

view details

Camille GILLOT

commit sha 3a54a6133282bc610d03491a41e03a8fd620cb06

Move the Query enum to rustc_incremental.

view details

Camille GILLOT

commit sha a267091cf6b64f4b59676c66df75cfe1cc170717

Move force_from_dep_node to the QueryEngine trait.

view details

Camille GILLOT

commit sha 7a459695c7aa1f1123008a57adf5b958a6375fb8

Fix test.

view details

Camille GILLOT

commit sha 2e8b8f0d0eddc0ba41fd96f6b2db47f9e841368a

Tweaks for parallel compiler.

view details

push time in 3 days

push eventcjgillot/rust

Mateusz Mikuła

commit sha 0ad3da06843089c0bf10d6caa3fbbc72fa67787a

Enable ASLR for windows-gnu

view details

Mark Rousskov

commit sha e023158145ece18176a2e93420600ccda0d0bc58

Permit uninhabited enums to cast into ints This essentially reverts part of #6204.

view details

Mark Rousskov

commit sha 990a39596cf3b33e550f2045f78a62970f8d78f8

Prevent ICE on uninhabited MIR interpretation

view details

Nathan West

commit sha a02014280586b53997622c501db00398376967a8

Refactor io/buffered.rs into submodules

view details

Nathan West

commit sha 96229f02402e82914ec6100b28ad2cbdd273a0d4

move buffered.rs to mod.rs

view details

Nathan West

commit sha 6d75cdfc9ed9e6987bd23add6cf3954d2499dce2

Added updated compiler diagnostic

view details

Amjad Alsharafi

commit sha da700cba08a2b194d19e63d3c51ebadce96fe46b

Stabilize move_ref_pattern

view details

Amjad Alsharafi

commit sha afb9eeb1b9ea16ca65e38673a0ef3e7be81d7252

Disabled error `E0007` from rustc_error_codes

view details

Mark Rousskov

commit sha 05c9c0ee5dcd935f518db151bee2dc88380fb92f

Modify executable checking to be more universal This uses a dummy file to check if the filesystem being used supports the executable bit in general.

view details

Nathan West

commit sha c4280af8285c61b367a87c8f6eef9876011a8150

Retry fix error reporting suggestions

view details

Aaron Hill

commit sha cfe07cd42a92610219d6ffc1ae5eefef42f5254a

Use llvm::computeLTOCacheKey to determine post-ThinLTO CGU reuse During incremental ThinLTO compilation, we attempt to re-use the optimized (post-ThinLTO) bitcode file for a module if it is 'safe' to do so. Up until now, 'safe' has meant that the set of modules that our current modules imports from/exports to is unchanged from the previous compilation session. See PR #67020 and PR #71131 for more details. However, this turns out be insufficient to guarantee that it's safe to reuse the post-LTO module (i.e. that optimizing the pre-LTO module would produce the same result). When LLVM optimizes a module during ThinLTO, it may look at other information from the 'module index', such as whether a (non-imported!) global variable is used. If this information changes between compilation runs, we may end up re-using an optimized module that (for example) had dead-code elimination run on a function that is now used by another module. Fortunately, LLVM implements its own ThinLTO module cache, which is used when ThinLTO is performed by a linker plugin (e.g. when clang is used to compile a C proect). Using this cache directly would require extensive refactoring of our code - but fortunately for us, LLVM provides a function that does exactly what we need. The function `llvm::computeLTOCacheKey` is used to compute a SHA-1 hash from all data that might influence the result of ThinLTO on a module. In addition to the module imports/exports that we manually track, it also hashes information about global variables (e.g. their liveness) which might be used during optimization. By using this function, we shouldn't have to worry about new LLVM passes breaking our module re-use behavior. In LLVM, the output of this function forms part of the filename used to store the post-ThinLTO module. To keep our current filename structure intact, this PR just writes out the mapping 'CGU name -> Hash' to a file. To determine if a post-LTO module should be reused, we compare hashes from the previous session. This should unblock PR #75199 - by sheer chance, it seems to have hit this issue due to the particular CGU partitioning and optimization decisions that end up getting made.

view details

dylni

commit sha 1ff7da6551a7cdf6ace2a9d00e92bbab550334ee

Move `slice::check_range` to `RangeBounds`

view details

dylni

commit sha 1095dcab96d524e700b11edf366d45a0fd173fa0

Fix links

view details

dylni

commit sha eb63168e007058dad4af758faf1dca449c049777

Fix doctests

view details

dylni

commit sha f055b0bb0847ecf08fe452a270faae8324b55b05

Rename method to `assert_len`

view details

Bastian Kauschke

commit sha fd22e87afc9082522bc7b52e32d25d43c64594e6

fix flag computation for `ExistentialPredicate::Projection`

view details

Bastian Kauschke

commit sha 7652b4b1d9cec0ad22f529a4335d05f7d7792521

guard against `skip_binder` errors during FlagComputation

view details

Arlo Siemsen

commit sha 0a4dc8bc161c68320a60a6bde525adae258b6252

Adds a GitHub Actions CI build for aarch64-pc-windows-msvc via cross-compilation on an x86_64 host. This promotes aarch64-pc-windows-msvc from a Tier 2 Compilation Target (std) to a Tier 2 Development Platform (std+rustc+cargo+tools). Fixes #72881

view details

Camelid

commit sha 549f861f7d53811521cf929cf58fb6828a2a88d9

Use correct article in help message for conversion or cast Before it always used `an`; now it uses the correct article for the type.

view details

Camelid

commit sha 094f14c554c3a1f103a5d6778d4b4e131c297f11

Add article after "to" Also added missing backtick in "you can cast" message.

view details

push time in 4 days

push eventcjgillot/rust

Mark Rousskov

commit sha 05c9c0ee5dcd935f518db151bee2dc88380fb92f

Modify executable checking to be more universal This uses a dummy file to check if the filesystem being used supports the executable bit in general.

view details

dylni

commit sha 1ff7da6551a7cdf6ace2a9d00e92bbab550334ee

Move `slice::check_range` to `RangeBounds`

view details

dylni

commit sha 1095dcab96d524e700b11edf366d45a0fd173fa0

Fix links

view details

dylni

commit sha eb63168e007058dad4af758faf1dca449c049777

Fix doctests

view details

dylni

commit sha f055b0bb0847ecf08fe452a270faae8324b55b05

Rename method to `assert_len`

view details

Bastian Kauschke

commit sha fd22e87afc9082522bc7b52e32d25d43c64594e6

fix flag computation for `ExistentialPredicate::Projection`

view details

Bastian Kauschke

commit sha 7652b4b1d9cec0ad22f529a4335d05f7d7792521

guard against `skip_binder` errors during FlagComputation

view details

Camelid

commit sha 549f861f7d53811521cf929cf58fb6828a2a88d9

Use correct article in help message for conversion or cast Before it always used `an`; now it uses the correct article for the type.

view details

Camelid

commit sha 094f14c554c3a1f103a5d6778d4b4e131c297f11

Add article after "to" Also added missing backtick in "you can cast" message.

view details

Camelid

commit sha 8a6831a7fd3fc624643b50f494212e0ceaad3c28

Say "doesn't" instead of "wouldn't" in convert message

view details

Dylan MacKenzie

commit sha 77e6c56ab6f108fdbb8acbd176497be9f074af9a

Unify `&mut` and `&raw mut` const-checking errors

view details

Dylan MacKenzie

commit sha c1494d60dbad39c218e7b0825bfe590cc22bf2fa

Bless tests

view details

Bastian Kauschke

commit sha 9c302f55bd07a04305dfa2bd815d2559deb8468f

normalize in codegen_fulfill_obligations

view details

Bastian Kauschke

commit sha f0487cee7439f3a4b4c7daec0e7f2a0ccc21053c

normalize substs during inlining

view details

Bastian Kauschke

commit sha 32739a2ff1b7b6e5c1b475341b01f4a499830a84

add regression test

view details

Bastian Kauschke

commit sha ac893b8a02788eec6f6fad0cc89de0177b0c0a50

add test for should_inline incorrect param_env

view details

Mara Bos

commit sha 64839ee00ab4076d797901ddea55f2613c5b75b5

Add Pin::new_static.

view details

Mara Bos

commit sha 390883e888c580d054ab4a2584c851aba50865e9

Make Pin::new_static const.

view details

Joshua Nelson

commit sha bd135674814d74ca6fca3ab79d778ecaaeb02cf5

Allow setting up git hooks from other worktrees

view details

Ralf Jung

commit sha 0ec3ea9e697ea9c2ce225ba0b9f3715434fc773e

const keyword: brief paragraph on 'const fn'

view details

push time in 4 days

create barnchcjgillot/rust

branch : renco

created branch time in 4 days

push eventcjgillot/rust

Mark Rousskov

commit sha 05c9c0ee5dcd935f518db151bee2dc88380fb92f

Modify executable checking to be more universal This uses a dummy file to check if the filesystem being used supports the executable bit in general.

view details

dylni

commit sha 1ff7da6551a7cdf6ace2a9d00e92bbab550334ee

Move `slice::check_range` to `RangeBounds`

view details

dylni

commit sha 1095dcab96d524e700b11edf366d45a0fd173fa0

Fix links

view details

dylni

commit sha eb63168e007058dad4af758faf1dca449c049777

Fix doctests

view details

dylni

commit sha f055b0bb0847ecf08fe452a270faae8324b55b05

Rename method to `assert_len`

view details

Bastian Kauschke

commit sha fd22e87afc9082522bc7b52e32d25d43c64594e6

fix flag computation for `ExistentialPredicate::Projection`

view details

Bastian Kauschke

commit sha 7652b4b1d9cec0ad22f529a4335d05f7d7792521

guard against `skip_binder` errors during FlagComputation

view details

Camelid

commit sha 549f861f7d53811521cf929cf58fb6828a2a88d9

Use correct article in help message for conversion or cast Before it always used `an`; now it uses the correct article for the type.

view details

Camelid

commit sha 094f14c554c3a1f103a5d6778d4b4e131c297f11

Add article after "to" Also added missing backtick in "you can cast" message.

view details

Camelid

commit sha 8a6831a7fd3fc624643b50f494212e0ceaad3c28

Say "doesn't" instead of "wouldn't" in convert message

view details

Dylan MacKenzie

commit sha 77e6c56ab6f108fdbb8acbd176497be9f074af9a

Unify `&mut` and `&raw mut` const-checking errors

view details

Dylan MacKenzie

commit sha c1494d60dbad39c218e7b0825bfe590cc22bf2fa

Bless tests

view details

Bastian Kauschke

commit sha 9c302f55bd07a04305dfa2bd815d2559deb8468f

normalize in codegen_fulfill_obligations

view details

Bastian Kauschke

commit sha f0487cee7439f3a4b4c7daec0e7f2a0ccc21053c

normalize substs during inlining

view details

Bastian Kauschke

commit sha 32739a2ff1b7b6e5c1b475341b01f4a499830a84

add regression test

view details

Bastian Kauschke

commit sha ac893b8a02788eec6f6fad0cc89de0177b0c0a50

add test for should_inline incorrect param_env

view details

Mara Bos

commit sha 64839ee00ab4076d797901ddea55f2613c5b75b5

Add Pin::new_static.

view details

Mara Bos

commit sha 390883e888c580d054ab4a2584c851aba50865e9

Make Pin::new_static const.

view details

Joshua Nelson

commit sha bd135674814d74ca6fca3ab79d778ecaaeb02cf5

Allow setting up git hooks from other worktrees

view details

Ralf Jung

commit sha 0ec3ea9e697ea9c2ce225ba0b9f3715434fc773e

const keyword: brief paragraph on 'const fn'

view details

push time in 4 days

push eventcjgillot/rust

Yuki Okushi

commit sha f09c962a84ea125152d37ad8c38bca1aef668c07

Rollup merge of #77388 - JohnTitor:add-tests, r=Dylan-DPC Add some regression tests Closes #66501 Closes #68951 Closes #72565 Closes #74244 Closes #75299 The first issue is fixed in 1.43.0, other issues are fixed in the recent nightly.

view details

Yuki Okushi

commit sha 830d1a0e32c7ad6d34e22e07d498f4f0eda6fb5b

Rollup merge of #77419 - GuillaumeGomez:create-e0777, r=jyn514 Create E0777 error code for invalid argument in derive The second commit is to fix a nit reported by @jyn514 [here](https://github.com/rust-lang/rust/pull/76406/files#r485186592).

view details

Yuki Okushi

commit sha 25d0650d0fba54ec1971426b2be55e95f8a0655f

Rollup merge of #77447 - ssomers:btree_cleanup_8, r=Mark-Simulacrum BTreeMap: document DrainFilterInner better r? @Mark-Simulacrum

view details

Yuki Okushi

commit sha 9db26b7562cd876e96f86c0dd423a812754e991b

Rollup merge of #77468 - camelid:fix-test-name, r=Dylan-DPC Fix test name Remove trailing `-`.

view details

Yuki Okushi

commit sha 0ed4849a3e71f19c68d612b77bbe06c2d5b256c5

Rollup merge of #77469 - camelid:rustdoc-better-failed-res-error, r=jyn514 Improve rustdoc error for failed intra-doc link resolution The previous error was confusing since it made it sound like you can't link to items that are defined outside the current module. Also suggested importing the item. r? @jyn514

view details

Yuki Okushi

commit sha 69f2cf5ad9f472facb25b6057d4f6fa05a2d3bab

Rollup merge of #77473 - Mark-Simulacrum:check-limited, r=ecstatic-morse Make --all-targets in x.py check opt-in In particular due to #76822, making this the default is currently suboptimal. r? @ecstatic-morse

view details

Yuki Okushi

commit sha f5db16639713a9a3e6730a59c5a03007557df057

Rollup merge of #77508 - camelid:patch-8, r=jonas-schievink Fix capitalization in blog post name

view details

Camelid

commit sha adfba2b694b19e4aa6a99289eeda7b48ae402ab8

Only use Fira Sans for the first `td` in item lists Fixes an issue where links in the one-line version of an item's docs would be in Fira Sans, while the rest would be in a serifed font.

view details

Lzu Tao

commit sha 6cb062dacfed8e647361bc94694c7177beb17390

mips32: Add f64 hard-float support co-authored-by: Amanieu <amanieu@gmail.com>

view details

bors

commit sha 2251766944f355a039e67aeb13ab630b2d46bf9b

Auto merge of #77517 - JohnTitor:rollup-msbd49e, r=JohnTitor Rollup of 11 pull requests Successful merges: - #75143 (Use `tracing` spans to trace the entire MIR interp stack) - #75699 (Uplift drop-bounds lint from clippy) - #76768 (Test and reject out-of-bounds shuffle vectors) - #77190 (updated p! macro to accept literals) - #77388 (Add some regression tests) - #77419 (Create E0777 error code for invalid argument in derive) - #77447 (BTreeMap: document DrainFilterInner better) - #77468 (Fix test name) - #77469 (Improve rustdoc error for failed intra-doc link resolution) - #77473 (Make --all-targets in x.py check opt-in) - #77508 (Fix capitalization in blog post name) Failed merges: r? `@ghost`

view details

bors

commit sha 32cbc65e6bf793d99dc609d11f4a4c93176cdbe2

Auto merge of #77380 - fusion-engineering-forks:unbox-the-mutex, r=dtolnay Unbox mutexes and condvars on some platforms Both mutexes and condition variables contained a Box containing the actual os-specific object. This was done because moving these objects may cause undefined behaviour on some platforms. However, this is not needed on Windows[1], Wasm[2], cloudabi[2], and 'unsupported'[3], were the box was only needlessly making them less efficient. This change gets rid of the box on those platforms. On those platforms, `Condvar` can no longer verify it is only used with one `Mutex`, as mutexes no longer have a stable address. This was addressed and considered acceptable in #76932. [1]\: https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-initializesrwlock [2]\: These are just a single atomic integer together with futex wait/wake calls/instructions. [3]\: The `unsupported` platform doesn't support multiple threads at all.

view details

bors

commit sha 0d37dca25a51fb900a402c94c8818ad1c2789e30

Auto merge of #76448 - haraldh:default_alloc_error_handler_reduced, r=Amanieu Implement Make `handle_alloc_error` default to panic (for no_std + liballoc) Related: https://github.com/rust-lang/rust/issues/66741 Guarded with `#![feature(default_alloc_error_handler)]` a default `alloc_error_handler` is called, if a custom allocator is used and no other custom `#[alloc_error_handler]` is defined.

view details

bjorn3

commit sha 17d1cbbbe0dc59509cf0f889d241cf58099076d4

Move target feature whitelist from cg_llvm to cg_ssa These target features have to be supported or at least emulated by alternative codegen backends anyway as they are used by common crates. By moving this list to cg_ssa, other codegen backends don't have to copy this code.

view details

Guillaume Gomez

commit sha 3641a37455939cbd913117a1921909c9cb16d349

Enforce crate level attributes checks

view details

bors

commit sha 0644cc1242dbeebb69b1b2496562751ba5d23ffb

Auto merge of #76610 - hch12907:master, r=LukasKalbertodt Implement as_ne_bytes() for integers and floats This is related to issue #64464. I am pretty sure that these functions are actually const-ify-able, and technically as_bits() can also be implemented for floats, but I might need some comments on both.

view details

Matthew Jasper

commit sha fa3e2fcbe4bb6c878d137eb427fc34daf49b8c69

Defer creating drop trees in MIR lowering until leaving that scope

view details

Matthew Jasper

commit sha f810e600cd7b128ec167937bbd87cfabc52b403e

Reduce the number of drop-flag assignments in unwind paths

view details

Matthew Jasper

commit sha 1e71862046bdea989e4a25c266b2df768cb4f0bb

Add some more comments

view details

Matthew Jasper

commit sha 8902ce5d848f0b58f02b72725f195ec9022449a6

Address review comments

view details

Aaron Hill

commit sha 4c83eec00883e10e7b859d039dcc0e937a0706d5

Fix rebase fallout

view details

push time in 4 days

push eventcjgillot/rust

Mateusz Mikuła

commit sha 0ad3da06843089c0bf10d6caa3fbbc72fa67787a

Enable ASLR for windows-gnu

view details

Mark Rousskov

commit sha e023158145ece18176a2e93420600ccda0d0bc58

Permit uninhabited enums to cast into ints This essentially reverts part of #6204.

view details

Mark Rousskov

commit sha 990a39596cf3b33e550f2045f78a62970f8d78f8

Prevent ICE on uninhabited MIR interpretation

view details

Nathan West

commit sha a02014280586b53997622c501db00398376967a8

Refactor io/buffered.rs into submodules

view details

Nathan West

commit sha 96229f02402e82914ec6100b28ad2cbdd273a0d4

move buffered.rs to mod.rs

view details

Nathan West

commit sha 6d75cdfc9ed9e6987bd23add6cf3954d2499dce2

Added updated compiler diagnostic

view details

Amjad Alsharafi

commit sha da700cba08a2b194d19e63d3c51ebadce96fe46b

Stabilize move_ref_pattern

view details

Amjad Alsharafi

commit sha afb9eeb1b9ea16ca65e38673a0ef3e7be81d7252

Disabled error `E0007` from rustc_error_codes

view details

Nathan West

commit sha c4280af8285c61b367a87c8f6eef9876011a8150

Retry fix error reporting suggestions

view details

Aaron Hill

commit sha cfe07cd42a92610219d6ffc1ae5eefef42f5254a

Use llvm::computeLTOCacheKey to determine post-ThinLTO CGU reuse During incremental ThinLTO compilation, we attempt to re-use the optimized (post-ThinLTO) bitcode file for a module if it is 'safe' to do so. Up until now, 'safe' has meant that the set of modules that our current modules imports from/exports to is unchanged from the previous compilation session. See PR #67020 and PR #71131 for more details. However, this turns out be insufficient to guarantee that it's safe to reuse the post-LTO module (i.e. that optimizing the pre-LTO module would produce the same result). When LLVM optimizes a module during ThinLTO, it may look at other information from the 'module index', such as whether a (non-imported!) global variable is used. If this information changes between compilation runs, we may end up re-using an optimized module that (for example) had dead-code elimination run on a function that is now used by another module. Fortunately, LLVM implements its own ThinLTO module cache, which is used when ThinLTO is performed by a linker plugin (e.g. when clang is used to compile a C proect). Using this cache directly would require extensive refactoring of our code - but fortunately for us, LLVM provides a function that does exactly what we need. The function `llvm::computeLTOCacheKey` is used to compute a SHA-1 hash from all data that might influence the result of ThinLTO on a module. In addition to the module imports/exports that we manually track, it also hashes information about global variables (e.g. their liveness) which might be used during optimization. By using this function, we shouldn't have to worry about new LLVM passes breaking our module re-use behavior. In LLVM, the output of this function forms part of the filename used to store the post-ThinLTO module. To keep our current filename structure intact, this PR just writes out the mapping 'CGU name -> Hash' to a file. To determine if a post-LTO module should be reused, we compare hashes from the previous session. This should unblock PR #75199 - by sheer chance, it seems to have hit this issue due to the particular CGU partitioning and optimization decisions that end up getting made.

view details

Arlo Siemsen

commit sha 0a4dc8bc161c68320a60a6bde525adae258b6252

Adds a GitHub Actions CI build for aarch64-pc-windows-msvc via cross-compilation on an x86_64 host. This promotes aarch64-pc-windows-msvc from a Tier 2 Compilation Target (std) to a Tier 2 Development Platform (std+rustc+cargo+tools). Fixes #72881

view details

Temirkhan Myrzamadi

commit sha 13dfbb64d313137b7d3c33067910e90f27bc6345

Suggest imports of unresolved macros

view details

Temirkhan Myrzamadi

commit sha 479298e05e8177b171c6d6bcd35fc7553b424bee

Re-run tests with --bless

view details

Temirkhan Myrzamadi

commit sha ea7cf6106864ce7929eb9f3cfe580f05ee418ac8

Don't suggest macros that out of scope

view details

Jake Goulding

commit sha 225ec813a9b25cdf94811d5b6c5207848cfef829

Add a cross-compiling aarch64-apple-darwin CI builder

view details

Jake Goulding

commit sha 2fe271e4c2b5f89108314177348d7732f533582f

Move aarch64-apple-darwin to tier 2 Drive-by fixes to update the naming of "OSX" [sic] to "macOS".

view details

Waffle

commit sha 0b923d3ca0b7f5a1a611564ee48c1e92f896d79e

add `str::{Split,RSplit}::as_str` methods This commit introduses 2 methods under "str_split_as_str" gate with common signature of `&Split<'a, _> -> &'a str'`. Both of them work like `Chars::as_str` - return unyield part of the inner string.

view details

Waffle

commit sha 4747215d778abd9f280202d07f279fdeaea519f8

add `str::{SplitN, RSplitN, SplitTerminator, RSplitTerminator}::as_str` methods This commit entroduce 4 methods smililar to `Split::as_str` all under the same gate "str_split_as_str".

view details

Waffle

commit sha 076514c8a82591547116a7a2212c4de4bdc56f76

add `str::SplitInclusive::as_str` method This commit entroduces `core::str::SplitInclusive::as_str` method similar to `core::str::Split::as_str`, but under different gate - "str_split_inclusive_as_str" (this is done so because `SplitInclusive` is itself unstable).

view details

Alexander Mols

commit sha 8fe61546696b626ecf68ef838d5d82e393719e80

Use posix_spawn() on unix if program is a path Previously `Command::spawn` would fall back to the non-posix_spawn based implementation if the `PATH` environment variable was possibly changed. On systems with a modern (g)libc `posix_spawn()` can be significantly faster. If program is a path itself the `PATH` environment variable is not used for the lookup and it should be safe to use the `posix_spawnp()` method. [1] We found this, because we have a cli application that effectively runs a lot of subprocesses. It would sometimes noticeably hang while printing output. Profiling showed that the process was spending the majority of time in the kernel's `copy_page_range` function while spawning subprocesses. During this time the process is completely blocked from running, explaining why users were reporting the cli app hanging. Through this we discovered that `std::process::Command` has a fast and slow path for process execution. The fast path is backed by `posix_spawnp()` and the slow path by fork/exec syscalls being called explicitly. Using fork for process creation is supposed to be fast, but it slows down as your process uses more memory. It's not because the kernel copies the actual memory from the parent, but it does need to copy the references to it (see `copy_page_range` above!). We ended up using the slow path, because the command spawn implementation in falls back to the slow path if it suspects the PATH environment variable was changed. Here is a smallish program demonstrating the slowdown before this code change: ``` use std::process::Command; use std::time::Instant; fn main() { let mut args = std::env::args().skip(1); if let Some(size) = args.next() { // Allocate some memory let _xs: Vec<_> = std::iter::repeat(0) .take(size.parse().expect("valid number")) .collect(); let mut command = Command::new("/bin/sh"); command .arg("-c") .arg("echo hello"); if args.next().is_some() { println!("Overriding PATH"); command.env("PATH", std::env::var("PATH").expect("PATH env var")); } let now = Instant::now(); let child = command .spawn() .expect("failed to execute process"); println!("Spawn took: {:?}", now.elapsed()); let output = child.wait_with_output().expect("failed to wait on process"); println!("Output: {:?}", output); } else { eprintln!("Usage: prog [size]"); std::process::exit(1); } () } ``` Running it and passing different amounts of elements to use to allocate memory shows that the time taken for `spawn()` can differ quite significantly. In latter case the `posix_spawnp()` implementation is 30x faster: ``` $ cargo run --release 10000000 ... Spawn took: 324.275µs hello $ cargo run --release 10000000 changepath ... Overriding PATH Spawn took: 2.346809ms hello $ cargo run --release 100000000 ... Spawn took: 387.842µs hello $ cargo run --release 100000000 changepath ... Overriding PATH Spawn took: 13.434677ms hello ``` [1]: https://github.com/bminor/glibc/blob/5f72f9800b250410cad3abfeeb09469ef12b2438/posix/execvpe.c#L81

view details

push time in 5 days

push eventcjgillot/rust

Camille GILLOT

commit sha 52aeea83c95eeba0d75337f2d5a77ab95f7772f4

Move the Query enum to rustc_incremental.

view details

Camille GILLOT

commit sha 6a7e70b33696b7a4e238307c9cbc0b11163919b5

Move force_from_dep_node to the QueryEngine trait.

view details

Camille GILLOT

commit sha 38e3656b1d3595080efbe6fc1f5d316fed1ea5c2

Fix test.

view details

push time in 6 days

push eventcjgillot/rust

Camille GILLOT

commit sha 2ce40552982110e00cedd443641e0e2afe162729

Decouple QueryContext from DepContext.

view details

Camille GILLOT

commit sha 9722f7340a0c7a3cfe63fb23210ece075caa0896

Simplify graph handling.

view details

Camille GILLOT

commit sha c5a08e55ac98bda50469bd931dad290c80e2542c

Wrap TyCtxt inside a QueryCtxt for queries.

view details

Camille GILLOT

commit sha f4feed850a5285329e9cce889311f9481d759a3e

Move the manipulation of queries to a QueryEngine trait.

view details

Camille GILLOT

commit sha df9ba7b78b5bbc7ad4d350c5175d0947f658c870

Move try_print_query_stack to QueryEngine.

view details

Camille GILLOT

commit sha fc68bf0044cc4eec774ed7ce6d6c3a32baff533b

Make QueryEngine opaque to TyCtxt.

view details

Camille GILLOT

commit sha e650f698e39d0e1e77b3004105a4bc12abcceb34

Move cache handling to the QueryContext.

view details

Camille GILLOT

commit sha a5136e5f96358bae4284e5b93e3809c504314393

Move the query engine to rustc_incremental.

view details

Camille GILLOT

commit sha 8e0eb2002461e45849ad332007103da8fe6f50d0

Reintroduce comment.

view details

Camille GILLOT

commit sha d8c4493bbfe6051dbc690e10019f16097dd6aaf2

Move the queries module.

view details

Camille GILLOT

commit sha d028dbb7898b94cc9501124d794f22ee3d3bfbda

Move query::keys.

view details

Camille GILLOT

commit sha a1eaed6d201a68cac5b494e0bbd676756644f12b

Tweaks for parallel compiler.

view details

Camille GILLOT

commit sha c933737dd0fb43354f98be19c9016f258398d8fc

Shrink interface.

view details

Camille GILLOT

commit sha a8842c5e1dbc19d641cf664d70d86b9f615e79e3

Fix test.

view details

Camille GILLOT

commit sha 74c3827daceda62347e1b26d000099546efdd266

Move the Query enum to rustc_incremental.

view details

Camille GILLOT

commit sha bf04578f63e83b13393cf22af13a9f1ece838126

Move force_from_dep_node to the QueryEngine trait.

view details

push time in 7 days

Pull request review commentrust-lang/rust

Simplify query proc-macros

 pub fn force_from_dep_node<'tcx>(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> bool         return false;     } -    rustc_dep_node_force!([dep_node, tcx]-        // These are inputs that are expected to be pre-allocated and that-        // should therefore always be red or green already.-        DepKind::CrateMetadata |--        // These are anonymous nodes.-        DepKind::TraitSelect |--        // We don't have enough information to reconstruct the query key of-        // these.-        DepKind::CompileCodegenUnit => {-            bug!("force_from_dep_node: encountered {:?}", dep_node)+    macro_rules! force_from_dep_node {+        ($($(#[$attr:meta])* [$($modifiers:tt)*] $name:ident($K:ty),)*) => {+            match dep_node.kind {+                // These are inputs that are expected to be pre-allocated and that+                // should therefore always be red or green already.+                DepKind::CrateMetadata |++                // These are anonymous nodes.+                DepKind::TraitSelect |++                // We don't have enough information to reconstruct the query key of+                // these.+                DepKind::CompileCodegenUnit |++                // Forcing this makes no sense.+                DepKind::Null => {+                    bug!("force_from_dep_node: encountered {:?}", dep_node)+                }++                $(DepKind::$name => {+                    debug_assert!(<$K as DepNodeParams<TyCtxt<'_>>>::can_reconstruct_query_key());++                    if let Some(key) = <$K as DepNodeParams<TyCtxt<'_>>>::recover(tcx, dep_node) {

recover is implemented in terms of extract_def_id, which uses def_path_hash_to_def_id.get(...), which can return None.

cjgillot

comment created time in 7 days

PullRequestReviewEvent

push eventcjgillot/rust

Mateusz Mikuła

commit sha 0ad3da06843089c0bf10d6caa3fbbc72fa67787a

Enable ASLR for windows-gnu

view details

Mark Rousskov

commit sha e023158145ece18176a2e93420600ccda0d0bc58

Permit uninhabited enums to cast into ints This essentially reverts part of #6204.

view details

Mark Rousskov

commit sha 990a39596cf3b33e550f2045f78a62970f8d78f8

Prevent ICE on uninhabited MIR interpretation

view details

Nathan West

commit sha a02014280586b53997622c501db00398376967a8

Refactor io/buffered.rs into submodules

view details

Nathan West

commit sha 96229f02402e82914ec6100b28ad2cbdd273a0d4

move buffered.rs to mod.rs

view details

Nathan West

commit sha 6d75cdfc9ed9e6987bd23add6cf3954d2499dce2

Added updated compiler diagnostic

view details

Amjad Alsharafi

commit sha da700cba08a2b194d19e63d3c51ebadce96fe46b

Stabilize move_ref_pattern

view details

Amjad Alsharafi

commit sha afb9eeb1b9ea16ca65e38673a0ef3e7be81d7252

Disabled error `E0007` from rustc_error_codes

view details

Nathan West

commit sha c4280af8285c61b367a87c8f6eef9876011a8150

Retry fix error reporting suggestions

view details

Aaron Hill

commit sha cfe07cd42a92610219d6ffc1ae5eefef42f5254a

Use llvm::computeLTOCacheKey to determine post-ThinLTO CGU reuse During incremental ThinLTO compilation, we attempt to re-use the optimized (post-ThinLTO) bitcode file for a module if it is 'safe' to do so. Up until now, 'safe' has meant that the set of modules that our current modules imports from/exports to is unchanged from the previous compilation session. See PR #67020 and PR #71131 for more details. However, this turns out be insufficient to guarantee that it's safe to reuse the post-LTO module (i.e. that optimizing the pre-LTO module would produce the same result). When LLVM optimizes a module during ThinLTO, it may look at other information from the 'module index', such as whether a (non-imported!) global variable is used. If this information changes between compilation runs, we may end up re-using an optimized module that (for example) had dead-code elimination run on a function that is now used by another module. Fortunately, LLVM implements its own ThinLTO module cache, which is used when ThinLTO is performed by a linker plugin (e.g. when clang is used to compile a C proect). Using this cache directly would require extensive refactoring of our code - but fortunately for us, LLVM provides a function that does exactly what we need. The function `llvm::computeLTOCacheKey` is used to compute a SHA-1 hash from all data that might influence the result of ThinLTO on a module. In addition to the module imports/exports that we manually track, it also hashes information about global variables (e.g. their liveness) which might be used during optimization. By using this function, we shouldn't have to worry about new LLVM passes breaking our module re-use behavior. In LLVM, the output of this function forms part of the filename used to store the post-ThinLTO module. To keep our current filename structure intact, this PR just writes out the mapping 'CGU name -> Hash' to a file. To determine if a post-LTO module should be reused, we compare hashes from the previous session. This should unblock PR #75199 - by sheer chance, it seems to have hit this issue due to the particular CGU partitioning and optimization decisions that end up getting made.

view details

Arlo Siemsen

commit sha 0a4dc8bc161c68320a60a6bde525adae258b6252

Adds a GitHub Actions CI build for aarch64-pc-windows-msvc via cross-compilation on an x86_64 host. This promotes aarch64-pc-windows-msvc from a Tier 2 Compilation Target (std) to a Tier 2 Development Platform (std+rustc+cargo+tools). Fixes #72881

view details

Temirkhan Myrzamadi

commit sha 13dfbb64d313137b7d3c33067910e90f27bc6345

Suggest imports of unresolved macros

view details

Temirkhan Myrzamadi

commit sha 479298e05e8177b171c6d6bcd35fc7553b424bee

Re-run tests with --bless

view details

Temirkhan Myrzamadi

commit sha ea7cf6106864ce7929eb9f3cfe580f05ee418ac8

Don't suggest macros that out of scope

view details

Jake Goulding

commit sha 225ec813a9b25cdf94811d5b6c5207848cfef829

Add a cross-compiling aarch64-apple-darwin CI builder

view details

Jake Goulding

commit sha 2fe271e4c2b5f89108314177348d7732f533582f

Move aarch64-apple-darwin to tier 2 Drive-by fixes to update the naming of "OSX" [sic] to "macOS".

view details

Waffle

commit sha 0b923d3ca0b7f5a1a611564ee48c1e92f896d79e

add `str::{Split,RSplit}::as_str` methods This commit introduses 2 methods under "str_split_as_str" gate with common signature of `&Split<'a, _> -> &'a str'`. Both of them work like `Chars::as_str` - return unyield part of the inner string.

view details

Waffle

commit sha 4747215d778abd9f280202d07f279fdeaea519f8

add `str::{SplitN, RSplitN, SplitTerminator, RSplitTerminator}::as_str` methods This commit entroduce 4 methods smililar to `Split::as_str` all under the same gate "str_split_as_str".

view details

Waffle

commit sha 076514c8a82591547116a7a2212c4de4bdc56f76

add `str::SplitInclusive::as_str` method This commit entroduces `core::str::SplitInclusive::as_str` method similar to `core::str::Split::as_str`, but under different gate - "str_split_inclusive_as_str" (this is done so because `SplitInclusive` is itself unstable).

view details

Alexander Mols

commit sha 8fe61546696b626ecf68ef838d5d82e393719e80

Use posix_spawn() on unix if program is a path Previously `Command::spawn` would fall back to the non-posix_spawn based implementation if the `PATH` environment variable was possibly changed. On systems with a modern (g)libc `posix_spawn()` can be significantly faster. If program is a path itself the `PATH` environment variable is not used for the lookup and it should be safe to use the `posix_spawnp()` method. [1] We found this, because we have a cli application that effectively runs a lot of subprocesses. It would sometimes noticeably hang while printing output. Profiling showed that the process was spending the majority of time in the kernel's `copy_page_range` function while spawning subprocesses. During this time the process is completely blocked from running, explaining why users were reporting the cli app hanging. Through this we discovered that `std::process::Command` has a fast and slow path for process execution. The fast path is backed by `posix_spawnp()` and the slow path by fork/exec syscalls being called explicitly. Using fork for process creation is supposed to be fast, but it slows down as your process uses more memory. It's not because the kernel copies the actual memory from the parent, but it does need to copy the references to it (see `copy_page_range` above!). We ended up using the slow path, because the command spawn implementation in falls back to the slow path if it suspects the PATH environment variable was changed. Here is a smallish program demonstrating the slowdown before this code change: ``` use std::process::Command; use std::time::Instant; fn main() { let mut args = std::env::args().skip(1); if let Some(size) = args.next() { // Allocate some memory let _xs: Vec<_> = std::iter::repeat(0) .take(size.parse().expect("valid number")) .collect(); let mut command = Command::new("/bin/sh"); command .arg("-c") .arg("echo hello"); if args.next().is_some() { println!("Overriding PATH"); command.env("PATH", std::env::var("PATH").expect("PATH env var")); } let now = Instant::now(); let child = command .spawn() .expect("failed to execute process"); println!("Spawn took: {:?}", now.elapsed()); let output = child.wait_with_output().expect("failed to wait on process"); println!("Output: {:?}", output); } else { eprintln!("Usage: prog [size]"); std::process::exit(1); } () } ``` Running it and passing different amounts of elements to use to allocate memory shows that the time taken for `spawn()` can differ quite significantly. In latter case the `posix_spawnp()` implementation is 30x faster: ``` $ cargo run --release 10000000 ... Spawn took: 324.275µs hello $ cargo run --release 10000000 changepath ... Overriding PATH Spawn took: 2.346809ms hello $ cargo run --release 100000000 ... Spawn took: 387.842µs hello $ cargo run --release 100000000 changepath ... Overriding PATH Spawn took: 13.434677ms hello ``` [1]: https://github.com/bminor/glibc/blob/5f72f9800b250410cad3abfeeb09469ef12b2438/posix/execvpe.c#L81

view details

push time in 7 days

pull request commentrust-lang/rust

Make fewer types generic over QueryContext

Could you remove the two QueryJobId commits? The back-and-forth changes the type parameters needlessly.

Julian-Wollersberger

comment created time in 10 days

pull request commentrust-lang/rust

Make fewer types generic over QueryContext

This crate needs some convention for the type parameters. The amount of those is getting out of hand.

Julian-Wollersberger

comment created time in 12 days

Pull request review commentrust-lang/rust

Make fewer types generic over QueryContext

 pub struct QueryInfo<Q> {     pub query: Q, } -pub type QueryMap<Q> = FxHashMap<QueryJobId, QueryJobInfo<Q>>;+pub(crate) type QueryMap<D, Q> = FxHashMap<QueryJobId<D>, QueryJobInfo<D, Q>>;  /// A value uniquely identifiying an active query job within a shard in the query cache. #[derive(Copy, Clone, Eq, PartialEq, Hash)] pub struct QueryShardJobId(pub NonZeroU32);  /// A value uniquely identifiying an active query job. #[derive(Copy, Clone, Eq, PartialEq, Hash)]-pub struct QueryJobId {+pub struct QueryJobId<D> {     /// Which job within a shard is this     pub job: QueryShardJobId,      /// In which shard is this job     pub shard: u16,++    /// What kind of query this job is.+    //FIXME: This seems to be unused, but removing it changes query cycle errors.+    pub kind: D,

What if its used by the Eq impl?

Julian-Wollersberger

comment created time in 12 days

PullRequestReviewEvent

push eventcjgillot/rust

Julian Wollersberger

commit sha b3de02a9b550e6a7da3172d031645143726d0ca8

Removed the wrapper around `call_query()`.

view details

Camille Gillot

commit sha 62efb4db7340e4d574b56a206532193732b61387

Merge pull request #1 from Julian-Wollersberger/query-merge Removed the wrapper around `call_query()`.

view details

push time in 12 days

PR merged cjgillot/rust

Removed the wrapper around `call_query()`.

Small change to rust-lang/rust#77833.

+3 -16

1 comment

2 changed files

Julian-Wollersberger

pr closed time in 12 days

pull request commentcjgillot/rust

Removed the wrapper around `call_query()`.

Thanks.

Julian-Wollersberger

comment created time in 12 days

pull request commentrust-lang/rust

Use a single function for query manipulations

LLVM-lines was the target, but perf is bad. Bootstrap times are not a win either. This definitely needs more work.

cjgillot

comment created time in 14 days

Pull request review commentrust-lang/rust

Use a single function for query manipulations

 macro_rules! define_queries_inner {             ) -> Self::Value {                 handle_cycle_error!([$($modifiers)*][tcx, error])             }+        }++        impl queries::$name<$tcx> {+            $(#[$attr])*+            #[inline(always)]+            pub fn query(+                tcx: TyCtxt<$tcx>,+                span: Span,+                key: query_keys::$name<$tcx>,+                caller: QueryCaller<DepKind>,+            ) -> Option<<queries::$name<$tcx> as QueryConfig<TyCtxt<$tcx>>>::Stored> {+                call_query::<queries::$name<'_>, _>(tcx, span, key, caller)

The point is to monomorphize call_query only once for each query. The easiest way is to call it through a monomorphic function.

cjgillot

comment created time in 14 days

PullRequestReviewEvent

PR opened rust-lang/rust

Use a single function for query manipulations

There are three ways to invoke a query: get the value, ensure it runs, or have it automatically forced.

The three corresponding methods are merged into a single a single point of entry. The goal is to increase the code sharing between the three cases.

+129 -119

0 comment

3 changed files

pr created time in 15 days

PR opened rust-lang/rust

Simplify query proc-macros

The query code generation is split between proc-macros and regular macros in rustc_middle::ty::query.

This PR removes unused capabilities of the proc-macros, and tend to use regular macros for the logic.

+72 -113

0 comment

6 changed files

pr created time in 15 days

push eventcjgillot/rust

follower

commit sha e4943ac81163db364bd8c8ad1ea9c65b4adabcd3

Link to documentation-specific guidelines. Changed because it's not obvious how to get from the previously used URL to the documentation-specific content. This is partly because the original URL was previously changed to point to different content: * https://github.com/rust-lang/rust/pull/74037/files#diff-242481015141f373dcb178e93cffa850L88 * https://github.com/rust-lang/rust/commit/3f6928f1f6eff367e6ddbfb63ebc5e568ffe0eb1#diff-6a3371457528722a734f3c51d9238c13L12

view details

Ivan Tham

commit sha 1994cee61a4aea9dc46bb3d0323c8290621eda33

Add alias for iterator fold fold is known in python and javascript as reduce, not sure about inject but it was written in doc there.

view details

Ivan Tham

commit sha ea0065ad4f96153539476e2f3df83bae96018ede

Reposition iterator doc alias reduce before inline

view details

Frank

commit sha 1479c18396d764482aa0e56b372c5f57a97c102b

add disallowed_method lint

view details

Frank

commit sha 12e5637f757f4fd4cc2331619ebeca59934a910d

update unused variable

view details

Frank

commit sha f4d88cbb1f150e94c613fdd082c5bf8418443804

run cargo dev update_lints

view details

Frank

commit sha e1b3f85e984c9d4fba3ef5360892c88990b8391d

run cargo dev fmt

view details

Frank

commit sha 9eb52d2eb6c3812367276bc19c23f5d7368de664

update toml_unknown_key test

view details

Frank

commit sha 725a0ef8b1948e459d266cd0ab33dda0c8bc3708

change config variables to reference, remove wildcard import

view details

Frank

commit sha 3886edb05a2b570664f7249620766582e55a74aa

fix error message

view details

Frank

commit sha f9da2946d81a973b3c25aa5f4739ac7e05c27278

update error message, refactor disallowed_method

view details

Frank

commit sha d18653158ddde023f8165ef7ba3c607661398abf

remove useless test, update disallowed_method description

view details

Frank

commit sha 5f7b6437587bb0eda69c754ff52f92ed6eba2d72

update lint description

view details

bors

commit sha 10ef7f9ebf8a497fe2ef8aa0d32b3776e85134a1

Auto merge of #77157 - tmiasko:simplify-cfg-dup, r=jonas-schievink Remove duplicated SimplifyCfg pass

view details

Dylan MacKenzie

commit sha 0d2521aaf7548f0de6c227ef68eae76df4420c03

Add `const_fn_floating_point_arithmetic`

view details

Dylan MacKenzie

commit sha 2049052cb9880c97bb289a086815576f5aabc6c9

Put floating point arithmetic behind its own feature gate This refactors handling of `Rvalue::{Unary,Binary}Op` in the const-checker. Now we `span_bug` if there's an unexpected type in a primitive operation. This also allows unary negation on `char` values through the const-checker because it makes the code a bit cleaner. `char` does not actually support these operations, and if it did, we could evaluate them at compile-time.

view details

Dylan MacKenzie

commit sha 6a52c094408370a3bd60ed0976211995ef52fc23

Add new feature gate to standard library

view details

Dylan MacKenzie

commit sha b428f287c3ddb951450bc5f94cf3a5e38a59e3d6

Bless tests

view details

Dylan MacKenzie

commit sha 4cac90c968774b799697d5ce18da75483dc2f15b

Move const fn floating point test out of `min_const_fn`

view details

Dylan MacKenzie

commit sha 659028f48b7b47ee3e16a4d110b1379ed8524121

Use proper issue for `const_fn_floating_point_arithmetic`

view details

push time in 15 days

create barnchcjgillot/rust

branch : remacro

created branch time in 15 days

push eventcjgillot/rust

Matt Brubeck

commit sha b4b383981abac7ca8aa180c7ae3e28876615b887

Add PartialEq impls for Vec <-> slice

view details

kadmin

commit sha 8894b366fdb976a703fe76010f6e56c591cada1f

Remove error message in specific case In the case that a trait is not implemented for an ADT with type errors, cancel the error.

view details

Cassandra Fridkin

commit sha a009e2838b25df2761093d727d322a59f69d8f68

There isn't a way to pass --remove yet, but you can rm if u like

view details

Alexis Bourget

commit sha 492826ac144666c75d68bc0a0121453ecc08561f

Add a note about the panic behavior of math operations on time objects

view details

Tim Nielens

commit sha 390a13b06c79d4177b829097b06453e38188081f

needless-lifetime - fix nested elision site FPs

view details

Tim Nielens

commit sha a60e5de90c7370d4fb3e6561d3cb55495cda2e2a

needless-lifetime / nested elision sites / PR remarks

view details

Tim Nielens

commit sha c8e9e52303da6dff4bc5cc4db3021d608fca6c70

needless-lifetime / add test cases for nested elision sites

view details

Takayuki Nakata

commit sha 1778a1ec4615a42a8ba9497006b07859186c08a1

Restrict `same_item_push` to suppress false positives It emits a lint when the pushed item is a literal, a constant and an immutable binding that are initialized with those.

view details

Takayuki Nakata

commit sha 0117ea2b016133145f9e02e27421ac3672b42f57

Refactoring: use inner function

view details

Takayuki Nakata

commit sha b80576fba633e1fc214c9f6900d7ca3424bda6d0

Some refactoring

view details

Takayuki Nakata

commit sha 14faebe20ea82392f393c3ff5efaab7250e51989

Add some tests to `same_item_push` Add tests in which the variable is initialized with a match expression and function call

view details

Takayuki Nakata

commit sha 2972ad3ef661071531a61ec8999b668a6b734b74

Refactoring: tests in `same_item_push`

view details

Takayuki Nakata

commit sha 730ca457f580247667ed0cd5965bc08752ebc0b3

Address `items_after_statement`

view details

Dylan MacKenzie

commit sha 72b402ed38f0c71461038aef8a49a02e49280788

Add pass names to some common dataflow analyses

view details

Hanif Bin Ariffin

commit sha dc655b28424549a4775bc2e8c9021d44482bccb1

Prevent stackoverflow

view details

LingMan

commit sha a6ff925f8b5598a1f6d84964525baa1d4a08fd63

Reduce boilerplate with the matches! macro Replaces simple bool `match`es of the form match $expr { $pattern => true _ => false } and their inverse with invocations of the matches! macro.

view details

rail

commit sha 5e393c7747d081c45414060f81016e9ea3cb961f

Fix a FP in `explicit_counter_loop` Fix a false positive in `explicit_counter_loop` where the loop counter is used after incremented, adjust the test so that counters are incremented at the end of the loop and add the test for this false positive.

view details

Eduardo Broto

commit sha 3e294b22a43be349262405715cf4885296c284ba

Revert "or_fn_call: ignore nullary associated const fns" This reverts commit 7a66e6502dc3c7085b3f4078c01d4957d96175ed.

view details

Eduardo Broto

commit sha ce83d8d4d1b28e73888a616d3ffbf19c6a620588

Revert "Avoid or_fun_call for const_fn with no args" This reverts commit 5d66bd7bb3fd701d70ec11217e3f89fabe5cb0a7.

view details

Eduardo Broto

commit sha 9365660a2fc57210996df733efe468019c671b2f

unnecessary sort by: avoid dereferencing closure param

view details

push time in 15 days

create barnchcjgillot/rust

branch : query-merge

created branch time in 16 days

PR closed rust-lang/rust

Remove Spans from HIR S-waiting-on-author

This PR is an experiment in removing the Span information from the HIR tree. I plan to submit a MCP if this PR is considered relevant.

The spans are stored in a side table, indexed by HirId, and constructed during lowering. A dedicated query is created to retrieve those spans.

Subsequent commits gradually remove spans from HIR nodes. Those are quite mechanical, and don't deserve close examination before the MCP is accepted.

The point of this PR is to limit HIR invalidation due to span info changing. At this stage, there are still a lot of spans in the HIR. I do not think we will see benefits while there are some.

Anyway, I would like to get a few comment wrt. the soundness of the approach.

+3712 -2935

36 comments

269 changed files

cjgillot

pr closed time in 22 days

PR closed rust-lang/rust

Remove Spans from HIR -- 2/N -- Small HIR nodes S-waiting-on-author

Second step in rust-lang/compiler-team#294 Builds on #72878 Split out of #72015

This PR gradually removes spans from HIR nodes with low usage. Along the way, HIR visiting stops passing the spans to the visitor.

+1277 -958

6 comments

117 changed files

cjgillot

pr closed time in 22 days

delete branch cjgillot/rust

delete branch : clean-cache

delete time in 3 months

delete branch cjgillot/rust

delete branch : rename-depkind

delete time in 3 months

pull request commentrust-lang/rust

Rename rustc_middle::cstore::DepKind to CrateDepKind

Searching for uses of dep_graph::DepKind requires to filter out this other type. In addition, this requires some import gymnastics to avoid having both conflict.

cjgillot

comment created time in 3 months

push eventcjgillot/rust

Camille GILLOT

commit sha 4d4b8f2d4179cf29089c58e0d9a81c8945af4f4a

Rename rustc_middle::cstore::DepKind to DependencyKind.

view details

push time in 3 months

PR opened rust-lang/rust

Introduce an abstraction for EvaluationCache and SelectionCache

The small duplicated code has been moved to librustc_query_system.

The remaining changes are some cleanups of structural impls.

+145 -367

0 comment

8 changed files

pr created time in 3 months

PR opened rust-lang/rust

Rename rustc_middle::cstore::DepKind to DependencyKind.

It is ambiguous with DepGraph's own DepKind.

+35 -35

0 comment

7 changed files

pr created time in 3 months

create barnchcjgillot/rust

branch : clean-cache

created branch time in 3 months

create barnchcjgillot/rust

branch : rename-depkind

created branch time in 3 months

push eventcjgillot/rust

Manish Goregaokar

commit sha ef3dc09fa7078d36ea5831ee9a3eb5c335cdb2f3

Rollup merge of #73989 - RalfJung:ub-enum-test, r=oli-obk adjust ub-enum test to be endianess-independent @cuviper noted that our test fails on "other" endianess systems (I never know which is which^^), so let's fix that.

view details

Manish Goregaokar

commit sha 2ae7d8cdba4ee8584bdcdcd22699d151a6b8959f

Rollup merge of #74045 - tmiasko:config-debug, r=nikomatsakis Explain effects of debugging options from config.toml

view details

Manish Goregaokar

commit sha 427ef98bc3ed87190f389bebc64cc76604c0213a

Rollup merge of #74076 - sunfishcode:wasi-fileext-newmethods, r=alexcrichton Add `read_exact_at` and `write_all_at` to WASI's `FileExt` This adds `read_exact_at` and `write_all_at` to WASI's `FileExt`, similar to the Unix versions of the same names.

view details

Manish Goregaokar

commit sha 2da709ea212871674800c3808e548d756cdca249

Rollup merge of #74099 - jonhoo:deque-range, r=dtolnay Add VecDeque::range* methods This patch adds `VecDeque::range` and `VecDeque::range_mut` to provide iterators over a sub-range of a `VecDeque`. This behavior can be emulated with `skip` and `take`, but directly providing a `Range` is more ergonomic. This also partially makes up for `VecDeque`'s lack of `SliceIndex` support.

view details

Manish Goregaokar

commit sha 3a6209cd706179f7cb639f5688adad5b0dd3ad1c

Rollup merge of #74100 - lzutao:strip-bootstrap, r=Mark-Simulacrum Use str::strip* in bootstrap This is technically a breaking change, replacing the use of `trim_start_matches` with `strip_prefix`. However, because in `rustc -Vv` output there are no lines starting with multiple "release:", this should go unnoticed in practice.

view details

Manish Goregaokar

commit sha fa50a878f5a23411dabcb4ab4a0450ab3a748826

Rollup merge of #74103 - ajpaverd:cfguard-msvc-only, r=nikomatsakis Only add CFGuard on `windows-msvc` targets As @ollie27 pointed out in #73893, the `cfguard` module flag causes incorrect behavior on `windows-gnu` targets. This patch restricts rustc to only add this flag for `windows-msvc` targets (this may need to be changed if other linkers gain support for CFGuard).

view details

Manish Goregaokar

commit sha 8efa197ee4477340095f7455dde2de2c990cace0

Rollup merge of #74109 - nbdd0121:issue-74082, r=petrochenkov Only allow `repr(i128/u128)` on enum Fixes #74082

view details

Manish Goregaokar

commit sha eb1754efec623c7d712104421a58ef61f6e54fe4

Rollup merge of #74122 - nnethercote:startup-cleanup, r=petrochenkov Start-up clean-up r? @petrochenkov

view details

Manish Goregaokar

commit sha 8355024ed0cda6b041bc0adb2ca17193946b6c8e

Rollup merge of #74125 - ayazhafiz:i/74050, r=matthewjasper Correctly mark the ending span of a match arm Closes #74050 r? @matthewjasper

view details

Manish Goregaokar

commit sha d2f8c30951581fa35bde0dbdd3260c5019b50421

Rollup merge of #74127 - tamird:allowlist, r=oli-obk Avoid "whitelist" Other terms are more inclusive and precise.

view details

Manish Goregaokar

commit sha cc3b57fa519c20b03675121aef7bc8b0d7125bd0

Rollup merge of #74129 - matklad:rust-analyzer-2020-07-07, r=Mark-Simulacrum :arrow_up: rust-analyzer This updates rust-analyzer submodule to the latest release. I plan to do that every Monday after rust-analyzer release (about 16:00 CET). This is semi-automated by https://github.com/rust-analyzer/rust-analyzer/pull/5253/files#diff-c06f6a9cbd0ad2421bcc2ddc28805457R77-R100. Who would be the appropriate person to r? on Mondays?

view details

Manish Goregaokar

commit sha b43c26eb9d8ccd830204c7317e9e46241a2dc432

Rollup merge of #74135 - ehuss:update-books, r=ehuss Update books ## book 3 commits in 4e7c00bece1544d409312ec93467beb62b5bd0cb..84a31397b34f9d405df44f2899ff17a4828dba18 2020-06-19 09:39:12 -0400 to 2020-07-04 10:50:18 -0500 - Update Windows install instructions (rust-lang/book#2389) - Update ch01-02-hello-world.md (rust-lang/book#2386) - bump mdbook version in github action (rust-lang/book#2380) ## reference 2 commits in 04d5d5d7ba624b6f5016298451f3a63d557f3260..0ea7bc494f1289234d8800bb9185021e0ad946f0 2020-06-16 15:08:05 -0700 to 2020-07-02 15:33:04 -0700 - Fix mis-capitalization of type name. (rust-lang-nursery/reference#844) - Fix name of trait for array indexing. (rust-lang-nursery/reference#840) ## embedded-book 1 commits in 616962ad0dd80f34d8b802da038d0aed9dd691bb..94d9ea8460bcbbbfef1877b47cb930260b5849a7 2020-06-23 16:03:45 +0000 to 2020-07-05 14:17:40 +0000 - Note on transformation of static variables by attribute exception (rust-embedded/book#251) ## rust-by-example 1 commits in 6f94ccb48da6fa4ed0031290f21411cf789f7d5e..229c6945a26a53a751ffa4f9cb418388c00029d3 2020-06-20 17:51:30 -0300 to 2020-07-06 10:13:15 -0300 - Modify comments (rust-lang/rust-by-example#1359)

view details

Manish Goregaokar

commit sha 8f2304f0c4fa7ffd5fa912e12c90403382c55d00

Rollup merge of #74145 - michaelforney:rust-installer, r=Mark-Simulacrum Update rust-installer to latest version This pulls in a fix for the install script on some tr(1) implementations, as well as an update to use `anyhow` instead of `failure` for error handling.

view details

Manish Goregaokar

commit sha 8376fcd5ce17c9187a08f5bfef56ea36d2a54cf4

Rollup merge of #74161 - tblah:riscv64gc-dockerfile-improvment, r=Mark-Simulacrum Fix disabled dockerfiles When the dockerfiles were moved into the host-x86_64 directory, paths for COPY commands were updated with the new host-x86_64/ prefix. This suggested that the intended context was src/ci/docker. However, the context for disabled docker images was src/ci/docker/host-x86_64. This broke the new paths and prevented src/ci/docker/scripts from being included in the context at all. This commit corrects this context allowing docker to find the files it needs for COPY commands. Also includes a quick fix to riscv recommended by @bjorn3

view details

Manish Goregaokar

commit sha 79fc3861dfd1190b257ef7f4208533c3945254b7

Rollup merge of #74162 - lcnr:ToPredicate-no-ref, r=varkor take self by value in ToPredicate

view details

bors

commit sha 346aec9b02f3c74f3fce97fd6bda24709d220e49

Auto merge of #74235 - Manishearth:rollup-bgs3q14, r=Manishearth Rollup of 19 pull requests Successful merges: - #71322 (Accept tuple.0.0 as tuple indexing (take 2)) - #72303 (Add core::future::{poll_fn, PollFn}) - #73862 (Stabilize casts and coercions to `&[T]` in const fn) - #73887 (stabilize const mem::forget) - #73989 (adjust ub-enum test to be endianess-independent) - #74045 (Explain effects of debugging options from config.toml) - #74076 (Add `read_exact_at` and `write_all_at` to WASI's `FileExt`) - #74099 (Add VecDeque::range* methods) - #74100 (Use str::strip* in bootstrap) - #74103 (Only add CFGuard on `windows-msvc` targets) - #74109 (Only allow `repr(i128/u128)` on enum) - #74122 (Start-up clean-up) - #74125 (Correctly mark the ending span of a match arm) - #74127 (Avoid "whitelist") - #74129 (:arrow_up: rust-analyzer) - #74135 (Update books) - #74145 (Update rust-installer to latest version) - #74161 (Fix disabled dockerfiles) - #74162 (take self by value in ToPredicate) Failed merges: r? @ghost

view details

Oliver Scherer

commit sha dd872be5da0887d800ae9a001ec212c7161f661c

Stabilize `transmute` in constants and statics but not const fn

view details

Oliver Scherer

commit sha 1eb0053dcddcb55e46f8ba5b4083f7a3f5872be0

Stabilize `transmute` in constants and statics but not const fn

view details

Dennis Hamester

commit sha 689e360d8273ed13e433ce3e7ae1046e33894234

test: rustdoc-ui: Add issue-74134, replacing test/rustdoc/issue-74134-* As per the discussion in PR #74147, the 4 individual tests are replaced by a single one. The test is expanded to cover all 4 public/private cases, each with and without --document-private-items.

view details

Dennis Hamester

commit sha 97048595e1e7bf3fc270ecf14ccaaac4cc71a241

test: rustdoc-ui: Expand issue-74134 to cover types in a private module

view details

push time in 3 months

push eventcjgillot/rust

Manish Goregaokar

commit sha 089a6e15f662cf4eaa502bbe84504dedc6fc4b0d

Rollup merge of #74146 - RalfJung:miri, r=RalfJung update miri Fixes https://github.com/rust-lang/rust/issues/74132 Cc @rust-lang/miri r? @ghost

view details

Manish Goregaokar

commit sha d4d11118ef55501a73d423651e45c0102afd0209

Rollup merge of #74150 - tamird:blocklist, r=nikomatsakis Avoid "blacklist" Other terms are more inclusive and precise. Clippy still has a lint named "blacklisted-name", but renaming it would be a breaking change, so is left for future work. The target configuration option "abi-blacklist" has been depreciated and renamed to "unsupported-abis". The old name continues to work.

view details

Manish Goregaokar

commit sha 31d53decd06f9cd854bbfe11f03abcd398e396b6

Rollup merge of #74184 - Manishearth:doc-intra-doc, r=GuillaumeGomez Add docs for intra-doc-links Fixes https://github.com/rust-lang/rust/issues/66000 Hmm, for some reason my push closed the previous PR

view details

Manish Goregaokar

commit sha 9353e21bfdea148e910b2530270a3418db836bf3

Rollup merge of #74188 - estebank:tweak-ascription-typo-heuristic, r=petrochenkov Tweak `::` -> `:` typo heuristic and reduce verbosity Do not trigger on correct type ascription expressions with trailing operators and _do_ trigger on likely path typos where a turbofish is used. On likely path typos, remove note explaining type ascription. Clean up indentation. r? @petrochenkov

view details

Guillaume Gomez

commit sha 970174a1e5d45f82608fdc220de99f34eccb2008

Add option to collapse automatically implementors

view details

Esteban Küber

commit sha 520fb92c33e8f446349c76103da5b204ff2ad9dc

Reword incorrect `self` token suggestion

view details

bors

commit sha e59b08e62ea691916d2f063cac5aab4634128022

Auto merge of #74195 - Manishearth:rollup-h3m0sl8, r=Manishearth Rollup of 14 pull requests Successful merges: - #73292 (Fixing broken link for the Eq trait) - #73791 (Allow for parentheses after macro intra-doc-links) - #74070 ( Use for<'tcx> fn pointers in Providers, instead of having Providers<'tcx>.) - #74077 (Use relative path for local links to primitives) - #74079 (Eliminate confusing "globals" terminology.) - #74107 (Hide `&mut self` methods from Deref in sidebar if there are no `DerefMut` impl for the type.) - #74136 (Fix broken link in rustdocdoc) - #74137 (Update cargo) - #74142 (Liballoc use vec instead of vector) - #74143 (Try remove unneeded ToString import in liballoc slice) - #74146 (update miri) - #74150 (Avoid "blacklist") - #74184 (Add docs for intra-doc-links) - #74188 (Tweak `::` -> `:` typo heuristic and reduce verbosity) Failed merges: - #74122 (Start-up clean-up) - #74127 (Avoid "whitelist") r? @ghost

view details

Yuki Okushi

commit sha 6864546049d8f41b0521ee7dc5dedac4850f6c88

Add a help to use `in_band_lifetimes` in nightly

view details

Yuki Okushi

commit sha a9b64766a47ce7a0ad6768b7a74bae7fa991576e

Tweak wording

view details

Nicholas Nethercote

commit sha 0a7d2970e5947e7a2940a32e6975817a389b0708

Eliminate `rust_input`. It has a single call site and having it as a separate (higher-order!) function makes the code harder to read.

view details

Nicholas Nethercote

commit sha 1e8ec2db1d3d695958a8040fbb3491a4378ef7ae

Add an explanatory comment to `scoped_thread`.

view details

Nicholas Nethercote

commit sha 4ad5de22d182578e846a6ccc69940e76a820381c

Tweak `spawn_thread_pool`. This makes the two versions (parallel and non-parallel) more similar to each other.

view details

Nicholas Nethercote

commit sha bf7078615b868f7359bff58933fd5236fabe7280

Change some function names. A couple of these are quite long, but they do a much better job of explaining what they do, which was non-obvious before.

view details

Lzu Tao

commit sha 481988b0832de4b28fd1f4a52f0df2801f62bda8

Use str::strip* in bootstrap This commit replaces the use of `trim_start_matches` because in `rustc -Vv` output there are no lines starting with multiple "release:".

view details

Ivan Tham

commit sha 1fb0ed0e2ce788d8f69969bdb81967ca3c9a7f26

Minor refactor for rustc_resolve diagnostics match Use `matches!` instead of old `if let`

view details

Andrew Paverd

commit sha 1ca7bfe481a18909e4769a9f6aee58f8cec17b44

Only add cfguard module flag on windows-msvc

view details

Caio

commit sha c3756927478afe8d3a880edc469afd766c2f9e82

Remove some Default impls

view details

Tamir Duberstein

commit sha 62cf767a4a39b47677d18110359d9e7152dc9d1c

Avoid "whitelist" Other terms are more inclusive and precise.

view details

Tamir Duberstein

commit sha cf91c54cc6e20462bf6c5c63a3ab0b6afe8b7f0e

Avoid "whitelist" Other terms are more inclusive and precise.

view details

Christian Duerr

commit sha 298a1fa3bd8ec04350b1bff6a6d92e34abf2e198

Move range_minus_one to pedantic This moves the range_minus_one lint to the pedantic category, so there will not be any warnings emitted by default. This should work around problems where the suggestion is impossible to resolve due to the range consumer only accepting a specific range implementation, rather than the `RangeBounds` trait (see #3307). While it is possible to work around this by extracting the boundary into a variable, I don't think clippy should encourage people to disable or work around lints, but instead the lints should be fixable. So hopefully this will help until a proper implementation checks what the range is used for.

view details

push time in 3 months

push eventcjgillot/rust

Erik Desjardins

commit sha 23d7b3f6f1a345ad95f0812c85613627164b6c39

Remove an unwrap in layout computation

view details

Mohsen Zohrevandi

commit sha 1466598e19321bc6b97aef8271a317e78211d54d

Address review comments

view details

Manish Goregaokar

commit sha ec1e7e9dbc83e57da7809cfc32c01e881b42555b

Rollup merge of #71322 - petrochenkov:tuple00, r=nikomatsakis Accept tuple.0.0 as tuple indexing (take 2) If we expect something identifier-like when parsing a field name after `.`, but encounter a float token, we break that float token into parts, similarly to how we break `&&` into `&` `&`, or `<<` into `<` `<`, etc. An alternative to https://github.com/rust-lang/rust/pull/70420.

view details

Manish Goregaokar

commit sha d82588b45aa866418a3cc88924e939015fd1bd1c

Rollup merge of #72303 - yoshuawuyts:future-poll-fn, r=dtolnay Add core::future::{poll_fn, PollFn} This is a sibling PR to #70834, adding `future::poll_fn`. This is a small helper function that helps bridge the gap between "poll state machines" and "async/await". It was first introduced in [futures@0.1.7](https://docs.rs/futures/0.1.7/futures/future/fn.poll_fn.html) in December of 2016, and has been tried and tested as part of the ecosystem for the past 3.5 years. ## Implementation Much of the same reasoning from #70834 applies: by returning a concrete struct rather than an `async fn` we get to mark the future as `Unpin`. It also becomes named which allows storing it in structs without boxing. This implementation has been modified from the implementation in `futures-rs`. ## References - [`futures::future::poll_fn`](https://docs.rs/futures/0.3.5/futures/future/fn.poll_fn.html) - [`async_std::future::poll_fn`](https://docs.rs/async-std/1.5.0/async_std/future/fn.poll_fn.html)

view details

Manish Goregaokar

commit sha f4f969027c6378264be509ba5ae512e35258f2e5

Rollup merge of #73862 - oli-obk:const_array_to_slice, r=RalfJung Stabilize casts and coercions to `&[T]` in const fn Part of #64992 There was never a reason to not stabilize this, we just accidentally prevented them when we implemented the `min_const_fn` feature that gave us `const fn` on stable. This PR stabilizes these casts (which are already stable in `const` outside `const fn`), while keeping all other unsizing casts (so `T` -> `dyn Trait`) unstable within const fn. These casts have no forward compatibility concerns with any future features for const eval and users were able to use them under the `const_fn` feature gate already since at least the miri merger, possibly longer. r? @rust-lang/lang

view details

Manish Goregaokar

commit sha efda2b58b095306d068a3a165de62acd1e94911b

Rollup merge of #73887 - DutchGhost:master, r=oli-obk stabilize const mem::forget Stabilizes const `mem::forget` as implemented in https://github.com/rust-lang/rust/pull/69617 and tracked in https://github.com/rust-lang/rust/issues/69616. Closes https://github.com/rust-lang/rust/issues/69616

view details

Manish Goregaokar

commit sha ef3dc09fa7078d36ea5831ee9a3eb5c335cdb2f3

Rollup merge of #73989 - RalfJung:ub-enum-test, r=oli-obk adjust ub-enum test to be endianess-independent @cuviper noted that our test fails on "other" endianess systems (I never know which is which^^), so let's fix that.

view details

Manish Goregaokar

commit sha 2ae7d8cdba4ee8584bdcdcd22699d151a6b8959f

Rollup merge of #74045 - tmiasko:config-debug, r=nikomatsakis Explain effects of debugging options from config.toml

view details

Manish Goregaokar

commit sha 427ef98bc3ed87190f389bebc64cc76604c0213a

Rollup merge of #74076 - sunfishcode:wasi-fileext-newmethods, r=alexcrichton Add `read_exact_at` and `write_all_at` to WASI's `FileExt` This adds `read_exact_at` and `write_all_at` to WASI's `FileExt`, similar to the Unix versions of the same names.

view details

Manish Goregaokar

commit sha 2da709ea212871674800c3808e548d756cdca249

Rollup merge of #74099 - jonhoo:deque-range, r=dtolnay Add VecDeque::range* methods This patch adds `VecDeque::range` and `VecDeque::range_mut` to provide iterators over a sub-range of a `VecDeque`. This behavior can be emulated with `skip` and `take`, but directly providing a `Range` is more ergonomic. This also partially makes up for `VecDeque`'s lack of `SliceIndex` support.

view details

Manish Goregaokar

commit sha 3a6209cd706179f7cb639f5688adad5b0dd3ad1c

Rollup merge of #74100 - lzutao:strip-bootstrap, r=Mark-Simulacrum Use str::strip* in bootstrap This is technically a breaking change, replacing the use of `trim_start_matches` with `strip_prefix`. However, because in `rustc -Vv` output there are no lines starting with multiple "release:", this should go unnoticed in practice.

view details

Manish Goregaokar

commit sha fa50a878f5a23411dabcb4ab4a0450ab3a748826

Rollup merge of #74103 - ajpaverd:cfguard-msvc-only, r=nikomatsakis Only add CFGuard on `windows-msvc` targets As @ollie27 pointed out in #73893, the `cfguard` module flag causes incorrect behavior on `windows-gnu` targets. This patch restricts rustc to only add this flag for `windows-msvc` targets (this may need to be changed if other linkers gain support for CFGuard).

view details

Manish Goregaokar

commit sha 8efa197ee4477340095f7455dde2de2c990cace0

Rollup merge of #74109 - nbdd0121:issue-74082, r=petrochenkov Only allow `repr(i128/u128)` on enum Fixes #74082

view details

Manish Goregaokar

commit sha eb1754efec623c7d712104421a58ef61f6e54fe4

Rollup merge of #74122 - nnethercote:startup-cleanup, r=petrochenkov Start-up clean-up r? @petrochenkov

view details

Manish Goregaokar

commit sha 8355024ed0cda6b041bc0adb2ca17193946b6c8e

Rollup merge of #74125 - ayazhafiz:i/74050, r=matthewjasper Correctly mark the ending span of a match arm Closes #74050 r? @matthewjasper

view details

Manish Goregaokar

commit sha d2f8c30951581fa35bde0dbdd3260c5019b50421

Rollup merge of #74127 - tamird:allowlist, r=oli-obk Avoid "whitelist" Other terms are more inclusive and precise.

view details

Manish Goregaokar

commit sha cc3b57fa519c20b03675121aef7bc8b0d7125bd0

Rollup merge of #74129 - matklad:rust-analyzer-2020-07-07, r=Mark-Simulacrum :arrow_up: rust-analyzer This updates rust-analyzer submodule to the latest release. I plan to do that every Monday after rust-analyzer release (about 16:00 CET). This is semi-automated by https://github.com/rust-analyzer/rust-analyzer/pull/5253/files#diff-c06f6a9cbd0ad2421bcc2ddc28805457R77-R100. Who would be the appropriate person to r? on Mondays?

view details

Manish Goregaokar

commit sha b43c26eb9d8ccd830204c7317e9e46241a2dc432

Rollup merge of #74135 - ehuss:update-books, r=ehuss Update books ## book 3 commits in 4e7c00bece1544d409312ec93467beb62b5bd0cb..84a31397b34f9d405df44f2899ff17a4828dba18 2020-06-19 09:39:12 -0400 to 2020-07-04 10:50:18 -0500 - Update Windows install instructions (rust-lang/book#2389) - Update ch01-02-hello-world.md (rust-lang/book#2386) - bump mdbook version in github action (rust-lang/book#2380) ## reference 2 commits in 04d5d5d7ba624b6f5016298451f3a63d557f3260..0ea7bc494f1289234d8800bb9185021e0ad946f0 2020-06-16 15:08:05 -0700 to 2020-07-02 15:33:04 -0700 - Fix mis-capitalization of type name. (rust-lang-nursery/reference#844) - Fix name of trait for array indexing. (rust-lang-nursery/reference#840) ## embedded-book 1 commits in 616962ad0dd80f34d8b802da038d0aed9dd691bb..94d9ea8460bcbbbfef1877b47cb930260b5849a7 2020-06-23 16:03:45 +0000 to 2020-07-05 14:17:40 +0000 - Note on transformation of static variables by attribute exception (rust-embedded/book#251) ## rust-by-example 1 commits in 6f94ccb48da6fa4ed0031290f21411cf789f7d5e..229c6945a26a53a751ffa4f9cb418388c00029d3 2020-06-20 17:51:30 -0300 to 2020-07-06 10:13:15 -0300 - Modify comments (rust-lang/rust-by-example#1359)

view details

Manish Goregaokar

commit sha 8f2304f0c4fa7ffd5fa912e12c90403382c55d00

Rollup merge of #74145 - michaelforney:rust-installer, r=Mark-Simulacrum Update rust-installer to latest version This pulls in a fix for the install script on some tr(1) implementations, as well as an update to use `anyhow` instead of `failure` for error handling.

view details

Manish Goregaokar

commit sha 8376fcd5ce17c9187a08f5bfef56ea36d2a54cf4

Rollup merge of #74161 - tblah:riscv64gc-dockerfile-improvment, r=Mark-Simulacrum Fix disabled dockerfiles When the dockerfiles were moved into the host-x86_64 directory, paths for COPY commands were updated with the new host-x86_64/ prefix. This suggested that the intended context was src/ci/docker. However, the context for disabled docker images was src/ci/docker/host-x86_64. This broke the new paths and prevented src/ci/docker/scripts from being included in the context at all. This commit corrects this context allowing docker to find the files it needs for COPY commands. Also includes a quick fix to riscv recommended by @bjorn3

view details

push time in 3 months

push eventcjgillot/rust

Nicholas Nethercote

commit sha 0a7d2970e5947e7a2940a32e6975817a389b0708

Eliminate `rust_input`. It has a single call site and having it as a separate (higher-order!) function makes the code harder to read.

view details

Nicholas Nethercote

commit sha 1e8ec2db1d3d695958a8040fbb3491a4378ef7ae

Add an explanatory comment to `scoped_thread`.

view details

Nicholas Nethercote

commit sha 4ad5de22d182578e846a6ccc69940e76a820381c

Tweak `spawn_thread_pool`. This makes the two versions (parallel and non-parallel) more similar to each other.

view details

Nicholas Nethercote

commit sha bf7078615b868f7359bff58933fd5236fabe7280

Change some function names. A couple of these are quite long, but they do a much better job of explaining what they do, which was non-obvious before.

view details

Lzu Tao

commit sha 481988b0832de4b28fd1f4a52f0df2801f62bda8

Use str::strip* in bootstrap This commit replaces the use of `trim_start_matches` because in `rustc -Vv` output there are no lines starting with multiple "release:".

view details

Ivan Tham

commit sha 1fb0ed0e2ce788d8f69969bdb81967ca3c9a7f26

Minor refactor for rustc_resolve diagnostics match Use `matches!` instead of old `if let`

view details

Andrew Paverd

commit sha 1ca7bfe481a18909e4769a9f6aee58f8cec17b44

Only add cfguard module flag on windows-msvc

view details

Caio

commit sha c3756927478afe8d3a880edc469afd766c2f9e82

Remove some Default impls

view details

Tamir Duberstein

commit sha 62cf767a4a39b47677d18110359d9e7152dc9d1c

Avoid "whitelist" Other terms are more inclusive and precise.

view details

Tamir Duberstein

commit sha cf91c54cc6e20462bf6c5c63a3ab0b6afe8b7f0e

Avoid "whitelist" Other terms are more inclusive and precise.

view details

Christian Duerr

commit sha 298a1fa3bd8ec04350b1bff6a6d92e34abf2e198

Move range_minus_one to pedantic This moves the range_minus_one lint to the pedantic category, so there will not be any warnings emitted by default. This should work around problems where the suggestion is impossible to resolve due to the range consumer only accepting a specific range implementation, rather than the `RangeBounds` trait (see #3307). While it is possible to work around this by extracting the boundary into a variable, I don't think clippy should encourage people to disable or work around lints, but instead the lints should be fixable. So hopefully this will help until a proper implementation checks what the range is used for.

view details

Christian Duerr

commit sha ba2a85dadc61bbfeb483ca0d05ddfda213da1329

Run update_lints

view details

Jon Gjengset

commit sha a1a19cbbe1c17dc03ca689db002181c9bd95f529

Add tracking issue

view details

Pietro Albini

commit sha 34994a9ebc1d34be79031c2b5e857f9ad24f268e

ci: allow gating gha on everything but macOS In our GitHub Actions setup macOS is too unreliable to gate on it, but the other builders work fine. This commit splits the macOS builders into a separate job (called auto-fallible), allowing us to gate on the auto job without failing due to macOS spurious failures.

view details

bors

commit sha daecab3a784f28082df90cebb204998051f3557d

Auto merge of #74181 - pietroalbini:ci-gha-fallible-macos, r=Mark-Simulacrum Gate GHA on everything but macOS The macOS spurious failure started happening again. As we discussed during the infra team meeting, this gates on everything but macOS. r? @Mark-Simulacrum

view details

Guillaume Gomez

commit sha 2ca24b618e40e92f8061419928dcd0f1f15527e5

Add margin after doc search results

view details

Takayuki Nakata

commit sha 780a4c87de88d7f747c7847b71c90c8268fe4b66

Fix typo

view details

Christian Duerr

commit sha b3c719608d2c969323714517837f0c68aca23d81

Fix test failures

view details

Christian Duerr

commit sha afa4148cc6dee0f9e0ca5b33f2511b9305d84fcb

Fix tests a bit more

view details

bors

commit sha 7d611d92240d43d9a04cf8db0cb4fb5690f8249c

Auto merge of #5769 - robojumper:match_like_matches_macro, r=phansch new lint: match_like_matches_macro Suggests using the `matches!` macro from `std` where appropriate. `redundant_pattern_matching` has been moved into the `matches` pass to allow suppressing the suggestion where `is_some` and friends are a better replacement. changelog: new lint: `match_like_matches_macro`

view details

push time in 3 months

more