profile
viewpoint
Josh Stone cuviper Red Hat Portland, OR https://blog.cuviper.com AKA jistone

bluss/indexmap 523

A hash table with consistent order and fast iteration; access items by key or sequence index

bluss/either 158

The enum Either with variants Left and Right is a general purpose sum type with two cases.

agrover/froyo 59

A flexible and redundant long-term storage system for Linux, using DM and XFS

cuviper/autocfg 24

Automatic cfg for Rust compiler features

cuviper/alloc_geiger 11

A Rust allocator which makes sound when active, like a Geiger counter.

cuviper/android_device_htc_inc 2

WIP repo for CM Inc. Beware, this is where I break stuff...

cuviper/addr2line 0

A cross-platform `addr2line` clone written in Rust, using `gimli`

cuviper/alga 0

Abstract algebra for Rust.

cuviper/alphanumeric-sort 0

This crate can help you sort order for files and folders whose names contain numerals.

created tagbluss/either

tag1.6.0

The enum Either with variants Left and Right is a general purpose sum type with two cases.

created time in 7 hours

push eventbluss/either

Josh Stone

commit sha f1576093958b1ba6153c52fb8af8cf6afe244022

cargo fmt

view details

Josh Stone

commit sha 1f36d0901b2c2208e6cc54696b1221925b6b7309

Hide unknown bare_trait_objects for old rustc

view details

Josh Stone

commit sha 8e61186f32b4d153eb97a95e39f0acd2060fd8ad

Allow deprecated Error::description call

view details

Josh Stone

commit sha 4943fbbc0a84b81e8b954ffd6678a0f10e2417b4

Avoid deprecated try!

view details

Josh Stone

commit sha 89c0b2cc5ee34caa19de5fd70adf265e33e5cc74

Pattern-match untagged serialization directly It's more verbose, but it mirrors the deserialization.

view details

Josh Stone

commit sha 27a81dbb0fc07cecbb9b1198b246798e2c6180f5

Add spacing to the untagged examples

view details

Josh Stone

commit sha fd7188e2f099c2f64581f7045f770ee6b80c1a8b

Release 1.6.0

view details

Josh Stone

commit sha 1ed67aa0e548bdbc347107dec18a00368cbff339

Merge pull request #50 from cuviper/release-1.6.0 Release 1.6.0

view details

push time in 7 hours

PR merged bluss/either

Release 1.6.0

I also cleaned up formatting and fixed a few warnings.

+141 -75

0 comment

5 changed files

cuviper

pr closed time in 7 hours

PR opened bluss/either

Release 1.6.0

I also cleaned up formatting and fixed a few warnings.

+141 -75

0 comment

5 changed files

pr created time in 8 hours

create barnchcuviper/either

branch : release-1.6.0

created branch time in 8 hours

pull request commentrust-lang/rust

Upgrade to LLVM 11 (rc1)

That wasn't enough -- lld still needs libatomic explicitly added: https://reviews.llvm.org/D85691

cuviper

comment created time in 9 hours

PR closed bluss/either

Use Rust 2018

Changes the Rust edition to Rust 2018, and removes uses of the deprecated try! macro.

+6 -2

8 comments

2 changed files

4lDO2

pr closed time in 10 hours

pull request commentbluss/either

Use Rust 2018

FWIW, there's also futures::future::Either. We could still consider adding such features conditionally here, but hopefully not requiring 2018. Therefore, I'm going to close this, but thanks anyway!

4lDO2

comment created time in 10 hours

push eventbluss/either

Mikail Bagishov

commit sha e83db0e3be79c5edbe222f09b6613caf9107c404

Add special utitilies for serde untagged repr

view details

Mikail Bagishov

commit sha 44ca4041249f527f6a14b3d9e6412d10bc650535

address review

view details

Mikail Bagishov

commit sha 44a92ed49ed5f4f6fc045f7d8b35113a8f4b873a

fix doctest

view details

Mikail Bagishov

commit sha 293fb50e6ffe256bc1485bd3147d4b1c4e156420

pin serde too

view details

Josh Stone

commit sha fc8cd5ae2a1e87bc4e07613a6b231ed1056233fa

Unpin serde, instead downgrade in .travis.yml for 1.12

view details

Josh Stone

commit sha c5d0146996009759940821d1affb11bd3c893fd7

Merge pull request #49 from MikailBag/untagged Add special utitilies for serde untagged repr

view details

push time in 11 hours

PR merged bluss/either

Add special utitilies for serde untagged repr

Unfortunately, adding serde(untagged) to Either would be breaking change.

This PR instead provides two functions, that can be used in conjunction with serde(with) to achieve quite untagged representation at user choice.

+152 -3

4 comments

5 changed files

MikailBag

pr closed time in 11 hours

pull request commentbluss/either

Add special utitilies for serde untagged repr

Thanks!

MikailBag

comment created time in 11 hours

pull request commentrust-lang/rust

Upgrade to LLVM 11 (rc1)

That might be our fault from https://github.com/rust-lang/llvm-project/commit/2e00784cadfb7c977be7ca402cace9ac998a86c0, which is one of the (now-unnecessary) FreeBSD workarounds. I'm going to try reverting that, since as I mentioned I can't force-push the LLVM branch, but I'll build arm locally before I push that...

cuviper

comment created time in 11 hours

pull request commentrust-lang/rust

Upgrade to LLVM 11 (rc1)

I think it's from D80298, and probably missing -latomic on this target.

cuviper

comment created time in 11 hours

push eventMikailBag/either

Josh Stone

commit sha fc8cd5ae2a1e87bc4e07613a6b231ed1056233fa

Unpin serde, instead downgrade in .travis.yml for 1.12

view details

push time in 11 hours

Pull request review commentbluss/either

Add special utitilies for serde untagged repr

 serde = { version = "1.0", optional = true, features = ["derive"] } default = ["use_std"] use_std = [] +[dev-dependencies]+serde_json = "=1.0.0"+serde = "=1.0.0"

I'd rather not have these pinned down, but I understand you did that to get them to build on 1.12, since dev-dependencies aren't optional. I'm going to see if I can work around downgrades in the CI script, as I've done other crates...

MikailBag

comment created time in 11 hours

PR opened rust-lang/rustfmt

Fix "rusftmt" typos
+4 -4

0 comment

1 changed file

pr created time in 13 hours

push eventcuviper/rustfmt

Josh Stone

commit sha 2a164a55790276692889fbd3d7625c01e3bad635

Fix "rusftmt" typos

view details

push time in 13 hours

fork cuviper/rustfmt

Format Rust code

fork in 13 hours

push eventbluss/indexmap

Josh Stone

commit sha 132814cc9cac6df94fef4d17fc17917020ee33a2

Set 2018 edition in .rustfmt.toml The edition works automatically when running `cargo fmt`, but not when running `rustfmt` directly as some editors do.

view details

push time in 13 hours

pull request commentrust-lang/rust

Upgrade to LLVM 11 (rc1)

The FreeBSD 11 upgrade has landed. In my local tests, we don't even need the two existing freebsd workaround anymore, but I can't force-push the current branch, so I'll leave it alone for now. When we rebase to 11 final, we could drop those.

@bors r=nikic

cuviper

comment created time in 13 hours

issue openeddense-analysis/ale

Add support for LSP textDocument/formatting as a fixer

Name: LSP textDocument/formatting URL: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_formatting

Some language servers can format your code -- it would be nice to use this for ALEFix.

See also #2718 for textDocument/onTypeFormatting.

created time in 13 hours

pull request commentrust-lang/rust

Transmute big endian `s6_addr` and `[u16; 8]`

@bors retry rollup

lzutao

comment created time in 14 hours

pull request commentrust-lang/rust

Transmute big endian `s6_addr` and `[u16; 8]`

@bors r+

lzutao

comment created time in a day

delete branch cuviper/rust

delete branch : fused-chain

delete time in a day

delete branch cuviper/rust

delete branch : array-intoiter-ptr

delete time in a day

delete branch cuviper/rust

delete branch : array-intoiter

delete time in a day

delete branch cuviper/rust

delete branch : array-intoiter-const

delete time in a day

delete branch cuviper/rust

delete branch : fuse-covariant

delete time in a day

delete branch cuviper/rust

delete branch : beta-number

delete time in a day

delete branch cuviper/rust

delete branch : awailable

delete time in a day

delete branch cuviper/rust

delete branch : into_boxed_slice-unicast

delete time in a day

delete branch cuviper/rust

delete branch : try_find_map

delete time in a day

delete branch cuviper/rust

delete branch : llvm11

delete time in a day

delete branch cuviper/rust

delete branch : centos6

delete time in a day

delete branch cuviper/rust

delete branch : while-indexing

delete time in a day

delete branch cuviper/rust

delete branch : debian6

delete time in a day

delete branch cuviper/rust

delete branch : lto-bitcode-1.45

delete time in a day

delete branch cuviper/rust

delete branch : cloexec

delete time in a day

delete branch cuviper/rust

delete branch : relnotes-1.45.1

delete time in a day

delete branch cuviper/rust

delete branch : sliced-rchunk

delete time in a day

delete branch cuviper/rust

delete branch : array-iter

delete time in a day

delete branch cuviper/rust

delete branch : indexmap

delete time in a day

push eventcuviper/rust

Lzu Tao

commit sha 1314d31fb5974e8c32aa8d695a02d37c4ab4bd7e

Rewrite extract_version_range

view details

Tomasz Miąsko

commit sha 251878ebc4a86b3f9c94992d89c42d3a0a60cf68

Remove CC & CFLAGS from MemorySanitizer example They are now unnecessary for projects written in Rust, since backtrace-rs used by the standard library has only Rust dependencies.

view details

Tomasz Miąsko

commit sha 58b862072c97c17133f3b700b71edf69ce0a7efe

Document AddressSanitizer memory leak detection defaults

view details

Solomon Ucko

commit sha a462e7c1d08ba0babd18a4a71d1833839c3cd52d

Document `core::fmt::rt::v1::Count`

view details

Gabriel Smith

commit sha 69d5dd6a5023a21ae755381f28f8450227be6daf

disallow non-static lifetimes in const generics This has been put in place to patch over an ICE caused when we encounter a non-static lifetime in a const generic during borrow checking. This restriction may be relaxed in the future, but we need more discussion before then, and in the meantime we should still deal with this ICE. Fixes issue #60814

view details

Gabriel Smith

commit sha c60a0356585d7b0378f50b129e7c7bcfa739f640

Add test for an explicit non-'static lifetime in a const argument

view details

Jake Goulding

commit sha 57614da71560281c50c228a0028946f0389d8803

Teach bootstrap install and dist commands about TargetSelection With this, we can now use a target JSON file to build a cross-compiler: ``` x.py install --host ../aarch64-apple-darwin.json --target aarch64-apple-darwin ```

view details

Caleb Cartwright

commit sha 7dba34fd6b9a837300157608a90ce8d65d1490e5

tools: update rustfmt toolstate maintainers

view details

Adam Perry

commit sha 416dc4b978e5921cd0b20478a17f048dd378bdff

Clarify core::panic::Location's docs on ordering. Co-authored-by: Simon Sapin <simon.sapin@exyr.org>

view details

Dylan MacKenzie

commit sha 6100b74fbcf8da2122bd5ee4a9361965d8bf3429

Advertise correct stable version for const control flow

view details

Alexis Bourget

commit sha 471dd52d7710dcad5fec0cd731b836b02ba4a8f4

Fix merge conflict with recent PR

view details

Mark Rousskov

commit sha e24a0172b0df21b0bc17f3c9a16773d8889dd2b1

Only skip impls of foreign unstable traits Previously unstable impls were skipped, which meant that any impl with an unstable method would get skipped.

view details

Nicholas-Baron

commit sha 940ceb1a4368110df2d24e58896d3753d5596a33

Mentioned IntoIterator earlier in keyword 'for' docs

view details

Nicholas-Baron

commit sha 6c493df0f83c6114cddc1ad72929d1f9d4aded1e

Mentioned IntoIterator in keyword 'in' docs

view details

Nicholas-Baron

commit sha f268525d966a99ca6881d6f7dc18aafe85c6d28c

Linked the earlier mention of IntoIterator in the keyword 'for' docs

view details

Tim Nielens

commit sha c720d823e1e633cccfd24e1df76cc04a628e83b0

redundant_closure_call - don't lint when used more than once

view details

Tim Nielens

commit sha 0fecaf1abcbe8d4ba1a9c532b69aab6fab3097c8

redundant_closure_call - extract lint from misc_early.rs, adapt to LatePass

view details

Tim Nielens

commit sha 9603d9652b9d172842c77f566121437768bc962f

redundant_closure_call - add support for shadowed closures

view details

Gary Guo

commit sha 4fb260bb32a2da7d7ea63b759eef77072a95614b

Guard against non-monomorphized type_id intrinsic call

view details

Tim Nielens

commit sha 1ac8b85c9fd38ff0a14061cae0b4d31e9bfafd56

redundant_closure_call - pr review

view details

push time in a day

push eventcuviper/rust

Mark Rousskov

commit sha 2af7940474a9c6b3fc484a66028761ef60cb1553

1.46 beta

view details

Mark Rousskov

commit sha 83b6d84a2f8ec7d85f7484e93f80130672965b83

Dummy function to re-add const_transmute feature gate

view details

Mark Rousskov

commit sha dba515e8610d7dbe2d3bb175aaddaa124e2dc9dd

Cherry-pick non-nightly rustfmt fixes

view details

bors

commit sha e51b714db8ff82ac38ea7c6742d6f5480e2e77bd

Auto merge of #74323 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum [beta] 1.46 beta

view details

Eric Huss

commit sha 6a070f2a2e205ba7969d71dcc2e11f2b5200c1de

[beta] Update cargo

view details

Manish Goregaokar

commit sha 59e3a058153cef34f7a09180ab7cf632f4f40ca5

Rollup merge of #74406 - Mark-Simulacrum:fix-windows-maybe, r=Mark-Simulacrum Set shell for github actions CI r? @pietroalbini but because this seems at worst harmless and CI is broken self approving

view details

Manish Goregaokar

commit sha 85f1370606392755b38ebd6a2f8e1dc978d41d9d

Rollup merge of #74418 - rye:gha-dedup-shell-setting, r=pietroalbini ci: Set `shell: bash` as a default, remove duplicates A follow-up to #74406, this commit merely removes the `shell: bash` lines where they were added in favor of setting defaults for *all* "run" steps in the jobs that run the tests. The changes in #74406 were needed because of an upstream change to the `windows-2019` GitHub Actions image. Previously, the configuration worked fine without specifying `shell: bash`, but for some reason this broke with a new change that was deployed today. The preceding PR was a hotfix to get CI passing, but there was a slightly less duplicative way to specify the default shell for the jobs, which was to set the `defaults.run` option. This change applies to the `pr`, `try`, `auto`, and `auto-fallible` jobs, which are derived from the YAML-anchor `base-ci-job`. I did not apply these changes to the `master`, `try-success`, `try-failure`, `auto-success`, or `auto-failure` jobs because they have only a few steps. cc/r? @Mark-Simulacrum

view details

bors

commit sha 6f959902b3103c49ca981fbc01871589c3498489

Auto merge of #74593 - ehuss:update-beta-cargo, r=Mark-Simulacrum [beta] Update cargo 2 commits in 4f74d9b2a771c58b7ef4906b2668afd075bc8081..149022b1d8f382e69c1616f6a46b69ebf59e2dea 2020-07-08 17:13:00 +0000 to 2020-07-17 16:39:39 -0400 - [beta] Revert "Improve support for non-`master` main branches" (rust-lang/cargo#8503) - [beta] Avoid colliding with older Cargo fingerprint changes (rust-lang/cargo#8488)

view details

jumbatm

commit sha 1625966666a322090c2ca3459da2e5629dde26ff

Make ClashingExternDeclarations Allow by default.

view details

Yuki Okushi

commit sha e421cb153ed136e3bebb5b1a75e54a0e47bfcf3f

Forbid non-derefable types explicitly in unsizing casts

view details

Bastian Kauschke

commit sha 3accd067ae436ad90e2c22d7586a4856398eb4cd

forbid `#[track_caller]` on main

view details

Bastian Kauschke

commit sha c5d167a4b1e25b63da9c735a14ab51ac73db7f96

tweak error message

view details

Adam Perry

commit sha e69dd7ad3b561bf77f92503c48d5ba49be5130b7

Fix #[track_caller] shims for trait objects. We were missing an Instance::resolve_for_fn_ptr in resolve_for_vtable. Closes #74764.

view details

Vadim Petrochenkov

commit sha 346dc2ff9c4f152e229ef6886a5c2357f12e4587

rustc_target: Add a target spec option for disabling `--eh-frame-hdr`

view details

Pietro Albini

commit sha d3aaac0c86475a8a7a71bcd796cf7f12a53b7428

ci: allow RLA to pick the right PR number

view details

Pietro Albini

commit sha b5ad15b6ebc6fac580dfd56aaf056102f1958e77

ci: upload non-macOS from GHA instead of Azure Pipelines

view details

Pietro Albini

commit sha ec98df7e67ffa0784194dec8df9a0a388158519b

ci: disable Azure Pipelines except for macOS

view details

Jake Goulding

commit sha 9452bd72051eda1d723afc7104de6b3b4762bd4b

Add the aarch64-apple-darwin target This is a basic copy-paste-modify from the existing x86_64-apple-darwin target.

view details

Matthew Jasper

commit sha ca9eb24ee9df646a9567d23f93761f5a0956b5e8

Use `ReEmpty(U0)` as the implicit region bound in typeck

view details

Marc-Antoine Perennou

commit sha 1a2f6d5d6fd46054f59852c052d12f2f3711e5b8

rustbuild: drop tool::should_install Always install when the build succeeds Fixes #74431 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>

view details

push time in a day

push eventcuviper/rust

Mark Rousskov

commit sha 9e5fb40807f97fe47d2eaca99daeb1f1f6ff07a7

1.45.1 release

view details

Mark Rousskov

commit sha 309234718434a3b2b513de1a82324b542e3d05f7

Update to rustfmt 1.4.17

view details

Matthew Jasper

commit sha 0f24c5a33871eda38c8a3292ee3dfa9ae384ecb6

Use `ReEmpty(U0)` as the implicit region bound in typeck

view details

Marc-Antoine Perennou

commit sha 452a29cc2e6c0bc418d4efb398c93cdbdd217434

rustbuild: drop tool::should_install Always install when the build succeeds Fixes #74431 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>

view details

Mark Rousskov

commit sha 38148199511e8ff9f769991770735dad78843f80

Bump cargo This is not a user-visible change as Cargo's library API is not exposed by Rust, but this way the version in 1.45.1 will appropriately match with published Cargo 0.46.1.

view details

Jakub Adam Wieczorek

commit sha 174b58287c66a6ad3eaa1897279d769611919960

Fix an ICE on an invalid `binding @ ...` in a tuple struct pattern

view details

Mark Rousskov

commit sha d01e1093baf4d5ebe08a067a2a8e720e7fa7eb22

delay_span_bug instead of silent ignore

view details

Mark Rousskov

commit sha 7747315455af79afddaef1192e53649ca092ecc4

Set shell for github actions CI

view details

Kristofer Rye

commit sha 7d0afb1ea2166f14cb9e2b1880d8968c2d26a605

ci: Set `shell: bash` as a default, remove duplicates A follow-up to #74406, this commit merely removes the `shell: bash` lines where they are explicitly added in favor of setting defaults for *all* "run" steps. Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>

view details

Kristofer Rye

commit sha 132887ccc26fb6f2251214a1d5b0e60547cfd984

ci: Stop setting CI_OVERRIDE_SHELL environment variable This will render the src/ci/exec-with-shell.py script more or less useless, but we're going to replace that by just using the system bash instead. Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>

view details

Kristofer Rye

commit sha 884ea63115b6aee487112890e55008ef97783942

ci: Replace exec-with-shell wrapper with "plain bash" Also, promote defaults.run.shell from inside only the primary jobs to the top level. The src/ci/exec-with-shell.py wrapper script was formerly used to change out the shell mid-job by intercepting a CI_OVERRIDE_SHELL environment variable. Now, instead, we just set `bash` as the global default across all jobs, and we also delete the exec-with-shell.py script. Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>

view details

bors

commit sha 14485ee1257703df51313efe39daf35e886e4dac

Auto merge of #74574 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum [stable] 1.45.1 release See RELEASES.md for details on what this contains.

view details

Oliver Scherer

commit sha 4e1eaf44ff72d981b42b9e4cacc7ef9a1f97598a

The const propagator cannot trace references. Thus we avoid propagation of a local the moment we encounter references to it.

view details

Mark Rousskov

commit sha 32166ab1ebec2e5e5454221f0d3238c21382de9f

Update release notes

view details

Mateusz Mikuła

commit sha 41895ca93f3722adf5855089442de3abc94458f0

Use preinstalled MSYS2

view details

bors

commit sha c367798cfd3817ca6ae908ce675d1d99242af148

Auto merge of #74746 - wesleywiser:stable_backport_73669, r=Mark-Simulacrum Stable backport of #73613 This is the backport of #73613 to stable. r? @ghost cc @Mark-Simulacrum In addition the tests added in the original PR passing, I've also confirmed that the test case in #74739 works correctly.

view details

Mark Rousskov

commit sha 4b277c5f5b46c30ccc7e2b9a2300ce19d77bc646

Revert "delay_span_bug instead of silent ignore" This reverts commit d01e1093baf4d5ebe08a067a2a8e720e7fa7eb22.

view details

Mark Rousskov

commit sha a13f5b1492fe9860d20a075f08942d55e8ed417e

Revert "Fix an ICE on an invalid `binding @ ...` in a tuple struct pattern" This reverts commit 174b58287c66a6ad3eaa1897279d769611919960.

view details

Mark Rousskov

commit sha 2098b6e98530fac543ea25f5c6a048b9cc14a159

1.45.2 release notes

view details

Mark Rousskov

commit sha c774981577f78f6422acd579ef865a3c06be5f25

Add a test for pattern matching within a tuple

view details

push time in a day

pull request commentrust-lang/rust

Upgrade indexmap and use it more

@bors r=Mark-Simulacrum

cuviper

comment created time in a day

push eventcuviper/rust

Aaron Hill

commit sha 1f63a6a572a0f9afc769a88229d80cc81ff04697

Hash parent ExpnData

view details

Alexis Bourget

commit sha 6d77e40afe0b0337fa00832d50cdf6b3cd3dfbb9

Move to intra-doc links in library/std/src/path.rs

view details

bors

commit sha 8bc801b05019cd3e0ef19e6c4c028d55baa645d2

Auto merge of #75293 - poliorcetics:intra-doc-links-std-path, r=jyn514 Move to intra-doc links in library/std/src/path.rs Helps with #75080. @rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc Known issue: The following links are broken (they are inside trait impls, undocumented in this file, inheriting from the original doc): - [`Hasher`] - [`Self`] (referencing `../primitive.slice.html`) - [`Ordering`]

view details

bors

commit sha 543f03d24118d3af784aa98c507c00e30c796a0e

Auto merge of #75134 - Aaron1011:feature/expn-data-parent-hash, r=petrochenkov Hash parent ExpnData cc https://github.com/rust-lang/rust/pull/72121#discussion_r460528326

view details

Josh Stone

commit sha 997a766b320e845fa8833c5dfe7d9a29c6970ccf

Upgrade indexmap to 1.5.1, now using hashbrown!

view details

Josh Stone

commit sha 1f71f0f2b54981d4cc7a99201d180e787c13ca6d

rustc_codegen_llvm: use IndexSet in CoverageMapGenerator

view details

Josh Stone

commit sha d3c70b8af516497cbc817f4b5d907ff7cf91661f

rustc_data_structures: use IndexSet in TransitiveRelation

view details

Josh Stone

commit sha 2fa6e44c8d2da446966b99765202ac2f6fe2e3ee

rustc_metadata: use IndexSet in EncodeContext

view details

Josh Stone

commit sha 952daa20b4296667b0d21750a4dc5e03a4c8a55b

rustc_middle: use IndexSet in OnDiskCache

view details

Josh Stone

commit sha 42e7a0cb3a484670e27e28915a8c45809a35ccc4

rustc_mir: use IndexMap in BorrowSet

view details

Josh Stone

commit sha c61f1c8bfa49cdaeb0ee8a8360e0d70a0fbd0b7b

rustc_mir: use IndexSet in PlaceholderIndices

view details

Josh Stone

commit sha 4efc7e92fa29f550f0825f290c048a55515ce98f

rustc_mir_build: use IndexMap in TestKind::SwitchInt

view details

Josh Stone

commit sha 7d1547d3009cac6edea086bd3e356054275b3e45

rustc_span: use IndexSet in SpanInterner

view details

Josh Stone

commit sha b25881711548060c98d9879790ea414a5cce32a6

rustc_typeck: use IndexSet in UniquePredicates

view details

Josh Stone

commit sha 1d03ffe0bce458f68f279cd240dd15f20d39449b

rustc_typeck: use IndexSet in InteriorVisitor

view details

Josh Stone

commit sha ca0b89aa040acf5df95d39579cbd7ff03c73baf1

rustc_span: note the perf loss seen from IndexSet in symbol::Interner

view details

push time in a day

pull request commentrust-lang/rust

Upgrade indexmap and use it more

I think it may go unnoticed in the commit history -- I think I'll cut those out and add a new commit with just a comment that Symbol could use indexmap if performance is resolved.

cuviper

comment created time in a day

pull request commentrust-lang/rust

Upgrade indexmap and use it more

By "revert commit squashed", do you mean to effectively rebase that change out of existence? That's fine with me.

cuviper

comment created time in a day

Pull request review commentrust-lang/rust

Upgrade indexmap and use it more

 impl<'a, 'tcx> Builder<'a, 'tcx> {                 } else {                     // The switch may be inexhaustive so we have a catch all block                     debug_assert_eq!(options.len() + 1, target_blocks.len());+                    let options: Vec<u128> = options.values().copied().collect();                     TerminatorKind::SwitchInt {                         discr: Operand::Copy(place),                         switch_ty,-                        values: options.clone().into(),+                        values: options.into(),

The values field is a Cow. So before, we had a local &Vec<u128> that could be cloned and converted, and now we have a map and have to collect its values. I guess we could directly collect a Cow though -- I'll do that.

cuviper

comment created time in a day

pull request commentrust-lang/rust

Upgrade indexmap and use it more

Docs still show ~0.5% increase in instructions across the board, but everything else looks neutral or improved.

Flipping to cpu-cycles, it looks better almost everywhere, even for docs. It's quite plausible that the new hashbrown-based indexmap would have better IPC, with its SIMD lookups and all.

The reverted Symbol might fare better with custom index types -- bluss/indexmap#147 -- since a Symbol wraps a u32 instead of usize. But even with that, it may be that indexmap's little bit of extra indirection on keys is too harmful for that simple &'static str keys. Anyway, that can be explored in future work if we do land custom index types.

cuviper

comment created time in 2 days

push eventcuviper/indexmap

Josh Stone

commit sha 33d9b31c91040c829c70089b15975122f0237367

Parameterize the index type of maps and sets The index type is a new generic parameter defaulting to `usize`: pub struct IndexSet<T, S = RandomState, Idx = usize> pub struct IndexMap<K, V, S = RandomState, Idx = usize> In `no_std` builds, `S` has no default, but still `Idx = usize`. This may be used to optimized the storage size in the raw table, for example using a `u32` index if you know that `u32::MAX` capacity is sufficient for you. It may also be useful to define a newtype index custom to a particular domain, which only needs to implement the new `Indexable` trait to be useful here.

view details

push time in 2 days

pull request commentrust-lang/rust

Upgrade the FreeBSD toolchain to version 11.4

@bors r=Mark-Simulacrum

cuviper

comment created time in 2 days

push eventcuviper/rust

Andy Russell

commit sha af88ce5eb34b0ecdfd2f8dfcc837c353688d6c75

allow aux builds in rustdoc-ui mode

view details

Andy Russell

commit sha 608807934d41168cb30c6eee6442fe29251e40f0

use outermost invocation span for doctest names Fixes #70090.

view details

Lzu Tao

commit sha a5d0c2c17482e56cae5112083207e8c0ce19cb96

Remove redundant len binding

view details

Lzu Tao

commit sha 34c343ac27c519350577bd1bfdc4d1a3b90e6db6

Make use of macro to avoid repetition

view details

Lzu Tao

commit sha f55e4d036c10f5b887b4ed8c12b7b31f3bb75d23

Get pointer from address of c directly

view details

Stefan Lankes

commit sha a4fb1d0b76a6e4e5e980a6839eb318a879635882

adjust remaining targets - fix commit 7dc3886 - previous commit doesn't adjust all targets

view details

Yuki Okushi

commit sha 788261d2d30c92c7423a68088aaee32ce44f9520

Add regression test for issue-59311

view details

Oliver Scherer

commit sha c3454c000706176b61ef089107203766735348f7

Check whether locals are too large instead of whether accesses into them are too large

view details

Oliver Scherer

commit sha b26a7d5cd9d9c9ec84eba90b806a453135d20b99

Stop propagating to locals that were marks as unpropagatable. We used to erase these values immediately after propagation, but some things slipped through and it caused us to still initialize huge locals.

view details

Oliver Scherer

commit sha 9e21004c74b8749686c0e5b9195e6822be6280d0

Update ui tests

view details

Oliver Scherer

commit sha 8d5f2bdcd17f3139965b9ef6da8cb13183324485

Add test ensuring that we don't propagate large arrays

view details

Oliver Scherer

commit sha dc0408ec43fa6b63b5cbffbbc07823577c97ea24

Update clippy ui test. The reason we do not trigger these lints anymore is that clippy sets the mir-opt-level to 0, and the recent changes subtly changed how the const propagator works.

view details

Oliver Scherer

commit sha f7a1e64fdb209951e6e77369364feb530a60b04c

Update tests after rebase

view details

Oliver Scherer

commit sha 1864a973b3a0a5a6c5a7c71d7d7cd052732e5c02

Improve the diagnostics around misspelled mir dump filenames

view details

Ximin Luo

commit sha 7f54cf26511b2716d35e2f2198bbff9da5a33123

compiletest: ignore-endian-big, fixes #74829, fixes #74885

view details

Eduard-Mihai Burtescu

commit sha 6bf3a4bcd836e4b29108bfb6d8d7b00d405fd03e

rustc_metadata: track the simplified Self type for every trait impl.

view details

Joshua Nelson

commit sha 8e0e925e2bd45806f88195a94e59246e2e5b6d5e

Disallow linking to items with a mismatched disambiguator

view details

Joshua Nelson

commit sha 519c85439a39d85d0c4b08ff8622cad5bd707ada

Don't mark associated items as traits This caused the following false positive: ``` warning: unresolved link to `Default::default` --> /home/joshua/rustc2/default.rs:1:14 | 1 | /// Link to [Default::default()] | ^^^^^^^^^^^^^^^^^^ | = note: `#[warn(broken_intra_doc_links)]` on by default note: this item resolved to a trait, which did not match the disambiguator 'fn' --> /home/joshua/rustc2/default.rs:1:14 | 1 | /// Link to [Default::default()] | ^^^^^^^^^^^^^^^^^^ ```

view details

Joshua Nelson

commit sha 743f9327428801932bd70688b5c83f38bf61615a

Keep the previous behavior of `register_res` Now that we're returning the `Res` of the associated item, not the trait itself, it got confused.

view details

oliver-giersch

commit sha 6c81556a36ac5507fe1f9cd8ee699e6fa2b11077

adds [*mut|*const] ptr::set_ptr_value

view details

push time in 2 days

Pull request review commentrust-lang/rust

Use union to cast between big endian fields of s6_addr

 impl Ipv6Addr {     /// ```     #[stable(feature = "rust1", since = "1.0.0")]     #[rustc_const_stable(feature = "const_ipv6", since = "1.32.0")]+    #[allow_internal_unstable(const_fn_transmute)]     pub const fn new(a: u16, b: u16, c: u16, d: u16, e: u16, f: u16, g: u16, h: u16) -> Ipv6Addr {+        let addr16 = [+            a.to_be(),+            b.to_be(),+            c.to_be(),+            d.to_be(),+            e.to_be(),+            f.to_be(),+            g.to_be(),+            h.to_be(),+        ];         Ipv6Addr {             inner: c::in6_addr {-                s6_addr: [-                    (a >> 8) as u8,-                    a as u8,-                    (b >> 8) as u8,-                    b as u8,-                    (c >> 8) as u8,-                    c as u8,-                    (d >> 8) as u8,-                    d as u8,-                    (e >> 8) as u8,-                    e as u8,-                    (f >> 8) as u8,-                    f as u8,-                    (g >> 8) as u8,-                    g as u8,-                    (h >> 8) as u8,-                    h as u8,-                ],+                // All elements in `addr16` are big endian.+                // SAFETY: `[u16; 8]` is always safe to transmuted to `[u8; 16]`.
                // SAFETY: `[u16; 8]` is always safe to transmute to `[u8; 16]`.
lzutao

comment created time in 2 days

Pull request review commentrust-lang/rust

Use union to cast between big endian fields of s6_addr

 impl Ipv6Addr {     /// ```     #[stable(feature = "rust1", since = "1.0.0")]     pub fn segments(&self) -> [u16; 8] {-        let arr = &self.inner.s6_addr;+        // All elements in `s6_addr` must be big edian.+        // SAFETY: `[u8; 16]` is always safe to transmuted to `[u16; 8]`.
        // All elements in `s6_addr` must be big endian.
        // SAFETY: `[u8; 16]` is always safe to transmute to `[u16; 8]`.
lzutao

comment created time in 2 days

push eventcuviper/indexmap

Josh Stone

commit sha 123a35112f3620bf5e789169ed1df302c38f7273

ci: make sure test commands are `&&`-chained The new test command added in e0c627b1bea0f directly followed the prior command, without `&&`-chaining the result. So if the tests before it _failed_, we wouldn't notice...

view details

Josh Stone

commit sha 622dd206314dd3284cb9efc006fdecc049d6d9d1

Merge pull request #149 from cuviper/test-chaining ci: make sure test commands are `&&`-chained

view details

Josh Stone

commit sha b61fdd4fc563bbdf287420c0fdf030fb05a73f24

Parameterize the index type of maps and sets The index type is a new generic parameter defaulting to `usize`: pub struct IndexSet<T, S = RandomState, Idx = usize> pub struct IndexMap<K, V, S = RandomState, Idx = usize> In `no_std` builds, `S` has no default, but still `Idx = usize`. This may be used to optimized the storage size in the raw table, for example using a `u32` index if you know that `u32::MAX` capacity is sufficient for you. It may also be useful to define a newtype index custom to a particular domain, which only needs to implement the new `Indexable` trait to be useful here.

view details

push time in 2 days

push eventbluss/indexmap

Josh Stone

commit sha 123a35112f3620bf5e789169ed1df302c38f7273

ci: make sure test commands are `&&`-chained The new test command added in e0c627b1bea0f directly followed the prior command, without `&&`-chaining the result. So if the tests before it _failed_, we wouldn't notice...

view details

Josh Stone

commit sha 622dd206314dd3284cb9efc006fdecc049d6d9d1

Merge pull request #149 from cuviper/test-chaining ci: make sure test commands are `&&`-chained

view details

push time in 2 days

PR merged bluss/indexmap

ci: make sure test commands are `&&`-chained

The new test command added in e0c627b1bea0f directly followed the prior command, without &&-chaining the result. So if the tests before it failed, we wouldn't notice...

+1 -1

1 comment

1 changed file

cuviper

pr closed time in 2 days

pull request commentbluss/indexmap

ci: make sure test commands are `&&`-chained

Thankfully nothing has been failing!

cuviper

comment created time in 2 days

PR opened bluss/indexmap

ci: make sure test commands are `&&`-chained

The new test command added in e0c627b1bea0f directly followed the prior command, without &&-chaining the result. So if the tests before it failed, we wouldn't notice...

+1 -1

0 comment

1 changed file

pr created time in 2 days

create barnchcuviper/indexmap

branch : test-chaining

created branch time in 2 days

pull request commentrust-lang/rust

Upgrade the FreeBSD toolchain to version 11.4

@Mark-Simulacrum ready to merge? Or did you want to let this one have its final waiting period?

cuviper

comment created time in 2 days

issue commentbluss/indexmap

Implement `serde` traits under `#[cfg(features = "serde")]`

An error is possible, but I think we should make the change to enable it all with just "serde". Then "serde-1" will be a vestigial feature that still enables the real "serde".

zakarumych

comment created time in 2 days

issue commentbluss/indexmap

Question: Indexmap and CLion

I suspect this is probably failing because the IDE doesn't have the has_std flag from running our build script, which then disables anything that needs the default S = RandomState, including IndexMap::new. I ran into this with rust-analyzer myself, reported in rust-analyzer/rust-analyzer#5353. They have a loadOutDirsFromCheck option to get those build script flags, so maybe JetBrains CLion has something similar?

This seems like another vote for an explicit "std" feature (#145), and cc #135 for 2.0 considerations.

PierreHenry63

comment created time in 2 days

pull request commentrust-lang/rust

Use union to cast between big endian fields of s6_addr

I suspect everything that makes transmute dangerous is also a hazard for union type punning. At least in this case we're only talking about benign types without niches/padding/etc.

lzutao

comment created time in 2 days

pull request commentrust-lang/rust

Use union to cast between big endian fields of s6_addr

Transmute size is checked here: https://github.com/rust-lang/rust/blob/8bc801b05019cd3e0ef19e6c4c028d55baa645d2/src/librustc_passes/intrinsicck.rs#L71-L124

But we may lose all safety comments that documented in Ipv6Bytes.

I don't understand what you're afraid to lose. The big-endian safety point is already repeated in the two functions, and transmute enforces size itself, better than a comment.

lzutao

comment created time in 2 days

pull request commentrust-lang/rust

Re-enable debug and LLVM assertions

It's not useful for LLVM's sake, but debug assertions may still catch if a pull request introduces a bug in general, and it's nice if we can do that before the review and full CI.

Mark-Simulacrum

comment created time in 2 days

Pull request review commentrust-lang/rust

Upgrade indexmap and use it more

 impl CoverageInfoBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {     } } -pub(crate) fn write_filenames_section_to_buffer(filenames: &Vec<CString>, buffer: &RustString) {-    let c_str_vec = filenames.iter().map(|cstring| cstring.as_ptr()).collect::<Vec<_>>();+pub(crate) fn write_filenames_section_to_buffer<'a>(+    filenames: impl IntoIterator<Item = &'a CString>,+    buffer: &RustString,+) {+    let c_str_vec = filenames.into_iter().map(|cstring| cstring.as_ptr()).collect::<Vec<_>>();

No problem, thanks for looking!

cuviper

comment created time in 2 days

Pull request review commentrust-lang/rust

Upgrade indexmap and use it more

 impl CoverageInfoBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {     } } -pub(crate) fn write_filenames_section_to_buffer(filenames: &Vec<CString>, buffer: &RustString) {-    let c_str_vec = filenames.iter().map(|cstring| cstring.as_ptr()).collect::<Vec<_>>();+pub(crate) fn write_filenames_section_to_buffer<'a>(+    filenames: impl IntoIterator<Item = &'a CString>,+    buffer: &RustString,+) {+    let c_str_vec = filenames.into_iter().map(|cstring| cstring.as_ptr()).collect::<Vec<_>>();

Anyway, I think that antipattern is more about having a generic intro in the function body, followed by a lot of code that's not actually generic. In this case, the following code is just a single FFI call, which isn't interesting to deduplicate even if there were a lot of different monomorphizations here.

cuviper

comment created time in 2 days

Pull request review commentrust-lang/rust

Upgrade indexmap and use it more

 impl CoverageInfoBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {     } } -pub(crate) fn write_filenames_section_to_buffer(filenames: &Vec<CString>, buffer: &RustString) {-    let c_str_vec = filenames.iter().map(|cstring| cstring.as_ptr()).collect::<Vec<_>>();+pub(crate) fn write_filenames_section_to_buffer<'a>(+    filenames: impl IntoIterator<Item = &'a CString>,+    buffer: &RustString,+) {+    let c_str_vec = filenames.into_iter().map(|cstring| cstring.as_ptr()).collect::<Vec<_>>();

This crate-local and there's really only one caller, but it just didn't seem useful to expose the fact that it's getting a &IndexSet at this level. The function only needs something that provides &CString, but I think it shouldn't really matter what. I don't want this function to continue taking &Vec<CString> though, because that would require a new collection at the caller side.

(Here and in other commits as well.)

Can you cite more examples? If I increased genericity badly, I didn't realize it. I know there are a few new methods where I return impl Iterator, but that's a single existential type.

cuviper

comment created time in 2 days

pull request commentrust-lang/rust

Upgrade indexmap and use it more

@Mark-Simulacrum I expected existing uses of indexmap to improve with the new hashbrown-based version, and the new uses to be roughly the same, but with a better abstraction. Compare to a prior test that saw 20% worse switching one part to the old indexmap -- at least that kind of hit isn't here anymore. :slightly_smiling_face:

The losses here are mostly in -doc, so that might be something that can be specifically targeted further, perhaps backing something out if it can be isolated. The rest look like mixed ups and downs to me.

cuviper

comment created time in 3 days

pull request commentrust-lang/rust

Upgrade indexmap and use it more

FWIW, I purposely separated the commits, so we can easily back any of these out if one proves troublesome.

Is the memory usage lower?

The perf results include max-rss -- looks like a mixed bag.

IndexMap is still basically a Vec+Map internally, but it only stores the keys once, which can help memory.

cuviper

comment created time in 3 days

issue commentrust-lang/rust

rustc-dev does not contain enough to link against rustc libraries

How large is this particular LLVM file? If it's not more than a few megabytes (i.e. less than 10) ...

In 2020-08-08 nightly-x86_64-unknown-linux-gnu, libLLVM-10-rust-1.47.0-nightly.so is 85M.

The rest of llvm-tools is only 4MB.

RalfJung

comment created time in 3 days

pull request commentrust-lang/rust

Use union to cast between big endian fields of s6_addr

Instead of the temporary union, have you tried transmute? (with #![feature(const_fn_transmute)]) It seems to codegen identically, so LLVM even deduplicates these: https://rust.godbolt.org/z/1Khbee

lzutao

comment created time in 3 days

PR opened bluss/indexmap

Parameterize the index type of maps and sets

The index type is a new generic parameter defaulting to usize:

pub struct IndexSet<T, S = RandomState, Idx = usize>
pub struct IndexMap<K, V, S = RandomState, Idx = usize>

In no_std builds, S has no default, but still Idx = usize.

This may be used to optimized the storage size in the raw table, for example using a u32 index if you know that u32::MAX capacity is sufficient for you. It may also be useful to define a newtype index custom to a particular domain, which only needs to implement the new Indexable trait to be useful here.

+595 -285

0 comment

12 changed files

pr created time in 3 days

create barnchcuviper/indexmap

branch : indexable

created branch time in 3 days

issue commentrust-lang/rust

Use indexmap::Index{Map,Set} in the compiler instead of Vec+reverse map.

pub params: Vec<GenericParamDef>, pub param_def_id_to_index: FxHashMap<DefId, u32>,

This one isn't actually to mapping Vec indexes, but rather param.index, which isn't always the same.

The other examples and more are converted in #75278.

eddyb

comment created time in 3 days

pull request commentrust-lang/rust

Upgrade indexmap and use it more

@bors try @rust-timer queue

cuviper

comment created time in 3 days

PR opened rust-lang/rust

Upgrade indexmap and use it more

First this upgrades indexmap to 1.5.1, which is now based on hashbrown::raw::RawTable. This means it shares a lot of the same performance characteristics for insert, lookup, etc., while keeping items in insertion order.

Then across various rustc crates, this replaces a lot of Vec+HashMap pairs with a single IndexMap or IndexSet.

Closes #60608. r? @eddyb

+149 -209

0 comment

21 changed files

pr created time in 3 days

push eventcuviper/rust

Nazım Can Altınova

commit sha 2f28d5945dab495a77c67c6051eea116ce9ceee2

Add a passing test for const unsafe_unreachable

view details

Nazım Can Altınova

commit sha c45e9c86ca5e1aa20ec8ec9904c4ad9a33a072e5

Add a test for const unsafe_unreachable that triggers UB

view details

Manish Goregaokar

commit sha 69dab507620aada3085b45ccd0189de3bf8c8734

Add test for module ambiguity

view details

Marc-Antoine Perennou

commit sha 4adb13c3a4328046688f04d4a15c8c3321ca6bfb

rustbuild: drop tool::should_install Always install when the build succeeds Fixes #74431 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>

view details

Manish Goregaokar

commit sha 91314e2d279374bb9eec79754b3480d359d7a412

Use intra-doc links in BTreeSet docs

view details

Manish Goregaokar

commit sha 3006ea3560b454404a653a0677a3d03790d5455b

Rollup merge of #71670 - GuillaumeGomez:enforce-codeblocks-attribute-check, r=Mark-Simulacrum Enforce even more the code blocks attributes check through rustdoc `rustdoc` now has a lint which allows it to warn if a code block attribute is malformated (which can end up in bad situations, even more in case of testing examples!). Now it'll fail if such a situation is encountered when testing markdown code blocks examples. r? @Mark-Simulacrum

view details

Manish Goregaokar

commit sha f6cd31c3b71139a301b23ad6107a5e0560bc3fe7

Rollup merge of #73930 - a1phyr:feature_const_option, r=dtolnay Make some Option methods const Tracking issue: #67441 Constantify the following methods of `Option`: - `as_ref` - `is_some` - `is_none` - `iter` (not sure about this one, but it is possible, and will be useful when const traits are a thing) cc @rust-lang/wg-const-eval @rust-lang/libs

view details

Manish Goregaokar

commit sha be3b972820c1e4793f246746d815eeea5e736dc9

Rollup merge of #74009 - mati865:mingw-tests-implib, r=nikomatsakis Fix MinGW `run-make-fulldeps` tests `compiler-rt-works-on-mingw` and `libs-search-path` were not ran because `only-mingw` doesn't match any target. Enabled and verified few ignored tests with `windows-gnu` toolchain. They are still ignored on MSVC since I'm not experienced with this target.

view details

Manish Goregaokar

commit sha 9c84c6b836bce0730cd1c34ef7e4832b755a713d

Rollup merge of #74056 - fusion-engineering-forks:fmt-arguments-as-str, r=Amanieu Add Arguments::as_str(). There exist quite a few macros in the Rust ecosystem which use `format_args!()` for formatting, but special case the one-argument case for optimization: ```rust #[macro_export] macro_rules! some_macro { ($s:expr) => { /* print &str directly, no formatting, no buffers */ }; ($s:expr, $($tt:tt)*) => { /* use format_args to write to a buffer first */ } } ``` E.g. [here](https://github.com/rust-embedded/cortex-m-semihosting/blob/7a961f0fbe6eb1b29a7ebde4bad4b9cf5f842b31/src/macros.rs#L48-L58), [here](https://github.com/rust-lang-nursery/failure/blob/20f9a9e223b7cd71aed541d050cc73a747fc00c4/src/macros.rs#L9-L17), and [here](https://github.com/fusion-engineering/px4-rust/blob/7b679cd6da9ffd95f36f6526d88345f8b36121da/px4/src/logging.rs#L45-L52). The problem with these is that a forgotten argument such as in `some_macro!("{}")` will not be diagnosed, but just prints `"{}"`. With this PR, it is possible to handle the no-arguments case separately *after* `format_args!()`, while simplifying the macro. Then these macros can give the proper error about a missing argument, just like `print!("{}")` does, while still using the same optimized implementation as before. This is even more important with [RFC 2795](https://github.com/rust-lang/rfcs/pull/2795), to make sure `some_macro!("{some_variable}")` works as expected.

view details

Manish Goregaokar

commit sha 10b7eecbdd7cee00349dfc30b9e2dcf8b4f688af

Rollup merge of #74169 - ecstatic-morse:dataflow-unreachable, r=pnkfelix Stop processing unreachable blocks when solving dataflow ...instead we `debug_assert` that the user is not checking the dataflow state for an unreachable block. This resolves a FIXME in the dataflow engine. The old behavior was an artifact of the previous dataflow framework. Things should run a tiny bit faster now, but I suspect not enough to show up in benchmarks. AFAIK, only the generator transform runs dataflow on MIR with unreachable basic blocks. This PR also adds some utility methods to `mir::traversal`. r? @pnkfelix

view details

Manish Goregaokar

commit sha 7d4e6c0aca1365ac2adb6a9fa28f91dc15da32db

Rollup merge of #74251 - shepmaster:bootstrap-target-files, r=Mark-Simulacrum Teach bootstrap about target files vs target triples `rustc` allows passing in predefined target triples as well as JSON target specification files. This change allows bootstrap to have the first inkling about those differences. This allows building a cross-compiler for an out-of-tree architecture (even though that compiler won't work for other reasons). Even if no one ever uses this functionality, I think the newtype around the `Interned<String>` improves the readability of the code.

view details

Manish Goregaokar

commit sha 6b2ccc7180bc2a3c34a1874f725cc0b2533d5eaf

Rollup merge of #74288 - haraldh:test_aslr, r=petrochenkov Fix src/test/run-make/static-pie/test-aslr.rs Might be subject to the birthday paradox occasionally, causing spurious failures. Addresses: https://github.com/rust-lang/rust/pull/70740#pullrequestreview-430981320

view details

Manish Goregaokar

commit sha c9010d6e85b06ad8b337d2ae1ffc1554faffc7c0

Rollup merge of #74300 - lzutao:iterator-intra, r=jyn514 Use intra-doc links in core::iter module This will make core::iter doc depend less on std doc.

view details

Manish Goregaokar

commit sha 344b5e06fabab3e0634866a810d5fc57fcaac616

Rollup merge of #74364 - lcnr:lazy-norm-tests, r=nikomatsakis add lazy normalization regression tests We previously didn't have simple tests which fail if we aren't careful around lazy normalization. We now do.

view details

Manish Goregaokar

commit sha ef0540bb75fa2b07475496bfff5441ad227695ba

Rollup merge of #74368 - GuillaumeGomez:css-tidy-check, r=Mark-Simulacrum Add CSS tidy check r? @Mark-Simulacrum

view details

Manish Goregaokar

commit sha 105cd4b21eaef2e68227eb5b58c910de574af0cd

Rollup merge of #74394 - bjorn3:remove_emscripten_leftover, r=spastorino Remove leftover from emscripten fastcomp support This is no longer used since #63649

view details

Manish Goregaokar

commit sha 87d01d11e17e497b3ec43559cbeee3ad704603ee

Rollup merge of #74411 - jonas-schievink:unbreak-mir, r=matthewjasper Don't assign `()` to `!` MIR locals Implements the fix described in https://github.com/rust-lang/rust/issues/73860#issuecomment-651731893. Fixes https://github.com/rust-lang/rust/issues/73860 r? @matthewjasper

view details

Manish Goregaokar

commit sha eef22dae7e0ccbf484f1fef3989759fc75b6dddb

Rollup merge of #74416 - NieDzejkob:linker-locale-utf8, r=oli-obk Use an UTF-8 locale for the linker. Using a `C` locale breaks unicode filenames on Guix, where the linker is wrapped by a Guile program.

view details

Manish Goregaokar

commit sha 222d2508375a363be7a4f6ded3c9bd7be0803d19

Rollup merge of #74424 - sexxi-goose:move_hir_place, r=nikomatsakis Move hir::Place to librustc_middle/hir Needed to support https://github.com/rust-lang/project-rfc-2229/issues/7 Currently rustc_typeck depends on rustc_middle for definition TypeckTables, etc. For supporting project-rfc-2229#7, rustc_middle would've to depend on rustc_typeck for Place -- introducing a circular dependency. This resembles the MIR equivalent of `Place` located in `lbrustc_middle/mir`. Separate PR for this move will make the actual PR for using Places to represent captures cleaner/more focused. r? @nikomatsakis @matthewjasper

view details

Manish Goregaokar

commit sha 3b7e2862db3c80da72094d53e20f35cb75e6e81d

Rollup merge of #74428 - tshepang:better-filter-map-doc, r=jonas-schievink docs: better demonstrate that None values are skipped as many times a… …s needed

view details

push time in 3 days

created tagbluss/indexmap

tag1.5.1

A hash table with consistent order and fast iteration; access items by key or sequence index

created time in 3 days

push eventbluss/indexmap

Josh Stone

commit sha 5d7b4fc7b8893c02a33bfe01f71bbf31f5fa5c72

Release 1.5.1

view details

Josh Stone

commit sha 351f6adb2fa2031e8379a67f07482416ec16ff85

Merge pull request #146 from cuviper/release-1.5.1 Release 1.5.1

view details

push time in 3 days

PR merged bluss/indexmap

Release 1.5.1
+13 -1

0 comment

2 changed files

cuviper

pr closed time in 3 days

PR opened bluss/indexmap

Release 1.5.1
+13 -1

0 comment

2 changed files

pr created time in 3 days

push eventcuviper/indexmap

Josh Stone

commit sha 5d7b4fc7b8893c02a33bfe01f71bbf31f5fa5c72

Release 1.5.1

view details

push time in 3 days

create barnchcuviper/indexmap

branch : release-1.5.1

created branch time in 3 days

push eventbluss/indexmap

Josh Stone

commit sha 737800323a1476e4a87ae322f7da6c1a972cd34b

Implement direct usize indexing ```rust where IndexMap<K, V, S>: IndexMut<usize, Output = V>, IndexSet<T, S>: Index<usize, Output = T>, ``` This allows `map[i]` and `set[i]` indexing to access values directly, panicking if the index is out of bounds, similar to slices. On maps, this somewhat overlaps with `Index<&Q> + IndexMut<&Q>` where `Q: Equivalent<K>`. The reference makes this indexing unambiguous, but it could be confusing to users if the key type is also an integer.

view details

Josh Stone

commit sha 4d4fc0a1c8aa522139e1f88ea626941001d0e50a

Add documentation and examples for Index and IndexMut

view details

Josh Stone

commit sha 82828738ec7fa4e0ffc56f13320273280c857dab

Merge pull request #132 from cuviper/direct-index Implement direct usize indexing

view details

push time in 3 days

PR merged bluss/indexmap

Implement direct usize indexing
where
    IndexMap<K, V, S>: IndexMut<usize, Output = V>,
    IndexSet<T, S>: Index<usize, Output = T>,

This allows map[i] and set[i] indexing to access values directly, panicking if the index is out of bounds, similar to slices.

On maps, this somewhat overlaps with Index<&Q> + IndexMut<&Q> where Q: Equivalent<K>. The reference makes this indexing unambiguous, but it could be confusing to users if the key type is also an integer.

+194 -2

8 comments

3 changed files

cuviper

pr closed time in 3 days

pull request commentbluss/indexmap

Implement direct usize indexing

Let's go ahead with that plan then...

cuviper

comment created time in 3 days

push eventcuviper/indexmap

Josh Stone

commit sha c42867cc0adeb0aa3099cd2416252f0fb7c845c6

Expand drain to accept any RangeBounds<usize> Rather than just `RangeFull`, this lets us accept any `Range*` type or even arbitrary `Bound` pairs, matching the signature of `Vec::drain`.

view details

Josh Stone

commit sha 8ddc4f176d102050d6fc4cb42e902572172eab3f

Merge pull request #142 from cuviper/drain-ranges Expand drain to accept any RangeBounds<usize>

view details

Josh Stone

commit sha 737800323a1476e4a87ae322f7da6c1a972cd34b

Implement direct usize indexing ```rust where IndexMap<K, V, S>: IndexMut<usize, Output = V>, IndexSet<T, S>: Index<usize, Output = T>, ``` This allows `map[i]` and `set[i]` indexing to access values directly, panicking if the index is out of bounds, similar to slices. On maps, this somewhat overlaps with `Index<&Q> + IndexMut<&Q>` where `Q: Equivalent<K>`. The reference makes this indexing unambiguous, but it could be confusing to users if the key type is also an integer.

view details

Josh Stone

commit sha 4d4fc0a1c8aa522139e1f88ea626941001d0e50a

Add documentation and examples for Index and IndexMut

view details

push time in 3 days

push eventbluss/indexmap

Josh Stone

commit sha c42867cc0adeb0aa3099cd2416252f0fb7c845c6

Expand drain to accept any RangeBounds<usize> Rather than just `RangeFull`, this lets us accept any `Range*` type or even arbitrary `Bound` pairs, matching the signature of `Vec::drain`.

view details

Josh Stone

commit sha 8ddc4f176d102050d6fc4cb42e902572172eab3f

Merge pull request #142 from cuviper/drain-ranges Expand drain to accept any RangeBounds<usize>

view details

push time in 3 days

PR merged bluss/indexmap

Expand drain to accept any RangeBounds<usize>

Rather than just RangeFull, this lets us accept any Range* type or even arbitrary Bound pairs, matching the signature of Vec::drain.

+165 -13

1 comment

6 changed files

cuviper

pr closed time in 3 days

pull request commentbluss/indexmap

Expand drain to accept any RangeBounds<usize>

I'm going to go ahead and merge this -- the signature should be uncontroversial to match Vec, and it's not a breaking change since we still accept RangeFull as a possibility. We can always iterate on the implementation more later, if needed.

cuviper

comment created time in 3 days

PR opened rust-lang/rust

Simplify array::IntoIter
  • Initialization can use transmute_copy to do the bitwise copy.
  • as_slice can use get_unchecked and MaybeUninit::slice_get_ref, and as_mut_slice can do similar.
  • next and next_back can use the corresponding Range methods.
  • Clone doesn't need any unsafety, and we can dynamically update the new range to get partial drops if T::clone panics.

r? @LukasKalbertodt

+55 -89

0 comment

1 changed file

pr created time in 3 days

create barnchcuviper/rust

branch : array-iter

created branch time in 3 days

issue commentrust-lang/cargo

jobserver::jobserver_exists hangs with only one CPU

but that jobserver isn't inhereited by the test suite process itself

That explains it! I can confirm that adding -j2 within that test works -- I'll send a PR shortly.

cuviper

comment created time in 3 days

issue openedrust-lang/cargo

jobserver::jobserver_exists hangs with only one CPU

Problem

Running the cargo testsuite on a single-CPU machine hangs on jobserver::jobserver_exists. This can also be reproduced on other machines by limiting the available CPUs, e.g. with taskset on Linux.

Steps

  1. cargo test --test testsuite --no-run
  2. taskset --cpu-list 0 cargo test --test testsuite -- --exact jobserver::jobserver_exists

Possible Solution(s)

That test has a build script reading CARGO_MAKEFLAGS and trying to read/write the jobserver pipes, taking and releasing a job token. I suppose in this nested invocation, all tokens must already be in use? But there's no problem when I use cargo test -j1 without restricting the taskset, so I'm not sure what's the difference.

Notes

Output of cargo version:

cargo 1.47.0-nightly (1653f3546 2020-08-04)
release: 1.47.0
commit-hash: 1653f354644834073d6d2541e27fae94588e685e
commit-date: 2020-08-04

First seen in the rpm build of 1.45.2 for RHEL 8.3.0 ppc64le while running the testsuite. Usually I get a multi-CPU builder though, so I can't say this is a new issue.

Reproduced on Fedora 32 x86_64 with cargo nightly, by limiting the CPUs with taskset as above.

created time in 4 days

issue commentrust-lang/rust

Tracking issue for by-value array iterator (feature `array_value_iter`)

I think it would be strange if array::IntoIter didn't implement DoubleEndedIterator, as it would be deficient compared to slice and Vec iterators. There are plenty of standard iterators that already track extra state to support reversing -- e.g. FlatMap would both be a lot simpler if it didn't need that.

LukasKalbertodt

comment created time in 4 days

issue closedrust-lang/rust

`*a == *b` moves when dereferencing &Rc<RefCell<dyn Trait>>

This bug report comes from a question in the users forum: https://users.rust-lang.org/t/attempting-to-contain-an-rc-refcell-sometrait-in-an-enum-field-with-clone/46913

They had a problem with #[derive(PartialEq)] on an enum where one variant contains Rc<RefCell<dyn Trait>>, and there is a manual PartialEq for that dyn Trait. I looked at the macro expansion to see that it matches ref patterns and then uses (*__self_0) == (*__arg_1_0), so I reduced the error to this code:

use std::cell::RefCell;
use std::rc::Rc;

pub trait Trait {}

impl PartialEq<dyn Trait> for dyn Trait {
    fn eq(&self, _other: &Self) -> bool {
        todo!();
    }
}

pub fn eq(a: &Rc<RefCell<dyn Trait>>, b: &Rc<RefCell<dyn Trait>>) -> bool {
    *a == *b
}

I expected to see this happen: successful compilation

Instead, this happened: (playground)

error[E0507]: cannot move out of `*b` which is behind a shared reference
  --> src/lib.rs:13:11
   |
13 |     *a == *b
   |           ^^ move occurs because `*b` has type `std::rc::Rc<std::cell::RefCell<dyn Trait>>`, which does not implement the `Copy` trait

Meta

The error is the same with all compilers currently on the playground, 1.45.2, 1.46.0-beta.2, and 1.47.0-nightly (2020-08-05 22ee68dc586440f96b76).

Reduction

Changing to a == b works, but that's not helpful when we want the derived code to work.

Reducing the parameters to &RefCell<dyn Trait> does build successfully.

Reducing the parameters to &dyn Trait changes to a lifetime error:

error[E0621]: explicit lifetime required in the type of `a`
  --> src/lib.rs:13:8
   |
12 | pub fn eq(a: &dyn Trait, b: &dyn Trait) -> bool {
   |              ---------- help: add explicit lifetime `'static` to the type of `a`: `&'static (dyn Trait + 'static)`
13 |     *a == *b
   |        ^^ lifetime `'static` required

error[E0621]: explicit lifetime required in the type of `b`
  --> src/lib.rs:13:11
   |
12 | pub fn eq(a: &dyn Trait, b: &dyn Trait) -> bool {
   |                             ---------- help: add explicit lifetime `'static` to the type of `b`: `&'static (dyn Trait + 'static)`
13 |     *a == *b
   |           ^^ lifetime `'static` required

This one is solved by changing to 'static as suggested, or by changing the PartialEq to:

impl<'a> PartialEq<dyn Trait + 'a> for dyn Trait + 'a { ... }
// or even
impl<'a, 'b> PartialEq<dyn Trait + 'b> for dyn Trait + 'a { ... }

... but that change does nothing for the original issue.

closed time in 4 days

cuviper
more